Block 272 of 297
Spotlight Grid
Program cards over a GPU dot field that swells and takes on your accent color wherever the pointer moves.
- Puck key
- SpotlightGridBlock
- Export
- spotlightGridBlock
- React component
- <SpotlightGrid />
- Files
- components/puck/spotlight-grid-block.tsx
- components/puck/spotlight-grid.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
A dark section of numbered program cards, up to nine, over a dot-matrix field whose dots swell and take the accent color near the mouse. Cards sit one, two or three to a row by screen size, with a staggered offset on desktop. On touch screens, which have no hover, the spotlight drifts on its own.
- A programs or services overview for a nonprofit or agency
- Feature lists on a product or membership page
- Department or initiative directories that link to detail pages
Writing the content
- Use three, six or nine cards so rows fill evenly at three across; the field allows one to nine.
- Keep Description to one or two sentences so cards stay similar heights.
- Leave a card's Link blank and it renders as a plain panel instead of a link.
- Keep Background color dark; headings and card text are white.
Accessibility
- Card titles take the heading level one step below the section heading, keeping the outline nested (WCAG 1.3.1).
- Linked cards are single anchors with a visible focus outline; the card numbers are aria-hidden.
- With reduced motion on, visitors get a still dot field and no pointer tracking. The canvas stops animating when off screen.
Customizing the code
- Requires vgpu and spotlight-grid.client.tsx. Dot spacing is the 18 in pitch: 18 * dpr, and spotlight sizes come from the RADIUS map.
- The eyebrow, arrows and hover rings use Tailwind indigo-300; swap that family to match a new Spotlight color, and edit OFFSET to remove the stagger.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtextarea
- Heading levelselect
- Introtextarea
- Cardsarray
- Background colortext
- Dot colortext
- Spotlight colortext
- Spotlight sizeradio