Socket
Socket
Sign inDemoInstall

@spark-web/vertical-stepper

Package Overview
Dependencies
12
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @spark-web/vertical-stepper

--- title: Vertical Stepper storybookPath: data-display-vertical-stepper isExperimentalPackage: true ---


Version published
Weekly downloads
45
decreased by-16.67%
Maintainers
2
Install size
14.1 MB
Created
Weekly downloads
 

Readme

Source

title: Vertical Stepper storybookPath: data-display-vertical-stepper isExperimentalPackage: true

Vertical stepper display progress through a sequence of logical and numbered steps.

Example

const [activeIndex, setActiveIndex] = React.useState(2);

return (
  <Box padding="large">
    <VerticalStepper activeIndex={activeIndex}>
      <Step>
        <Step.Heading title="Step 1" />
        <Step.Content>
          <Stack gap="medium">
            <Text>
              Lorem Ipsum is simply dummy text of the printing and typesetting
              industry. Lorem Ipsum has been the industry's standard dummy text
              ever since the 1500s, when an unknown printer took a galley of
              type and scrambled it to make a type specimen book. It has
              survived not only five centuries, but also the leap into
              electronic typesetting, remaining essentially unchanged. It was
              popularised in the 1960s with the release of Letraset sheets
              containing Lorem Ipsum passages, and more recently with desktop
              publishing software like Aldus PageMaker including versions of
              Lorem Ipsum.
            </Text>
            <Button
              tone="primary"
              onClick={() => {
                setActiveIndex(activeIndex + 1);
              }}
            >
              Next
            </Button>
          </Stack>
        </Step.Content>

        <Step.CompletedContent>
          <Text>Success 🎉!</Text>
        </Step.CompletedContent>
      </Step>

      <Step>
        <Step.Heading
          title="Step 2"
          renderActionButton={({ isCompleted, stepIndex }) =>
            isCompleted && (
              <Button
                type="button"
                tone="info"
                onClick={() => {
                  setActiveIndex(stepIndex);
                }}
                size="medium"
              >
                <PencilAltIcon size="xxsmall" />
                Edit
              </Button>
            )
          }
        />
        <Step.Content
          render={({ stepIndex }) => (
            <Stack gap="small">
              <Text>Content number {stepIndex + 1}</Text>

              <Button
                tone="secondary"
                onClick={() => {
                  setActiveIndex(stepIndex - 1);
                }}
              >
                Back
              </Button>

              <Button
                tone="primary"
                onClick={() => {
                  setActiveIndex(stepIndex + 1);
                }}
              >
                Next
              </Button>
            </Stack>
          )}
        />
        <Step.CompletedContent
          render={({ stepIndex }) => (
            <Text>Completed Step {stepIndex + 1}!! 🎉</Text>
          )}
        />
      </Step>

      <Step>
        <Step.Heading title="Step 3" />
        <Step.Description>
          <Text size="small" tone="muted">
            Lorem Ipsum is simply dummy text of the printing and typesetting
            industry. Lorem Ipsum has been the industry's standard dummy text
            ever since the 1500s, when an unknown printer took a galley of type
            and scrambled it to make a type specimen book.
          </Text>
        </Step.Description>
        <Step.Content>
          <Stack gap="medium">
            <Text>
              Lorem Ipsum is simply dummy text of the printing and typesetting
              industry. Lorem Ipsum has been the industry's standard dummy text
              ever since the 1500s, when an unknown printer took a galley of
              type and scrambled it to make a type specimen book. It has
              survived not only five centuries, but also the leap into
              electronic typesetting, remaining essentially unchanged. It was
              popularised in the 1960s with the release of Letraset sheets
              containing Lorem Ipsum passages, and more recently with desktop
              publishing software like Aldus PageMaker including versions of
              Lorem Ipsum.
            </Text>
            <Button
              tone="secondary"
              onClick={() => {
                setActiveIndex(activeIndex - 1);
              }}
            >
              Back
            </Button>
          </Stack>
        </Step.Content>
      </Step>
    </VerticalStepper>
  </Box>
);

Props

FAQs

Last updated on 15 Feb 2024

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