Socket
Socket
Sign inDemoInstall

react-tiny-stepper

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-tiny-stepper

A dead simple stepper library for React


Version published
Weekly downloads
2
Maintainers
1
Install size
94.6 kB
Created
Weekly downloads
 

Readme

Source

react-tiny-stepper

A dead simple stepper library for React

image

Usage

Install the package:

$ yarn add react-tiny-stepper

Then place the component:

import 'react-tiny-stepper/dist/react-tiny-stepper.css'
import { Stepper } from 'react-tiny-stepper'
import { useState } from 'react'

const STEPS = ['Input your info', 'Confirm', 'Register', 'Complete'] as const
type IStep = typeof STEPS[number]

function App() {
  const [step, setStep] = useState<IStep>('Input your info')

  const onStepChange = (step: IStep) => {
    console.log('step changed', step)
    setStep(step)
  }

  return (
    <div className="App">
      <Stepper
        steps={STEPS}
        activeStep={step}
        onChange={onStepChange} // optional
        primaryColor="#4f46e5" // optional
      />
    </div>
  )
}

FAQs

Last updated on 10 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc