Skip to content
Klarhimmel UI

Steps, horizontal

Steps, horizontal previewSteps, horizontal preview

Install

npx shadcn add @klarhimmel/steps-horizontal
DetailsAbout, usage, props and more

Three to five steps in a single row, on one continuous line with a marker on each. In narrow containers the same line runs down the left as a vertical list.

Import

Import

import Block from '@/components/klarhimmel/blocks/steps-horizontal';
Also called
  • steps/horizontal
About
Three to five steps in a single row, on one continuous line with a marker on each. In narrow containers the same line runs down the left as a vertical list. Short steps only; use the timeline for long ones.
Category
How it works, in numbered steps or a timeline. New project? Set it up once: /get-started/installation.

Notes

When to use it

Shows a short process as three to five steps on one line, each with a marker, so a visitor sees the whole path at a glance. If the steps need long explanations, steps-timeline reads better, and if one screenshot explains the flow, use steps-media.

Writing for it

- Each step has a 30 character label, an 80 character title and a 240 character description, but the row gets narrow fast, so aim for a title of two to four words and a description of one sentence. - Use the label for something a person can scan, such as 'Day 1' or 'Step 2'. It is optional, and the title sits tighter under the marker when you leave it empty. - The cta is one link under the whole row, not one per step, so point it at the action the last step leads to.

Watch out for

The row only appears once the container is wide enough, at the width for three, four or five columns respectively. Below that the same steps stack down the left as a vertical list, and five steps switch to a row later than three do, so check a mid-width container before assuming a single line.

Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import StepsHorizontal from '@/components/klarhimmel/blocks/steps-horizontal';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <StepsHorizontal props={{
          "eyebrow": "Name the section",
          "title": "Say what the reader ends up with, and in how many steps",
          "description": "Say in one line what the reader does not need.",
          "steps": [
            {
              "label": "Step one",
              "title": "Name the first step",
              "description": "Say what the reader does in the first step and what to have ready."
            },
            {
              "label": "Step two",
              "title": "Name the second step",
              "description": "Say what the reader does in the second step and what it saves them."
            },
            {
              "label": "Step three",
              "title": "Name the third step",
              "description": "Say what the reader does in the third step and where it ends up."
            },
            {
              "label": "Step four",
              "title": "Name the fourth step",
              "description": "Say what the reader gets once the last step is done."
            }
          ],
          "cta": {
            "label": "Main action",
            "href": "/signup"
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}

Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

PropTypeDefaultDescription
eyebrowstring'Name the section'Text, up to 60 characters.
titlestring'Say what the reader ends up with, a…'Text, up to 120 characters.
descriptionstring'Say in one line what the reader doe…'Text, up to 300 characters.
steps{ label, title, description }[]4 itemsList of 3 to 5. Each item: label, title, description.
ctaLink{…}See the type.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.