Socket
Socket
Sign inDemoInstall

rc-steps

Package Overview
Dependencies
10
Maintainers
9
Versions
74
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rc-steps

steps ui component for react


Version published
Weekly downloads
1.2M
increased by4.69%
Maintainers
9
Install size
443 kB
Created
Weekly downloads
 

Package description

What is rc-steps?

The rc-steps npm package is a React component library for creating step or progress indicators in web applications. It provides a simple and customizable way to display steps or progress in a sequence, which is commonly used in multi-step forms, wizards, or processes.

What are rc-steps's main functionalities?

Basic Step Indicator

This code sample demonstrates how to create a basic step indicator with three steps, where the second step is marked as the current step. Each step has a title and a description.

import React from 'react';
import Steps, { Step } from 'rc-steps';

const BasicSteps = () => (
  <Steps current={1}>
    <Step title='Step 1' description='This is a description.' />
    <Step title='Step 2' description='This is a description.' />
    <Step title='Step 3' description='This is a description.' />
  </Steps>
);

export default BasicSteps;

Vertical Step Indicator

This example shows how to set up a vertical step indicator. The steps are arranged vertically, and the current step is highlighted.

import React from 'react';
import Steps, { Step } from 'rc-steps';

const VerticalSteps = () => (
  <Steps direction='vertical' current={1}>
    <Step title='Step 1' description='This is a description for step 1.' />
    <Step title='Step 2' description='This is a description for step 2.' />
    <Step title='Step 3' description='This is a description for step 3.' />
  </Steps>
);

export default VerticalSteps;

Other packages similar to rc-steps

Readme

Source

rc-steps


React steps component.

NPM version build status Test coverage Dependencies DevDependencies npm download bundle size

Usage

npm install rc-steps
<Steps current={1}>
  <Steps.Step title="first" />
  <Steps.Step title="second" />
  <Steps.Step title="third" />
</Steps>

Example

https://react-component.github.io/steps/

API

nametypedefaultdescription
typestringdefaultdiretypetion of Steps, enum: `default` or `navigation`
directionstringhorizontaldirection of Steps, enum: `horizontal` or `vertical`
currentnumber0index of current step
initialnumber0index initial
sizestringsize of Steps, could be `small`
labelPlacementstringplacement of step title, could be `vertical`
statusstringwaitstatus of current Steps, could be `error` `process` `finish` `wait`
icons{ finish: ReactNode, error: ReactNode }specify the default finish icon and error icon
onChange(current: number) => voidTrigger when Step changed

Steps.Step

nametypedefaultdescription
titleReactNodetitle of step item
subTitleReactNodesubTitle of step item
descriptionReactNodedescription of step item
iconReactNodeset icon of step item
statusstringstatus of current Steps, could be `error` `process` `finish` `wait`
tailContentReactNodecontent above tail
disabledboolfalsedisabled step when onChange exist

Development

npm install
npm start

License

rc-steps is released under the MIT license.

Keywords

FAQs

Last updated on 27 Sep 2021

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