Block 285 of 297
Fireflies Banner
Evening-event banner with a dusk sky, tree line and blinking fireflies, plus event details and a call to action.
- Puck key
- FirefliesBannerBlock
- Export
- firefliesBannerBlock
- React component
- <FirefliesBanner />
- Files
- components/puck/fireflies-banner-block.tsx
- components/puck/fireflies-banner.client.tsx
- Dependencies
- vgpu
- License
- MIT
About this block
When to use it, how to write for it, and what to change in the code.
What it's for
An evening-event banner with a dusk sky, a dark tree line along the bottom and fireflies that drift and blink. Event copy and buttons sit on the left, and a frosted panel of short facts (date, time, place, cost) sits on the right on desktop. On smaller screens the details panel moves below the copy, in two columns on tablets.
- Night hikes, firefly walks or star parties at a park
- Outdoor summer concerts or movie nights
- Seasonal evening program series
Writing the content
- Event details takes up to five Label and Value pairs; keep values short, such as "8:45 to 10:15 pm".
- Keep Sky color dark and Tree line color near black. The copy is white, and the trees anchor the bottom edge.
- Fireflies offers A few, Plenty or A swarm. A few suits text-heavy banners.
- Either button hides when its text field is blank.
Accessibility
- Event details are a description list, so screen readers hear each label with its value (WCAG 1.3.1).
- The firefly canvas and SVG tree line are aria-hidden. Reduced motion freezes the fireflies on one frame, and animation pauses off screen or in a hidden tab.
- Both links have a 44px minimum height and a white focus outline; Heading level runs H1 to H4.
Customizing the code
- Requires vgpu and fireflies-banner.client.tsx. Blink rhythm is the ph and blink lines inside fireflies(), and the core and halo terms set glow size.
- Swap the TREES path constant for a different silhouette, such as a skyline or ridgeline.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtextarea
- Heading levelselect
- Bodytextarea
- Event detailsarray
- Primary button texttext
- Primary button linktext
- Secondary link texttext
- Secondary linktext
- Sky colortext
- Horizon colortext
- Firefly colortext
- Tree line colortext
- Firefliesradio
- Motionradio