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

# @react-login-page/page5

[![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/page5.svg)](https://www.npmjs.com/package/@react-login-page/page5)
[![Downloads](https://img.shields.io/npm/dm/@react-login-page/page5.svg?style=flat)](https://www.npmjs.com/package/@react-login-page/page5)

<!--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/234231103-0bdceee8-2407-43b3-a2fe-017d344d5764.png">
</a>

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

## Install

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

## Usage

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

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 } from '@react-login-page/page5';
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>
      <Submit type="reset" keyname="reset">
        重置
      </Submit>
      <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/page5';
import LoginLogo from 'react-login-page/logo-rect';

const Demo = () => (
  <LoginPage style={{ height: 480 }}>
    <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/page5';
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+q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6AHT7cICFASKYCAgfJeb94S4CQCBCfA6vV2boECCnqAYESWZ5Bdi6kkCTPqFdKbV19HlOcnQAhRRQgRkSAkAgQAoREgBAgBAgBQoAQICQChAAhESAECIkAIUBIBAgBQgoD/Q8QZpUThrhrWAAAAABJRU5ErkJggg==';

const Demo = () => (
  <LoginPage style={{ height: 820 }}>
    <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="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/page5';

const css = {
  '--login-bg': '#5b6ef4',
  '--login-color': '#fff',
  '--login-input': '#333',
  '--login-input-bg': '#fff',
  '--login-input-before': 'rgb(62 41 255 / 15%)',
  '--login-input-after': 'rgb(49 141 255 / 20%)',
  '--login-btn': '#fff',
  '--login-btn-bg': '#5b6ef4',
  '--login-btn-focus': '#3648c6',
  '--login-btn-hover': '#3648c6',
  '--login-btn-active': '#5b6ef4',
  '--login-footer': '#ffffff99',
};

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

export default Demo;
```

Use css variables to override default color values

```css
.login-page5 {
  --login-bg: #f45b69;
  --login-inner-bg: white;
  --login-color: #fff;
  --login-input: #333;
  --login-input-bg: #fff;
  --login-input-before: rgba(69, 105, 144, 0.15);
  --login-input-after: rgba(2, 128, 144, 0.2);
  --login-btn: #fff;
  --login-btn-bg: #f45b69;
  --login-btn-focus: #f24353;
  --login-btn-hover: #f24353;
  --login-btn-active: #d82a3b;
  --login-footer: #ffffff99;
}
```

Custom CSS style overrides

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

## Light & Dark Theme

```css
[data-color-mode*='dark'] .login-page5,
.login-page5 {
  --login-bg: #f45b69;
  --login-inner-bg: white;
  --login-color: #fff;
  --login-input: #333;
  --login-input-bg: #fff;
  --login-input-before: rgba(69, 105, 144, 0.15);
  --login-input-after: rgba(2, 128, 144, 0.2);
  --login-btn: #fff;
  --login-btn-bg: #f45b69;
  --login-btn-focus: #f24353;
  --login-btn-hover: #f24353;
  --login-btn-active: #d82a3b;
  --login-footer: #ffffff99;
}
[data-color-mode*='light'] .login-page5 {
  --login-bg: #f45b69;
  --login-inner-bg: white;
  --login-color: #fff;
  --login-input: #333;
  --login-input-bg: #fff;
  --login-input-before: rgba(69, 105, 144, 0.15);
  --login-input-after: rgba(2, 128, 144, 0.2);
  --login-btn: #fff;
  --login-btn-bg: #f45b69;
  --login-btn-focus: #f24353;
  --login-btn-hover: #f24353;
  --login-btn-active: #d82a3b;
  --login-footer: #ffffff99;
}
```

## API

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

```jsx
import LoginPage from '@react-login-page/page5';
// buttons
import { Reset, Submit } from '@react-login-page/page5';
// blocks
import { Logo, Title, Footer } from '@react-login-page/page5';
// fields
import { Username, Password } from '@react-login-page/page5';
// Basic Components
import { Button, Input } from '@react-login-page/page5';
// 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/page5';

<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.