npm package: @react-login-page/base
Description: Some `react` login pages, which can be used quickly after installation.
Author: kenny wong
Latest version: 1.0.6

# @react-login-page/base

[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
[![npm version](https://img.shields.io/npm/v/@react-login-page/base.svg)](https://www.npmjs.com/package/@react-login-page/base)
[![Downloads](https://img.shields.io/npm/dm/@react-login-page/base.svg?style=flat)](https://www.npmjs.com/package/@react-login-page/base)

<!--rehype:ignore:start-->
<a href="https://uiwjs.github.io/react-login-page">
<img width="571" alt="login-page" src="https://user-images.githubusercontent.com/1680273/233357735-5ab70bd9-9261-46fc-8f4e-88d9074750f9.png">
</a>

<!--rehype:ignore:end-->

## Install

```bash
$ npm install @react-login-page/base --save
```

## Usage

```jsx mdx:preview
import React from 'react';
import Login from '@react-login-page/base';

const Demo = () => <Login style={{ height: 380 }} />;

export default Demo;
```

## Modify Controls

```jsx mdx:preview
import React from 'react';
import LoginPage, { Username, Password, Submit, Title, Logo, Reset } from '@react-login-page/base';
import LoginLogo from 'react-login-page/logo';

const styles = { height: 460 };

const Demo = () => (
  <div style={styles}>
    <LoginPage>
      <Username name="userUserName" />
      <Password placeholder="请输入密码" name="userPassword" />
      <Submit>提交</Submit>
      <Reset disabled={true}>重置</Reset>
      <Title />
      <Logo>
        <LoginLogo />
      </Logo>
    </LoginPage>
  </div>
);

export default Demo;
```

## Hide Controls

Use `visible={false}` to hide controls.

```jsx mdx:preview
import React from 'react';
import LoginPage, { Reset, Logo, Password, Footer } from '@react-login-page/base';
import LoginLogo from 'react-login-page/logo-rect';

const Demo = () => (
  <LoginPage style={{ height: 380 }}>
    <Logo>
      <LoginLogo />
    </Logo>
    <Password visible={false} />
    <Footer>
      Not a member? <a href="#">Sign up now</a>
    </Footer>
  </LoginPage>
);

export default Demo;
```

## Add Controls

```jsx mdx:preview
import React from 'react';
import LoginPage, { Reset, Logo, Footer, Username, Password, Input } from '@react-login-page/base';
import LoginLogo from 'react-login-page/logo-rect';

const imgSrc =
  'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAYAAADDhn8LAAAMuElEQVR42u2d+XMUxxXH/Se4KpVK4h9SqUpSyU+plA/iOITYFRKnSEjZsQuDDARsHBMC2OG+rxCEQQYjc1tYRsgSiFMcEuKSkJDQgUCAECAJdiWZFatbQrd2t6M3zordUb+enp3Z2UPvW/UKSprpbpv3menX/V7PM4xEIqF6hv4XkEgECIlEgJBIBAiJRICQSAQIiUSAkEgECIlEgJBIBAiJRCJASCQChEQiQEgkAoREIkBIJAKERCJASCQChEQiQEgkXF9vuTzMCBASgSGAIdpAIUBIuuEw8zoChDTi4IgmSAgQUlCdPdIhIUBIQXfySIaEACFZ4uCRCgkBQrLEsQkQEgFCgJAIkOiE5MahxVwjQEiWOXQ4AuIFgd4gJAKEAwdNsUhh5dDhAokMHAQIyXJHJkBIBEiYAyILBwGiIWeDkx1NP8qWrV3OJk6bxH4zdjQb9eqvFIO/T5j6Dlu6eilLPZzKHPUOAiQCANEDhx8gn/+xls1/tpJrR+c5gz7wqtxutP/4sbWG2n5+9Auo8VRZXcnmLZnHXhzzkvBetc1ZMEe5N1gaPWsFauHc1+WPdrOMd2KHGfzcqG7vzeS27bXyhLPmAFKa1oE66JLvV7GBXk9QAdk/1YH2X5TUbgkgfX19bENcrC4oeLYrYTcB4uvEezJQB+5p7jA0zsv/3iMERA1hwIB43Iyt/ukD1EmvJrYFDY4njS628Dv8fpc+V20YThlAmpublWmUUTi8Nn/ZAgLk/3pcdA91YMeVOwGPsbf1iRAONYR64RgWg2Sub0IB2fb72qABcnFLM9rv8UUNhtvXAqSxqZGNe+vPpsHhtY1bPiFABjXQ3Ys6b1l8esBjdBRUSAHihdAwIK3fDKBPcrBHt3qDAsiGX9qC2qfIiXt6ekx9c6gtvzB/xAMCyl+ayHXeCx9sC3iMAJcMIF4IDQMC+jLmUVCf5lYG5zKArFq/ivvz8RP+qsQSufm5rKu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KYCAgfJeb94S4CQCBCfA6vV2boECCnqAYESWZ5Bdi6kkCTPqFdKbV19HlOcnQAhRRQgRkSAkAgQAoREgBAgBAgBQoAQICQChAAhESAECIkAIUBIBAgBQgoD/Q8QZpUThrhrWAAAAABJRU5ErkJggg==';

const Demo = () => (
  <LoginPage style={{ height: 520 }}>
    <Logo>
      <LoginLogo />
    </Logo>
    <Username keyname="subtitle" visible={false} index={0}>
      欢迎登录页面
    </Username>
    {/* hide default username field */}
    <Username visible={false} />
    <Username keyname="user" index={3} placeholder="修改了 name 字段" />
    <Username keyname="checkbox" type="checkbox" index={3} placeholder="修改了 name 字段" style={{ width: 'auto' }}>
      <div style={{ fontSize: 14, display: 'flex', justifyContent: 'space-between', flex: 1 }}>
        <div>Remember Me</div>
        <a href="#" onClick={(event) => event.preventDefault()}>
          Forgot Password
        </a>
      </div>
    </Username>
    <Username keyname="username_rule" visible={false} index={4}>
      用户名规则
    </Username>
    <Password index={1} />
    <Input name="phone" index={2} placeholder="Phone number">
      <img src={imgSrc} height={38} />
    </Input>
    <Footer>
      Not a member? <a href="#">Sign up now</a>
    </Footer>
  </LoginPage>
);

export default Demo;
```

## Modify default control `name`

Modify the string that specifies the **`name`** of the input control by default

1. remove default `name=username` controls

```jsx
<Username visible={false} />
```

2. add `name=user` controls

```jsx
<Username keyname="user" index={3} placeholder="修改了 name 字段" />
```

## Modify Color Style

```jsx mdx:preview
import React from 'react';
import Login from '@react-login-page/base';

const BackGroup =
  'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTM2MSIgaGVpZ2h0PSI2MDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+IDxnIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+IDxnIG9wYWNpdHk9Ii44IiB0cmFuc2Zvcm09InJvdGF0ZSgtNyA0MjkxLjM0MTUyMzEgMjc4Ljg4MDcxMjg2KSI+IDxlbGxpcHNlIGZpbGw9IiNDRk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MTQ4Ljc1IiByPSI1LjI1Ii8+IDxjaXJjbGUgZmlsbC1vcGFjaXR5PSIuNiIgZmlsbD0iI0QxREVFRCIgY3g9IjguNzUiIGN5PSIzMy4yNSIgcj0iOC43NSIvPiA8Y2lyY2xlIGZpbGwtb3BhY2l0eT0iLjYiIGZpbGw9IiNEMURFRUQiIGN4PSIyNDMuODMzMzMzIiBjeT0iMzAuMzMzMzMzMyIgcj0iNS44MzMzMzMzMyIvPiA8Y2lyY2xlIGZpbGw9IiNFMEI0QjciIGN4PSIxNzUuNTgzMzMzIiBjeT0iMjMyLjc1IiByPSI1LjI1Ii8+IDwvZz4gPC9nPiA8L3N2Zz4=';

const css = {
  '--login-bg': '#edeff3',
  '--login-color': '#3b4148',
  '--login-input': '#525D68',
  '--login-input-bg': '#d7dee5',
  '--login-input-hover': '#b6c3d1',
  '--login-input-placeholder': '#8e98a2',
  '--login-btn': '#fff',
  '--login-btn-bg': '#e82f94',
  '--login-btn-focus': '#f0008359',
  '--login-btn-hover': '#ff37a5',
  '--login-btn-active': '#d51c80',
  backgroundImage: `url(${BackGroup})`,
  backgroundRepeat: 'no-repeat',
  backgroundPosition: 'center 110px',
  backgroundSize: '100%',
};

const Demo = () => <Login style={{ height: 380, ...css }} />;

export default Demo;
```

Use css variables to override default color values

```css
.login-page-base {
  --login-bg: #edeff3;
  --login-color: #3b4148;
  --login-input: #525d68;
  --login-input-bg: #d7dee5;
  --login-input-hover: #b6c3d1;
  --login-input-placeholder: #8e98a2;
  --login-btn: #fff;
  --login-btn-bg: #e82f94;
  --login-btn-focus: #f0008359;
  --login-btn-hover: #ff37a5;
  --login-btn-active: #d51c80;
}
```

Custom CSS style overrides

```css
.login-page-base section button:focus {
  box-shadow: 0 0 0 2px rgba(0, 142, 240, 0.26);
}
.login-page-base section button:hover {
  background-color: #0070bd;
}
.login-page-base section button:active {
  background-color: #00528a;
}
```

## Light & Dark Theme

```css
[data-color-mode*='dark'] .login-page-base {
  --login-bg: #2c3338;
  --login-color: #fff;
  --login-input: #fff;
  --login-input-bg: #3c4656;
  --login-input-hover: #434a52;
  --login-input-placeholder: #838383;
  --login-btn: var(--login-color);
  --login-btn-bg: #008ef0;
  --login-btn-focus: rgba(0, 142, 240, 0.26);
  --login-btn-hover: #0070bd;
  --login-btn-active: #00528a;
}
[data-color-mode*='light'] .login-page-base {
  --login-bg: #edeff3;
  --login-color: #3b4148;
  --login-input: #525d68;
  --login-input-bg: #d7dee5;
  --login-input-hover: #b6c3d1;
  --login-input-placeholder: #8e98a2;
  --login-btn: #fff;
  --login-btn-bg: #008ef0;
  --login-btn-focus: rgba(0, 142, 240, 0.26);
  --login-btn-hover: #0070bd;
  --login-btn-active: #00528a;
}
```

## API

Components be provided to modify control properties and perform other related functions.

```jsx
import LoginPage from '@react-login-page/base';
// buttons
import { Reset, Submit } from '@react-login-page/base';
// blocks
import { Logo, Title, Footer } from '@react-login-page/base';
// fields
import { Username, Password } from '@react-login-page/base';
// Basic Components
import { Button, Input } from '@react-login-page/base';
// or
import { Button, Input } from 'react-login-page';

<LoginPage>
  <Password index={2} />
</LoginPage>

<Input name="phone" index={1} placeholder="Phone number">
  <img src="..." height={38} />
</Input>

// Define the order of `Password` controls
<Password index={2} />

// Hiding the `Password` control
<Password visible={false} />

// Add input control
<Input name="phone" index={1} placeholder="Phone number" />

// Add footer content
<Footer>
  Not a member? <a href="#">Sign up now</a>
</Footer>

// Modify logo image
<Logo>⚛️</Logo>
```

Use [dot notation](https://legacy.reactjs.org/docs/jsx-in-depth.html#using-dot-notation-for-jsx-type) components.

```jsx
import Login from '@react-login-page/base';

<Login>
  <Login.Password index={2} />
</Login>

// Define the order of `Password` controls
<Login.Password index={2} />

// Hiding the `Password` control
<Login.Password visible={false} />

// Add footer content
<Login.Footer>
  Not a member? <a href="#">Sign up now</a>
</Login.Footer>

// Modify logo image
<Login.Logo>⚛️</Login.Logo>
```

## Contributors

As always, thanks to our amazing contributors!

<a href="https://github.com/uiwjs/react-login-page/graphs/contributors">
  <img src="https://uiwjs.github.io/react-login-page/CONTRIBUTORS.svg" />
</a>

Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).

## License

Licensed under the MIT License.