shadcn.io is not affiliated with official shadcn/ui
Stories Viewer Team Block for React
Five teammates of a crop-planning app as a stories viewer: five segments that fill in turn, one sentence at a time in large type, a visible Pause, Previous and Next buttons, arrow keys and swipe.
Installation
Overview
A team section for React with Base UI, for Fieldmouse, a crop-planning app. A framed viewer holds one sentence from one teammate at a time, in large type with their initials avatar, name and role, under five segments. The filling segment is the timer: when it is full the next story slides in, so a Pause toggle can never fall out of step with the story. Previous and Next buttons, the arrow keys, a swipe and a tap on any segment move by hand. It never starts by itself under reduced motion; the toggle then starts it. On a phone the heading comes first, then the viewer, then the controls; from lg the viewer sits at the start. It's built from Carousel, Avatar, Button, Toggle and Guides, with CSS animation and your theme's tokens for every colour. These are example quotes: swap in your own team's. The block shows no video or audio.
FAQ
How does it advance by itself?
The filling segment is a bar that slides in over seven seconds with a CSS animation; when the animation ends, the next story is shown. There is no timer in script. Pausing stops the animation, so a paused story keeps the fill where it was and resumes from there. Change the duration in FILL (--tw-animation-duration:7s) and in the copy.
How do I pause it, and what happens under reduced motion?
The Pause stories toggle sits in the controls row, under the viewer on a phone and under the heading from lg; it reports whether it is pressed. With reduced motion the toggle starts pressed and the stories do not advance until a visitor presses it, because moving content they asked not to have is theirs to start.
How do I use it with a keyboard?
Tab goes to the five segments, then (on Ark UI, Vue, Svelte and Solid) the viewer itself, then Previous, Next and the toggle. The Left and Right arrows (reversed on a right-to-left page) move between stories from the viewer or from either button. A story is read out when you move by hand, never when the timer does.
Which carousel does it use?
select event; its own arrow keys are replaced by ours, so they follow the page's direction and announce the story.Stories that are not on show are marked inert and hidden from assistive technology on all of them. Swiping works on both, and the stories loop.Related
- Pro
Department Quote Wall Team
Culture and valuesFour departments of a farm-lease marketplace as bands: each names its department and headcount at the start and gives one display quote from someone in it at the end, split by a solid divider.
- Pro
Cohort Slider Team
Culture and valuesForty-three people of a payroll service by the year they joined: a slider labelled The year you joined, a group of avatars for who came that year, and two quotes from that year in cells split by a hairline.
- Pro
Centred Carousel Team
Carousels and reelsSeven people of a ceramics studio in a centred snap carousel: the middle card is full size and raised, its neighbours shrink and mute, and only the middle card is read and focusable.
- Pro
Values Slider About
Culture and valuesA carousel of six values for an HR platform, one per slide in a band from rail to rail: the value, a practice example and one figure side by side, with Previous and Next buttons, a counter and dots.
- Pro
Quote Carousel Testimonials with Next-Speaker Preview
Carousels and decksA centred, looping carousel of large customer quotes in a card in a card, whose Previous and Next buttons preview who speaks next, with the neighbour's avatar and first name.
- Pro
Gallery Spotlight Team
Carousels and reelsSix people of a lab-booking platform as a gallery: one person in a framed panel (an initials plate, name, role, quote, bio and three figures) over a filmstrip of six avatars that picks who is in focus.