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-ui-components-superflows

v1.0.30

Published

UI kit for the Superflows design language

Downloads

925

Readme

react-ui-components-superflows

UI kit for the Superflows design language

NPM JavaScript Style Guide

Demo

Demo

Note

This package is under active development. Expect frequent updates.

Install

npm install --save react-ui-components-superflows

Then install the dependencies.

Dependencies

npm install --save bootstrap
npm install --save react-bootstrap
npm install --save react-bootstrap-icons

Available UI Components

All the components are responsive built in. Usage and customization options shown below.

AlertError

Alert component used to show an error message


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { AlertError } from 'react-ui-components-superflows'

const App = () => {

  return (
    <div>
      {/* Simple usage */}
      <AlertError caption="Duplications not allowed" />

      {/* Advanced usage */}
      <AlertError caption="Duplications not allowed" custom={{backgroundColor:"#F4CFCA", color:"#000000", borderColor:"#000000"}}/>
    </div>
  )

}

export default App

Demo

AlertSuccess

Alert component used to show a success message


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { AlertSuccess } from 'react-ui-components-superflows'

const App = () => {

  return (
    <div>
      {/* Simple usage */}
      <AlertSuccess caption="Operation successful!" />

      {/* Advanced usage */}
      <AlertSuccess caption="Duplications not allowed" custom={{backgroundColor:"#D7ECDE", color:"#99A89E", borderColor:"#99A89E"}}/>
    </div>
  )

}

export default App

Demo

ButtonNext

Button component, which is designed for navigating to the next screen after click


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { ButtonNext } from 'react-ui-components-superflows'

const App = () => {

  const [otp, setOtp] = useState('')

  function onClick() {
    // code after clicking
  }

  return (
    <div>
      {/* Simple usage */}
      <ButtonNext 
        caption="Verify" 
        disabled={otp.length === 0} 
        onClick={onClick} />

      {/* Advanced usage */}
      <ButtonNext 
        caption="Verify" 
        disabled={otp.length === 0} 
        onClick={onClick}
        icon="ArrowRight"
        custom={{backgroundColor:"#F4CFCA", color:"#000000"}} />
    </div>
  )

}

export default App

Demo

ButtonCancel

Button component, which is designed as a button to cancel any activity


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { ButtonCancel } from 'react-ui-components-superflows'

const App = () => {

  function onClick() {
    // code after clicking
  }

  return (
    <div>
      {/* Simple usage */}
      <ButtonCancel
        caption="Cancel" 
        disabled={false} 
        onClick={onClick} />

      {/* Advanced usage */}
      <ButtonCancel 
        caption="Cancel" 
        disabled={false} 
        onClick={onClick}
        icon="ArrowRight"
        custom={{backgroundColor:"#F4CFCA", color:"#000000"}} />
    </div>
  )

}

export default App

Demo

ButtonNeutral

Button component, which is designed as a neutral component and can be used for any purpose


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { ButtonNeutral } from 'react-ui-components-superflows'

const App = () => {

  function onClick() {
    // code after clicking
  }

  return (
    <div>
      {/* Simple usage */}
      <ButtonNeutral
        caption="Update" 
        disabled={false} 
        onClick={onClick} />

      {/* Advanced usage */}
      <ButtonNeutral 
        caption="Update" 
        disabled={false} 
        onClick={onClick}
        icon="Save"
        custom={{backgroundColor:"#F4CFCA", color:"#000000"}} />
    </div>
  )

}

export default App

Demo

ButtonTimer

Button component, which is initially disabled, enables after a specified time. After onClick, it again disabled and enables after the same time specified in second by duration.


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { ButtonTimer } from 'react-ui-components-superflows'

const App = () => {

  const [otp, setOtp] = useState('')

  function onResend() {
    // code after clicking
  }

  return (
    <div>

      {/* Simple usage */}
      <ButtonTimer 
        timer={30} 
        captionBefore="Resend OTP in " 
        captionAfter="Resend OTP" 
        onClick={onResend()}/>

      {/* Advanced usage */}
      <ButtonTimer 
        timer={30} 
        captionBefore="Resend OTP in " 
        captionAfter="Resend OTP" 
        onClick={onResend()}
        custom={{backgroundColor:"#efefef", color:"#000000"}}/>
      
    </div>
  )

}

export default App

Demo

Footnote

Footnote, useful for displaying version or copyright info


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { Footnote } from 'react-ui-components-superflows'

const App = () => {

  return (
    <div>
      {/* Simple Usage */}
      <Footnote caption="Version 3.12" />

      {/* Advanced Usage */}
      <Footnote caption="Version 3.12" custom={{color: "red"}}/>
    </div>
  )

}

export default App

Demo

InfoBlock

Block of information, which the user should not miss


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { InfoBlock } from 'react-ui-components-superflows'

const App = () => {

  return (
    <div>
      {/* Simple Usage */}
      <InfoBlock caption="OTP has been emailed to [email protected]" />

      {/* Advanced Usage */}
      <InfoBlock caption="OTP has been emailed to [email protected]"  custom={{backgroundColor:"#F4CFCA", color:"#000000", borderColor:"#000000"}}/>
    </div>
  )

}

export default App

Demo

InputEmail

Email input, with in built validation, enter press handling and autofocus.


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { InputEmail } from 'react-ui-components-superflows'

const App = () => {

  const [email, setEmail] = useState('');

  function onEnterEmail() {
    // code after on enter pressed
  }

  return (
    <div>
      <InputEmail 
        setValue={setEmail} 
        autofocus={true} 
        onEnterPressed={() => {onEnterEmail()}}/>
    </div>
  )

}

export default App

Demo

InputName

Email input, with in built validation, enter press handling and autofocus.


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { InputName } from 'react-ui-components-superflows'

const App = () => {

  const [name, setName] = useState('');

  function onEnterName() {
    // code after on enter pressed
  }

  return (
    <div>
      <InputName 
        setValue={setName} 
        autofocus={true} 
        onEnterPressed={() => {onEnterName()}}/>
    </div>
  )

}

export default App

Demo

InputSearch

Search input, with in built validation, enter press handling and autofocus.


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { InputSearch } from 'react-ui-components-superflows'

const App = () => {

  const [searchString, setSearchString] = useState('');

  function onEnterSearch() {
    // code after on enter pressed
  }

  return (
    <div>
      <InputSearch 
        setValue={setSearchString} 
        autofocus={true} 
        onEnterPressed={() => {onEnterSearch()}}/>
    </div>
  )

}

export default App

Demo

InputDob

Email input, with in built validation, enter press handling and autofocus.


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { InputDob } from 'react-ui-components-superflows'

const App = () => {

  const [dob, setDob] = useState('');

  function onEnterDob() {
    // code after on enter pressed
  }

  return (
    <div>
      <InputDob 
        setValue={setDob} 
        autofocus={true} 
        onEnterPressed={() => {onEnterDob()}}/>
    </div>
  )

}

export default App

Demo

InputGender

Gender input, with in built in switch.


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { InputGender } from 'react-ui-components-superflows'

const App = () => {

  const [gender, setGender] = useState(0);

  function onChangeGender(value) {
    setGender(value)
  }

  return (
    <div>
      <InputDob 
        onChange={onChangeGender}
        selectedValue={1} />
    </div>
  )

}

export default App

Demo

InputOTP

OTP input, with in built validation, enter press handling and autofocus.


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { InputEmail } from 'react-ui-components-superflows'

const App = () => {

  const [otp, setOtp] = useState('');

  function onEnterOtp() {
    // code after on enter pressed
  }

  return (
    <div>
      <InputOtp 
        setValue={setOtp} 
        autofocus={true} 
        onEnterPressed={() => {onEnterOtp()}}/>
    </div>
  )

}

export default App

Demo

LogoMast

Component that shows an image like a mast head, typically used to display a logo in the login and registration flows.


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { LogoMast } from 'react-ui-components-superflows'

const App = () => {

  return (
    <div>
      <LogoMast 
        imageUrl="https://**************.png" 
        imageAlt="This is a test image" />
    </div>
  )

}

export default App

Demo

VSpace

A vertical spacing block


import React from 'react'
import 'bootstrap/dist/css/bootstrap.min.css';
import { VSpace } from 'react-ui-components-superflows'

const App = () => {

  return (
    <div>
      <VSpace />
    </div>
  )

}

export default App

Demo

License

MIT © superflows-dev