Skip to content
Time series & sequenceGenerated from the public API

RegimeStrip

Place regimes, events and calendars on one time axis a reader can inspect.

@luc/ui/charts

What it shows

Show a classification that persists across time as contiguous state intervals.

Live preview

Six spans on one time axis with a fixed three-word vocabulary, drawn from the caller's own classification.

<RegimeStrip
  intervals={[
    { start: "2026-01-05", end: "2026-02-13", state: "calm", label: "Low volatility" },
    { start: "2026-02-16", end: "2026-03-20", state: "watch", label: "Range widening" },
    { start: "2026-03-23", end: "2026-04-30", state: "stress", label: "Drawdown" },
    { start: "2026-05-04", end: "2026-07-31", state: "calm" },
    { start: "2026-08-03", end: "2026-09-11", state: "watch" },
    { start: "2026-09-14", end: "2026-10-06", state: "calm" },
  ]}
  states={[
    { state: "calm", label: "Calm", tone: "positive" },
    { state: "watch", label: "Watch", tone: "warning" },
    { state: "stress", label: "Stress", tone: "negative" },
  ]}
  showLegend
  height={120}
  ariaLabel="Regime over the year"
/>

Controls

Modified

Height

200px

A chart measures its container, so it always needs a definite height.

State

The surface the chart is in — loading, empty and error are drawn by the component.

Accessible name

A drawing is not readable by a screen reader, so it needs a name that states what it shows.

The same fixture as the live preview above; the controls change how it is drawn, not what it measures.

Code
import { RegimeStrip } from "@luc/ui/charts";

<RegimeStrip
  intervals={[
    { start: "2026-01-05", end: "2026-02-13", state: "calm", label: "Low volatility" },
    { start: "2026-02-16", end: "2026-03-20", state: "watch", label: "Range widening" },
    { start: "2026-03-23", end: "2026-04-30", state: "stress", label: "Drawdown" },
    { start: "2026-05-04", end: "2026-07-31", state: "calm" },
    { start: "2026-08-03", end: "2026-09-11", state: "watch" },
    { start: "2026-09-14", end: "2026-10-06", state: "calm" },
  ]}
  states={[
    { state: "calm", label: "Calm", tone: "positive" },
    { state: "watch", label: "Watch", tone: "warning" },
    { state: "stress", label: "Stress", tone: "negative" },
  ]}
  showLegend
  height={200}
  ariaLabel="Regime over the year"
  state="ready"
/>

Not controllable here

  • series / rows — The numbers are the caller's; the fixture above is the example.
Copy for an AI agentA specification an agent can act on: the import, the setup, the chosen props, the data contract and the accessibility expectation.
Implement `RegimeStrip` from Luc UI. It is: Place regimes, events and calendars on one time axis a reader can inspect.

Import it with: import { RegimeStrip } from "@luc/ui/charts";
Requires: react ^19.0.0; react-dom ^19.0.0; react-hook-form ^7.0.0 (optional, for @luc/ui/forms/react-hook-form); tailwindcss ^4.0.0; node >= 22 (repository tools). Import the stylesheet once at the app root and wrap the tree in `LucProvider`. Both come from the package that publishes @luc.

Chosen configuration: `height={200}`, `state="ready"`, `ariaLabel="Regime over the year"`.

Accessibility: keep the component's own semantics. Do not re-implement its ARIA wiring, do not add roles it does not declare, and make sure every interactive element is reachable and operable from the keyboard with a visible focus state.
Styling: use Luc UI design tokens and the component's own props. Do not restyle with raw colour literals and do not override the component's internal structure with page CSS.
Motion: respect `prefers-reduced-motion`. The component already does, so do not disable it.

Reproduce this state:
```tsx
<RegimeStrip
  intervals={[
    { start: "2026-01-05", end: "2026-02-13", state: "calm", label: "Low volatility" },
    { start: "2026-02-16", end: "2026-03-20", state: "watch", label: "Range widening" },
    { start: "2026-03-23", end: "2026-04-30", state: "stress", label: "Drawdown" },
    { start: "2026-05-04", end: "2026-07-31", state: "calm" },
    { start: "2026-08-03", end: "2026-09-11", state: "watch" },
    { start: "2026-09-14", end: "2026-10-06", state: "calm" },
  ]}
  states={[
    { state: "calm", label: "Calm", tone: "positive" },
    { state: "watch", label: "Watch", tone: "warning" },
    { state: "stress", label: "Stress", tone: "negative" },
  ]}
  showLegend
  height={200}
  ariaLabel="Regime over the year"
  state="ready"
/>
```

Usage

The values are prepared by the caller: this component draws the points it is given and computes no statistic of its own, so units, scaling and any summary have to be settled before the data reaches it.

It is drawn by the ECharts engine.

Worked examples with real data are on the family overview: Time series & sequence

import { RegimeStrip } from "@luc/ui/charts";
<RegimeStrip
  intervals={[
    { start: "2026-01-05", end: "2026-02-13", state: "calm", label: "Low volatility" },
    { start: "2026-02-16", end: "2026-03-20", state: "watch", label: "Range widening" },
    { start: "2026-03-23", end: "2026-04-30", state: "stress", label: "Drawdown" },
    { start: "2026-05-04", end: "2026-07-31", state: "calm" },
    { start: "2026-08-03", end: "2026-09-11", state: "watch" },
    { start: "2026-09-14", end: "2026-10-06", state: "calm" },
  ]}
  states={[
    { state: "calm", label: "Calm", tone: "positive" },
    { state: "watch", label: "Watch", tone: "warning" },
    { state: "stress", label: "Stress", tone: "negative" },
  ]}
  showLegend
  height={120}
  ariaLabel="Regime over the year"
/>

Data contract

`intervals` require ordered `start`/`end` spans and a `state`; `states` maps each state id to a label and tone. The state classification comes from the caller.

Important configuration

Provide the `states` vocabulary, keep intervals non-overlapping, and set `showLegend` when more than one state is visible.

Guidelines

When not to use

Do not use a regime strip for point events or let intervals overlap; a state is a period, not a marker.

Configuration

Exported symbols
ExportKindSignature
RegimeStrip13 documented props({ intervals, states, showLegend, title, description, state, height, className, ariaLabel, ariaDescription, onReady, onEvent, eager, }: RegimeStripProps) => import("@types/react").JSX.Element

RegimeStrip props

Type: RegimeStripProps

Values the compiler reads from the declaration.

RegimeStrip props
PropTypeDefaultNotes
ariaDescription?string | undefined—
ariaLabel?string | undefined—
className?string | undefined—
description?string | undefined—
eager?boolean | undefined—Create the engine on mount rather than when the surface is approached.
height?string | number | undefined—
intervalsreadonly RegimeInterval[]—
onEvent?((event: EChartEvent) => void) | undefined—
onReady?((chart: EChartsInstance) => void) | undefined—
showLegend?boolean | undefined—Draw a thin legend above the strip.
state?ChartState | undefined—
statesreadonly RegimeStateStyle[]—Deterministic state → colour mapping. A state with no style gets a slot.
title?string | undefined—

Accessibility

A chart is a picture of data, so it needs a name that states what it shows, and the numbers must exist as text somewhere on the page — in a table or a written summary — because a drawing is not readable by a screen reader and cannot be copied.

What happens on the server, and when hydration changes it.

Family

Time series & sequence

Regimes, events and calendars over a shared inspection cursor.

Luc UI v1.0RegimeStripdark theme