@molecule/app-status-timeline-svelte

Feature · status-timeline · App (browser) · v1.1.2 · Apache-2.0

Vertical ordered-step status timeline: dots colored by reached state, current step bolded — generic for orders, workflows, kanban progressions

npm install @molecule/app-status-timeline-svelte

npm · Source on GitHub

How it works

@molecule/app-status-timeline-svelte is a ready-made status-timeline feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

<script lang="ts">
  import { StatusTimeline } from '@molecule/app-status-timeline-svelte'
</script>

<StatusTimeline
  steps={[
    { key: 'placed', label: 'Order Placed' },
    { key: 'processing', label: 'Processing' },
    { key: 'shipped', label: 'Shipped' },
    { key: 'delivered', label: 'Delivered' },
  ]}
  currentKey="shipped"
  ariaLabel="Order status"
/>

Works with: @molecule/app-svelte, @molecule/app-ui, @molecule/app-ui-svelte

Reference

Svelte vertical ordered-step status timeline.

Exports StatusTimeline — render a list of steps with colored dots indicating reached state and bolded label on the current step. Generic for orders, workflows, kanban progressions, etc. It is the Svelte counterpart of @molecule/app-status-timeline-react: same props and the same DOM for the same input.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

<script lang="ts">
  import { StatusTimeline } from '@molecule/app-status-timeline-svelte'
</script>

<StatusTimeline
  steps={[
    { key: 'placed', label: 'Order Placed' },
    { key: 'processing', label: 'Processing' },
    { key: 'shipped', label: 'Shipped' },
    { key: 'delivered', label: 'Delivered' },
  ]}
  currentKey="shipped"
  ariaLabel="Order status"
/>

Type

feature

Installation

npm install @molecule/app-status-timeline-svelte @molecule/app-svelte @molecule/app-ui @molecule/app-ui-svelte svelte

API

Interfaces

StatusTimelineStep

A single step entry in a StatusTimeline.

interface StatusTimelineStep {
  /** Stable identifier for this step (used as the `{#each}` key). */
  key: string
  /** Visible label. Apps that route this through `t(...)` should pass the resolved string. */
  label: string
}

StatusTimelineProps

Props accepted by the StatusTimeline component.

interface StatusTimelineProps {
  /** Ordered list of steps from earliest to latest. */
  steps: ReadonlyArray<StatusTimelineStep>
  /** The key of the current step. Steps with the same or earlier index are shown as "reached". */
  currentKey: string
  /** Aria-label for the timeline ordered list. */
  ariaLabel?: string
  /** Extra classes on the outer `<ol>`. */
  className?: string
  /** `data-mol-id` for AI-agent selectors. */
  dataMolId?: string
}

Constants

StatusTimeline

const StatusTimeline: LegacyComponentType

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-svelte ^3.5.0 || ^4.0.0
  • @molecule/app-ui ^1.3.11
  • @molecule/app-ui-svelte ^1.1.0
  • svelte ^5.0.0

Runtime Dependencies

  • @molecule/app-svelte

  • @molecule/app-ui

  • @molecule/app-ui-svelte

  • svelte

  • Requires a wired ClassMap bond (getClassMap() throws before bonding). No i18n dependency — pass pre-translated label strings and a translated ariaLabel.

  • If currentKey matches no step, EVERY step renders as unreached — there is no error; double-check the key values.

  • Reached dots use bg-primary (works with the scaffold theme); unreached dots use bg-outline-variant and row spacing uses space-y-2 — both are Material-3/raw utilities that the minimal scaffold theme does not generate, so unreached dots can be invisible and rows unspaced outside flagship-derived themes.

  • Vertical list only; for a horizontal stage rail use @molecule/app-stage-timeline-svelte.