data-display — wyrd.component.carousel

Carousel

Manual single-slide carousel with controlled or uncontrolled selection and accessible navigation controls.

Install @wyrd-company/react or the Flutter package and use it directly — your DESIGN.md does the styling.

01

Examples

Generated from the contract's examples block. Previews are the published @wyrd-company/react component, themed by the brand's role tokens — flip the site's light/dark toggle and they follow.

Code target Applies to every example on component pages.
product-tour state: active
Usage
import { WyrdCarousel } from "@wyrd-company/react";

<WyrdCarousel label="Product tour" defaultValue="foundations" items={[{"value":"foundations","label":"Foundations"},{"value":"components","label":"Components"},{"value":"tooling","label":"Tooling"}]}>
  Semantic foundations.
  Cross-target components.
  Authoring and validation tooling.
</WyrdCarousel>

// events: onValueChange
looping state: active
Usage
import { WyrdCarousel } from "@wyrd-company/react";

<WyrdCarousel label="Featured components" defaultValue="date-time-picker" loop items={[{"value":"date-time-picker","label":"Date and time picker"},{"value":"graph-viewer","label":"Graph viewer"}]}>
  Locale-aware segmented entry and calendar selection.
  Read-only exploration of typed behavior graphs.
</WyrdCarousel>

// events: onValueChange
disabled-slide state: boundary
Usage
import { WyrdCarousel } from "@wyrd-company/react";

<WyrdCarousel label="Release readiness" items={[{"value":"stable","label":"Stable"},{"value":"blocked","label":"Blocked","disabled":true},{"value":"planned","label":"Planned"}]}>
  Available to downstream applications.
  Waiting for a required runtime capability.
  Accepted for a future catalog increment.
</WyrdCarousel>

// events: onValueChange
02

Properties

NameTypeDefaultSummary
label string undefined Accessible name for the carousel region.
value string undefined Controlled active slide value.
default-value string undefined Initial uncontrolled active slide value; the first enabled item is used when absent.
items array Ordered slides; disabled slides remain mounted but are skipped by navigation.
loop boolean false Allows previous and next navigation to wrap between the first and last enabled slides.
03

Slots & events

SlotCardinalityAcceptsSummary
content one-or-many component, content Index-matched slide content; the Nth child belongs to the Nth item.
EventPayloadSummary
value-change value Emitted when manual navigation activates a different enabled slide.
04

Tokens

The contract's token bindings. Open the shared contextual sidebar from any example; primary swatches reflect the color you pick there. Error swatches show the active preset's values; editing any knob switches to custom and resets error to TWW · Ink.

BindingToken
root.gap spacing.sm
viewport.background color.surface
viewport.foreground color.on-surface
viewport.radius rounded.md
control.background color.surface
control.foreground color.on-surface
control.hover-background color.secondary
control.radius rounded.sm
control.padding-x spacing.md
control.padding-y spacing.sm
position.foreground color.on-surface-variant
position.text typography.label-md
05

States

StateSourceSummary
default platform One slide is active and manual controls are available.
active property Active slide state derived from value or default-value.
boundary property A non-looping carousel is at its first or last enabled slide.
focus-visible platform Keyboard-visible focus on a navigation control.
06

Accessibility

From the contract's accessibility obligations. Role region; Label property provides the carousel region's accessible name.

  • Tab reaches the previous and next buttons in document order.
  • Enter and Space activate a focused navigation button.
  • ArrowLeft and ArrowRight move to the spatially previous and next enabled slides while focus is within the carousel.
  • Spatial arrow direction reverses in right-to-left text direction.
  • Web projections expose a named region with aria-roledescription=carousel and each slide as a group with aria-roledescription=slide.
  • Each slide uses its item label when present, otherwise the localized position message.
  • Inactive slides stay mounted but are hidden visually and from assistive technology.
  • Previous and next controls expose component-owned localized names and disabled boundary state.
  • Flutter exposes an equivalent named container, active slide label, and button semantics.
  • Verified under: rtl, reduced-motion, cvd-deuteranopia, density-compact, text-expansion.
07

SDUI

Status: serializable. Carousel serializes ordered items and index-matched slide content; hosts preserve order and keep all slides mounted.

SerializableMembers
Propertieslabel, value, default-value, items, loop
Slotscontent
Eventsvalue-change
The Wyrding Way — a contract-first design system. © Wyrd Company