Block 282 of 297
Grain Blob CTA
Call-to-action panel over drifting brand-color blobs and heavy film grain, with light or dark text.
- Puck key
- GrainBlobCtaBlock
- Export
- grainBlobCtaBlock
- React component
- <GrainBlobCta />
- Files
- components/puck/grain-blob-cta-block.tsx
- components/puck/grain-blob-cta.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 rounded call-to-action panel over three soft color blobs that drift slowly under a layer of visible film grain. The heading and body take the left side and the buttons and fine print sit at the lower right on desktop. On phones everything stacks in one column, with the buttons going full width.
- Monthly giving or membership sign-up prompts
- Event registration calls at the end of a landing page
- A newsletter or volunteer ask with a reassurance line
Writing the content
- Set Text to match Background color: Light for dark backgrounds, Dark for pale ones. The block does not choose for you.
- Fine print is meant for one reassurance line, like "Change or cancel anytime"; it hides when blank.
- Grain offers Subtle, Film or Heavy. Heavy suits bold, poster-like pages; Subtle is safer behind longer copy.
- Give each Blob color enough difference from the background that the shapes read.
Accessibility
- A scrim behind the copy, tinted to the chosen text tone, helps hold contrast over the blobs; check WCAG 1.4.3 with your colors.
- The grain re-rolls about 16 times a second, but with reduced motion on, visitors see one still frame. Animation also pauses off screen.
- Buttons are links with a 48px minimum height and a focus outline.
Customizing the code
- Needs vgpu and grain-blob-cta.client.tsx. Blob paths and sizes are the three blob() calls in fs_main, and the 16.0 in floor(t * 16.0) sets how often grain refreshes.
- The fallback grain is the GRAIN_SVG tile, and the TONES map holds the light and dark text and button classes.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtextarea
- Heading levelselect
- Bodytextarea
- Primary button texttext
- Primary button linktext
- Secondary button texttext
- Secondary button linktext
- Fine printtext
- Textradio
- Background colortext
- Blob color 1text
- Blob color 2text
- Blob color 3text
- Grainradio
- Motionradio