Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-login-page

> 前端框架
Open source

Some `react` login pages, which can be used quickly after installation.

700 stars0 likes1 views
WebsiteGitHub

About

Some `react` login pages, which can be used quickly after installation.

React Login Pages

Getting Started

Encapsulated login page components based on react-login-page basic components are provided for quick installation and use. These components help streamline the process of creating login pages and offer flexible APIs for modifying and packaging these components. Welcome to choose from our encapsulated login pages. We also welcome recommendations for more cool login pages, which we will turn into React components.

For more login pages, install and use directly here.

React Login Page

This component is designed to facilitate the development of additional login pages and offers a highly flexible API for modifying packaged login page components.

Install

bash
npm install react-login-page --save

Usage

javascript
import React from 'react';
import Login, { Render } from 'react-login-page';
import Logo from 'react-login-page/logo';

const Demo = () => {
  return (
    
      
        {({ fields, buttons, blocks, $$index }) => {
          return (
            

              

              

            
          );
        }}
      
      
        
      
      
        Login
      
      
      
      
        Submit
      
      
        Reset
      
    
  );
};
export default Demo;

Change the control order by using index, Provide more flexible API encapsulation.

…

Logo

There are two default logos built-in, with a special way to import them. See below for reference:

typescript
import Logo from 'react-login-page/logo';
import Logo from 'react-login-page/logo-rect';

⚠️ If you don't use them, they won't be packaged.

javascript
import React from 'react';
import Logo from 'react-login-page/logo';
import LogoRect from 'react-login-page/logo-rect';

const Demo = () => {
  return (
    

  );
};
export default Demo;

Login.Block

javascript
import Login, { Block } from 'react-login-page';

Login
Login
javascript
import React from 'react';
import Login, { Render } from 'react-login-page';

const Demo = () => {
  const [name, setName] = React.useState(1);
  return (
    
      {({ blocks, fields, $$index, extra }, data) => {blocks.title}}
      {name} Login
       setName(name + 1)}>++
    
  );
};
export default Demo;
…

Login.Input

javascript
import Login, { Input } from 'react-login-page';
javascript
import React from 'react';
import Login, { Render } from 'react-login-page';

const Demo = () => {
  return (
    
      
        {({ blocks, fields, $$index, extra }, data) => (
          
            {fields.password} {extra.password}
          
        )}
      
      
         extra content 
      
    
  );
};
export default Demo;
typescript
import React, { FC, PropsWithChildren } from 'react';
export interface InputProps extends React.InputHTMLAttributes {
  keyname?: string;
  /**
   * Used to define the name of form controls
   * @deprecated use `name`
   */
  rename?: string;
  /** Can be shown or hidden with controls */
  visible?: boolean;
  /** "index" refers to the use of indexes to control the order of controls, which can provide more flexible API encapsulation. */
  index?: number;
}
export declare const Input: FC>;

Input can display extra content

javascript

   Remember me 
javascript
import React from 'react';
import Login, { Render } from 'react-login-page';
import Logo from 'react-login-page/logo-rect';

const Demo = () => {
  return (
    
      
        {({ blocks, fields, $$index, extra }, data) => {
          return (
            
              {fields.checkbox} {extra.checkbox}
            
          );
        }}
      
      
         Remember me 
      
    
  );
};
export default Demo;

Login.Textarea

javascript
import Login, { Textarea } from 'react-login-page';
javascript
import React from 'react';
import Login, { Render } from 'react-login-page';

const Demo = () => {
  return (
    
      
        {({ blocks, fields, $$index, extra }, data) => (
          
            {fields.textarea} {extra.textarea}
          
        )}
      
      
        extra content
      
    
  );
};
export default Demo;
typescript
import React, { FC, PropsWithChildren } from 'react';
export interface TextareaProps extends React.InputHTMLAttributes {
  keyname?: string;
  /**
   * Used to define the name of form controls
   * @deprecated use `name`
   */
  rename?: string;
  /** Can be shown or hidden with controls */
  visible?: boolean;
  /** "index" refers to the use of indexes to control the order of controls, which can provide more flexible API encapsulation. */
  index?: number;
}
export declare const Textarea: FC>;

Login.Select

javascript
import Login, { Select } from 'react-login-page';

  One
  Two

  One
  Two
javascript
import React from 'react';
import Login, { Render } from 'react-login-page';

const Demo = () => {
  return (
    
      {({ blocks, fields, $$index, extra }, data) => {fields.selectname}}
      
        One
        Two
      
    
  );
};
export default Demo;
typescript
import React, { FC, PropsWithChildren } from 'react';
export interface SelectProps extends React.InputHTMLAttributes {
  keyname?: string;
  /**
   * Used to define the name of form controls
   * @deprecated use `name`
   */
  rename?: string;
  /** Can be shown or hidden with controls */
  visible?: boolean;
  /** "index" refers to the use of indexes to control the order of controls, which can provide more flexible API encapsulation. */
  index?: number;
}
export declare const Select: FC>;

Login.Button

javascript
import Login, { Button } from 'react-login-page';

Login
Login
javascript
import React from 'react';
import Login, { Render } from 'react-login-page';

const Demo = () => {
  return (
    
      {({ blocks, buttons, fields, $$index, extra }, data) => {buttons.submit}}
      
        Login
      
    
  );
};
export default Demo;
javascript
import type { FC, PropsWithChildren } from 'react';
export interface ButtonProps extends React.ButtonHTMLAttributes {
  keyname?: string;
  /** Can be shown or hidden with controls */
  visible?: boolean;
  /** "index" refers to the use of indexes to control the order of controls, which can provide more flexible API encapsulation. */
  index?: number;
}
export declare const Button: FC>;

Render

javascript
import { Render } from 'react-login-page';

  {({ fields, buttons, blocks, extra, $$index }, data) => {
    // data.blocks  => Array
    // data.buttons => Array
    // data.fields  => Array
    return (
      

      
    );
  }}
;
typescript
import { type FC } from 'react';
import { RenderStateProps, InitialState } from 'react-login-page';
export type RenderChildren =
  | {
      children?: (props: Required, data: InitialState['data']) => React.ReactNode;
    }
  | {
      children?: React.ReactNode;
    };
export declare const Render: FC;

index refers to the use of indexes to control the order of controls

typescript

  {({ blocks, extra, $$index }, { fields, buttons }) => {
    return (
      

      
    );
  }}

useStore

javascript
import React from 'react';
import Login, { Render, Provider, Container, useStore } from 'react-login-page';

const RenderLoginPage = () => {
  const { fields, extra, $$index, buttons, blocks, data } = useStore();
  return (
    
      
        {blocks.logo} {blocks.title}
      
      {fields.username}
      {fields.password}
      

    
  );
};

const Demo = () => {
  return (
    
      
        
      
      
        ⚛️
      
      
        Login
      
      
      
      
        Submit
      
      
        Reset
      
    
  );
};

export default Demo;

index refers to the use of indexes to control the order of controls

…

Contributors

As always, thanks to our amazing contributors!

Made with contributors.

License

Licensed under the MIT License.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptloginlogin-pagereactreact-login-page

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架