StoryPlayer
A full-screen player that shows a recap one card at a time, under a segmented progress bar, with Previous and Next at the card's foot, tap zones, arrow keys, a visible pause and a scroll indicator when a card holds more than fits.
StoryPlayer
StoryPlayer plays a recap as a run of cards, one card at a time. It owns no timer. The host passes the card index, whether the story plays, and the progress through the card, and it moves them on. Start paused under reduced motion, because the player cannot stop a timer it does not own. The player asks the host to pause when the reader uses a control inside the card. The next move to another card asks it to play again, unless the reader paused the story themselves. A scroll inside the card only reports through onContentScroll, so a host that wants it to pause the story pauses it. On the last card, Done takes Next's place and calls onClose, so the host's close must return the reader somewhere. The header and the buttons sit over the card. The player names the room they take in --story-chrome-inset and --story-footer-inset, and StoryCard leaves it. Any other child must leave that room too. A scroll indicator at the card's right edge shows while the card's words run under the buttons. The player measures only the outermost box in the card that can scroll vertically. A scrolling box nested inside that box gets no indicator.
Storybook
Loading
Props
Prop
Type
Tokens
Derived from the component source at docs-generation time — these are the --augds-* variables it reads. Re-theme the colour slots by constructing a partner DesignSystemTheme and wrapping the consumer subtree in <ThemeProvider>, never by hard-coding values.
--augds-border-default--augds-border-subtle--augds-foreground-brand--augds-motion-duration-normal--augds-motion-duration-slow--augds-radius-primitive-20--augds-radius-primitive-999--augds-scrollbar-thumb--augds-scrollbar-thumb-hover--augds-shadow-0-5--augds-spacing-10--augds-spacing-16--augds-spacing-20--augds-spacing-24--augds-spacing-32--augds-spacing-4--augds-spacing-40--augds-spacing-6--augds-spacing-64--augds-spacing-8--augds-spacing-80--augds-surface-page--augds-surface-scrim-blur--augds-surface-surface-1
Source
src/components/ui/story-player/story-player.tsx