Block 269 of 297
Mesh Gradient CTA
A rounded call-to-action panel over a slowly morphing, grainy four-color mesh gradient in your brand colors.
- Puck key
- MeshGradientCtaBlock
- Export
- meshGradientCtaBlock
- React component
- <MeshGradientCta />
- Files
- components/puck/mesh-gradient-cta-block.tsx
- components/puck/mesh-gradient-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 inset in a white section, with copy and two pill buttons over a grainy, slowly shifting gradient blended from four corner colors. A Text color switch flips the copy, buttons and scrim between light and dark. Without WebGPU, the panel shows a CSS four-corner gradient in the same colors.
- A volunteer sign-up or donation ask near the bottom of a page
- Seasonal campaign promos between content sections
- A membership or event registration prompt on a program page
Writing the content
- Match Text color to your palette: Light needs four deep colors, Dark needs four pale ones.
- Each color field names its corner (top left, top right, bottom left, bottom right); place your strongest brand color top left, where the copy starts.
- Keep the Body to two or three sentences; the copy column stops at a comfortable reading width.
- Leave Secondary button text blank to show a single action.
Accessibility
- The gradient canvas is aria-hidden, and a scrim behind the copy side of the panel helps hold contrast (check WCAG 1.4.3 with your chosen colors).
- Reduced-motion visitors get a single still frame; animation pauses off screen and when the tab is hidden.
- Buttons are real links with a 44px minimum height and a focus outline that matches the chosen text color.
Customizing the code
- Needs vgpu and the mesh-gradient-cta.client.tsx island; the anchor() function sets how far each color orbits, and the 0.06 grain value in fs_main controls film grain.
- Change the rounded-3xl and shadow-xl classes on the panel, or the TONES map, to fit your card style.
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
- Color 1 (top left)text
- Color 2 (top right)text
- Color 3 (bottom left)text
- Color 4 (bottom right)text
- Text colorradio
- Motionradio