@molecule/app-status-timeline-vue
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-vueHow it works
@molecule/app-status-timeline-vue 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.
import { createApp, defineComponent, h } from 'vue'
import { StatusTimeline } from '@molecule/app-status-timeline-vue'
const App = defineComponent({
setup() {
return () =>
h(StatusTimeline, {
steps: [
{ key: 'placed', label: 'Order Placed' },
{ key: 'processing', label: 'Processing' },
{ key: 'shipped', label: 'Shipped' },
{ key: 'delivered', label: 'Delivered' },
],
currentKey: 'shipped',
ariaLabel: 'Order status',
})
},
})
createApp(App).mount('#app')Works with: @molecule/app-ui, @molecule/app-ui-vue, @molecule/app-vue
Reference
Vue 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 Vue
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.tsJSDoc, not this file.
Quick Start
import { createApp, defineComponent, h } from 'vue'
import { StatusTimeline } from '@molecule/app-status-timeline-vue'
const App = defineComponent({
setup() {
return () =>
h(StatusTimeline, {
steps: [
{ key: 'placed', label: 'Order Placed' },
{ key: 'processing', label: 'Processing' },
{ key: 'shipped', label: 'Shipped' },
{ key: 'delivered', label: 'Delivered' },
],
currentKey: 'shipped',
ariaLabel: 'Order status',
})
},
})
createApp(App).mount('#app')
Type
feature
Installation
npm install @molecule/app-status-timeline-vue @molecule/app-ui @molecule/app-ui-vue @molecule/app-vue vue
API
Interfaces
StatusTimelineStep
A single step entry in a StatusTimeline.
interface StatusTimelineStep {
/** Stable identifier for this step (used as the Vue 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
Vertical ordered-step status timeline.
Each step renders as a colored dot + label. Steps at or before the
current one are "reached" (filled dot); the current step's label is
bolded; steps after the current one are dimmed via cm.textMuted.
const StatusTimeline: DefineComponent<
ExtractPropTypes<{
steps: { type: PropType<ReadonlyArray<StatusTimelineStep>>; required: true }
currentKey: { type: StringConstructor; required: true }
ariaLabel: { type: StringConstructor; default: undefined }
className: { type: StringConstructor; default: undefined }
dataMolId: { type: StringConstructor; default: undefined }
}>,
() => VNode,
{},
{},
{},
ComponentOptionsMixin,
ComponentOptionsMixin,
{},
string,
PublicProps,
Readonly<
ExtractPropTypes<{
steps: { type: PropType<ReadonlyArray<StatusTimelineStep>>; required: true }
currentKey: { type: StringConstructor; required: true }
ariaLabel: { type: StringConstructor; default: undefined }
className: { type: StringConstructor; default: undefined }
dataMolId: { type: StringConstructor; default: undefined }
}>
> &
Readonly<{}>,
{ ariaLabel: string; className: string; dataMolId: string },
{},
{},
{},
string,
ComponentProvideOptions,
true,
{},
any
>
props— Component props (seeStatusTimelineProps).
Returns: The status timeline component.
Injection Notes
Requirements
Peer dependencies:
@molecule/app-ui^1.3.11@molecule/app-ui-vue^1.1.0@molecule/app-vue^3.5.0 || ^4.0.0vue^3.4.0
Runtime Dependencies
-
@molecule/app-ui -
@molecule/app-ui-vue -
@molecule/app-vue -
vue -
Requires a wired ClassMap bond (
getClassMap()throws before bonding). No i18n dependency — pass pre-translatedlabelstrings and a translatedariaLabel. -
If
currentKeymatches 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 usebg-outline-variantand row spacing usesspace-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-vue.