Skip to content

StepLog

Displays a log of sequential steps with expandable content, status indicators, and optional line-numbered log output. Inspired by CI/CD pipeline interfaces like GitHub Actions.

Also known as: job log, pipeline viewer, build log, activity log

View in Storybook

When to use

  • Showing CI/CD pipeline or build process steps.
  • Displaying step-by-step execution logs with status indicators.
  • Visualizing deployment progress with expandable log details.

Import

tsx
import { StepLog } from '@vacano/ui'

Usage

tsx
const steps = [
  {
    value: 'build',
    title: 'Build project',
    status: 'success',
    duration: '33s',
    lines: [
      { line: 1, text: 'vite build' },
      { line: 2, text: '✓ 2284 modules transformed.' },
      { line: 3, text: '✓ built in 19.38s' },
    ],
  },
  {
    value: 'deploy',
    title: 'Deploy to production',
    status: 'running',
    lines: [
      { line: 1, text: 'Uploading artifacts...' },
    ],
  },
]

<StepLog steps={steps} />

Step statuses

Each step has a visual status indicator:

  • success -- green check circle
  • error -- red X circle
  • running -- yellow spinning indicator
  • pending -- gray hollow circle (non-interactive, cannot expand)

Default expanded

Pre-expand specific steps.

tsx
<StepLog steps={steps} defaultValue={['build']} />

Controlled

tsx
const [expanded, setExpanded] = useState(['build'])

<StepLog steps={steps} value={expanded} onChange={setExpanded} />

Props

PropTypeDefaultDescription
stepsStepLogItem[]requiredArray of step items
valuestring[]-Controlled expanded step values
defaultValuestring[][]Initially expanded steps (uncontrolled)
onChange(value: string[]) => void-Callback when expanded steps change
refRef<HTMLDivElement>-Forwarded ref
classNamestring-CSS class name for the root element
classnamesStepLogClassNames-Custom class names for sub-elements

StepLogItem

PropertyTypeDefaultDescription
valuestringrequiredUnique step identifier
titleReactNoderequiredStep title
status'success' | 'error' | 'running' | 'pending''pending'Step status
durationstring-Duration label (e.g. "33s")
linesStepLogLine[]-Log lines with line numbers

StepLogLine

PropertyTypeDescription
linenumberLine number
textstringLine content (displayed in monospace)

ClassNames

KeyDescription
stepStep wrapper
headerClickable step header
logLog content block

Released under the MIT License.