SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

SegmentedStage

A pill segmented control over a media stage, the switcher a hero puts between its calls to action and the product.

Open in a new tab
View code
tsx
<LandingHero
	title="Know it is down before your users do"
	description="Checks from six regions, and a status page your customers trust."
	actions={…}
	media={
		<SegmentedStage name="hero-views" aria-label="Product views">
			<SegmentedStage.Item value="status" label="Status page" defaultChecked>
				<ProductFrame lights title="Status" url="status.example.com">
					<StatusBoard />
				</ProductFrame>
			</SegmentedStage.Item>
			<SegmentedStage.Item value="incident" label="Incidents">
				<ProductFrame lights title="Incident" url="app.beacon.dev">
					<IncidentCard />
				</ProductFrame>
			</SegmentedStage.Item>
			<SegmentedStage.Item value="api" label="API">
				<CodeStage variant="slab" title="create-monitor.ts" language="ts">{snippet}</CodeStage>
			</SegmentedStage.Item>
		</SegmentedStage>
	}
/>

Demo landings

Whole pages built only from @sdxc/ui, each for an invented product with its own palette and type. They open in a new tab.

Every demo, landings and docs sites alike, is listed in the demo gallery.

Installation

An ordinary dependency: install it, import the theme once, and import the component where it is used.

Terminal
npm add @sdxc/ui remix
typescript
import "@sdxc/ui/theme.css";

Usage

typescript
import { SegmentedStage } from "@sdxc/ui/landing";

Renders the control and the stage from one list of items: each item draws its tab in the control and its panel in the stage. Panels share one grid cell, so the stage is as tall as its tallest panel and switching never moves the page below.

Composition

The parts the component publishes, each a static property of the host.

  • SegmentedStage
  • SegmentedStage.ItemOne tab and panel pair.

Props

Read from the component's own types, so every prop, every default and every allowed value is listed.

PropTypeRequiredDescription
namestringYesRadio group name; unique per page so several stages stay independent.
"aria-label"stringYesAccessible name for the control. Required — the library ships no copy.
align"start" | "center"NoWhere the control sits over the stage. Defaults to DEFAULT_ALIGN.
childrenRemixNodeYesTwo or more SegmentedStage.Item entries.

Also accepts everything in TagProps<"div">.

SegmentedStage.Item

PropTypeRequiredDescription
valuestringYesRadio value for this tab and panel pair.
labelRemixNodeYesVisible tab label.
defaultCheckedbooleanNoMarks the item selected on load. Exactly one item in a stage should pass it.
childrenRemixNodeYesMedia the tab reveals: a product frame, a code stage, a screenshot.

Types

NameValuesWhat it decides
Align"start" | "center"Edge the control sits on: centred over the stage, or flush with a start-aligned hero's copy.
Part"tab" | "panel"Which half of the stage an item is drawing: its tab in the control, or its panel.
@sdxc/ui

Can’t find it? Contact us