Block 293 of 297
Hero Slideshow
Full-bleed photo slides that crossfade with a slow Ken Burns push, staggered copy, a counter and optional pausable rotation.
- Puck key
- HeroSlideshowBlock
- Export
- heroSlideshowBlock
- React component
- <HeroSlideshow />
- Files
- components/puck/hero-slideshow-block.tsx
- components/puck/hero-slideshow.client.tsx
- Dependencies
- gsap
- License
- MIT (GSAP has its own license)
About this block
When to use it, how to write for it, and what to change in the code.
What it's for
A full-bleed hero of up to eight photo slides, each with its own eyebrow, heading, body and button. Slides crossfade with a slow zoom on the photo while the copy rises in. A counter, segmented progress bar and arrows run along the bottom. Without JavaScript the slides become a swipeable row.
- A home page rotating between a campaign, a program and an event
- Featured stories at the top of a news or impact page
- Seasonal highlights for a park district or venue
Writing the content
- Use photos at least 1920px wide, with key details toward the top; the lower part sits behind the text.
- Heading level applies to every slide's heading; H2 is usually right.
- Slideshow name is read aloud by screen readers only, so describe the set, such as "Featured stories".
- Advance on its own is off by default; if you turn it on, give slides with longer body text 7 or 10 seconds.
Accessibility
- Auto-advance pauses on hover and keyboard focus, adds a Pause button, and never runs for visitors who ask for reduced motion (WCAG 2.2.2).
- Each progress segment is a 44px-tall "Show slide" button, arrow keys step slides, and slides not showing are inert so focus can't land in them.
- A live region announces slide changes when rotation is stopped, and each photo uses its Image description as alt text.
Customizing the code
- Requires gsap and hero-slideshow.client.tsx. The photo zoom is the scale: 1.1 tween, and the crossfade is duration 1.2 with power2.inOut.
- Two neutral-950 gradient overlays protect the text; adjust their opacity stops for brighter photos.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Slideshow nametext
- Slidesarray
- Heading levelselect
- Advance on its ownradio
- Time per slideselect
- Heightselect