ContainerTextFlip.
Words change. The layout stays composed.
Live preview
import { ContainerTextFlip } from "luminescent";
import "luminescent/style.css";
export function Example() {
return (
<ContainerTextFlip words={["thoughtful", "beautiful", "accessible"]} />
);
}
Installation
npm install luminescent
Import luminescent/style.css once at your application root. The example above uses the same package implementation as Storybook.
Variants and states
Use the preview controls to explore the supported variants, sizes, disabled/loading states and reduced motion. Controls appear only where the component exposes the corresponding prop. Theme and glow apply to every component.
API reference
Generated from the source TypeScript interfaces. Native attributes, className, style, aria-* and data-* also pass through to the documented element. Import ContainerTextFlipProps from the package for the full inherited contract.
| Prop | Type | Details |
|---|---|---|
words | string[] | Optional unless marked required. |
interval | number | Optional unless marked required. |
textClassName | string | Optional unless marked required. |
animationDuration | number | Optional unless marked required. |
variant | 'primary' | 'secondary' | Optional unless marked required. |
Accessibility and keyboard
A stable accessible text alternative includes every word. Visible cycling has a pause control, stops offscreen document cycling, and stops for reduced motion. Empty lists render nothing. Longest-word sizing prevents layout shift.
Keep labels meaningful and test application-level contrast, focus order and screen-reader output. See the accessibility guide for composition requirements.
Theme customization
import { LuminescentProvider, ContainerTextFlip } from "luminescent";
import "luminescent/style.css";
export function Example() {
return (
<LuminescentProvider theme="light" accent="violet" glow="subtle">
<ContainerTextFlip words={["thoughtful", "beautiful", "accessible"]} />
</LuminescentProvider>
);
}
Switch between light and dark in the preview, or open the playground for a larger workspace. Custom CSS variables can override spacing, color, typography and effects.