npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@react-login-page/page1

v1.0.4

Published

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

Downloads

154

Readme

@react-login-page/page1

Buy me a coffee npm version Downloads

Install

$ npm install @react-login-page/page1 --save

Usage

import React from 'react';
import Login from '@react-login-page/page1';

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

export default Demo;

Modify Controls

import React from 'react';
import LoginPage, { Username, Password, Submit, Title, Logo, Reset } from '@react-login-page/page1';
import LoginLogo from 'react-login-page/logo';

const styles = { height: 620 };

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

export default Demo;

Hide Controls

Use visible={false} to hide controls.

import React from 'react';
import LoginPage, { Reset, Logo, Password } from '@react-login-page/page1';
import LoginLogo from 'react-login-page/logo-rect';

const Demo = () => (
  <LoginPage style={{ height: 620 }}>
    <Logo>
      <LoginLogo />
    </Logo>
    <Password visible={false} />
  </LoginPage>
);

export default Demo;

Add New Controls

import React from 'react';
import LoginPage, { Reset, Logo, Username, Password, Input } from '@react-login-page/page1';
import LoginLogo from 'react-login-page/logo-rect';

const Demo = () => (
  <LoginPage style={{ height: 620 }}>
    <Logo>
      <LoginLogo />
    </Logo>
    <Username index={3} />
    <Password index={2} />
    <Input name="phone" index={1} placeholder="Phone number" />
  </LoginPage>
);

export default Demo;

Modify Color Style

import React from 'react';
import Login from '@react-login-page/page1';

const css = {
  '--login-bg': '#edeff3',
  '--login-bg-from': '#46acfc',
  '--login-bg-to': '#3ffbd8',
};

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

export default Demo;

Use css variables to override default color values

.login-page-1 {
  --login-bg': #edeff3;
  --login-bg-from': #46acfc;
  --login-bg-to': #3ffbd8;
}

Custom CSS style overrides

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

Light & Dark Theme

[data-color-mode*='dark'] .login-page-1,
.login-page-1 {
  --login-bg: #2c3338;
  --login-color: #fff;
  --login-bg-from: #fc466b;
  --login-bg-to: #3f5efb;
}
[data-color-mode*='light'] .login-page-1 {
  --login-bg: #edeff3;
  --login-color: #3b4148;
  --login-bg-from: #fc466b;
  --login-bg-to: #3f5efb;
}

API

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

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

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

// 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" />

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

Use dot notation components.

import Login from '@react-login-page/page1';

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

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

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

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

Contributors

As always, thanks to our amazing contributors!

Made with contributors.

License

Licensed under the MIT License.