Hero Dithering

PreviousNext

Split-layout hero section with responsive dithering shader visuals, CTA content, and tech stack badges.

Default

AI SDK Agents

AI SDK Agents
Copy and Paste

Full-stack vercel ai sdk patterns for workflows, tool calling, and agent orchestration. Built with ai sdk v6 and shadcn/ui.

Next.jsNext.jsv16
AI SDKAI SDKv6

Configured Via Props

Composable hero

Cursor for
Marketing

Human-in-the-loop marketing copy software that helps teams draft, review, and ship high-converting campaigns with confidence.

Next.jsNext.jsv16
AI SDKAI SDKv6

Installation

pnpm dlx shadcn@latest add https://cult-ui.com/r/hero-dithering.json

Usage

import { HeroDitheringRoot, HeroDitheringContainer, HeroDitheringContent, HeroDitheringHeading, HeroDitheringDescription, HeroDitheringActions, HeroDitheringBadges, HeroDitheringVisual, HeroDitheringMobileVisual, } from "@/components/ui/hero-dithering"
export default function Page() { return ( <main className="min-h-screen"> <HeroDitheringRoot> <HeroDitheringContainer> <HeroDitheringContent> <HeroDitheringHeading /> <HeroDitheringDescription /> <HeroDitheringActions /> <div className="flex justify-center lg:justify-start" data-slot="hero-dithering-badges-wrap" > <HeroDitheringBadges /> </div> </HeroDitheringContent> <HeroDitheringVisual /> </HeroDitheringContainer> <HeroDitheringMobileVisual /> </HeroDitheringRoot> </main> ) }

What You Get

  • Split hero layout with copy and CTA on the left and shader visual on the right.
  • Memoized Dithering render path for stable re-renders.
  • Desktop and mobile shader variants with different scale/speed tuning.
  • Built-in badge row for highlighting stack metadata.
  • Works as a full-width section and can be dropped into landing pages directly.

API Reference

Exports

ExportTypeDescription
HeroDitheringRootHeroDitheringRootPropsContext provider and root section primitive
HeroDitheringContainerdiv primitiveMain hero grid wrapper
HeroDitheringContentdiv primitiveLeft-side content column primitive
HeroDitheringHeadingHeroDitheringHeadingPropsHeading block primitive (title + subtitle)
HeroDitheringDescriptionHeroDitheringDescriptionPropsDescription block primitive
HeroDitheringActionsHeroDitheringActionsPropsCTA wrapper primitive
HeroDitheringCTAHeroDitheringCTAPropsReusable CTA slot component
HeroDitheringBadgesHeroDitheringBadgesPropsReusable badge row primitive
HeroDitheringVisualHeroDitheringVisualPropsDesktop visual shader wrapper primitive
HeroDitheringMobileVisualHeroDitheringMobileVisualPropsMobile visual shader wrapper primitive
HeroDithering / defaultHeroDitheringPropsConvenience assembled version built from primitives
useHeroDithering() => HeroDitheringContextValueHook for context-driven custom composition

Props

HeroDitheringRoot owns shared defaults, normalized shader props, and composition state.

PropTypeDefaultDescription
srTitlestring"AI SDK Agents"Screen-reader-only heading text
titleReactNode"AI SDK Agents"First line of visible heading
subtitleReactNode"You can Copy & Paste"Second line of visible heading
descriptionReactNodebuilt-in marketing copySupporting paragraph content
showCtabooleantrueToggle CTA rendering
ctaPropsPartial<HeroDitheringCTAProps>built-in CTAOverride CTA label/link/target/rel/click handler
renderCta(defaultCta) => ReactNodeundefinedWrap or replace default CTA node
showBadgesbooleantrueToggle tech badges
techStackHeroDitheringTechItem[]Next.js + AI SDKBadge data source
renderBadge(tech, index, defaultBadge) => ReactNodeundefinedCustom badge rendering hook
desktopShaderPropsPartial<DitheringProps>built-in desktop shader settingsOverride desktop shader values
mobileShaderPropsPartial<DitheringProps>built-in mobile shader settingsOverride mobile shader values
classNamestringundefinedRoot section class override

Customization Patterns

Tune Dithering Colors and Pixel Density

Use shader override props without forking the component:

<HeroDitheringRoot desktopShaderProps={{ colorFront: "#006CFF", speed: 0.8, scale: 0.75, }} mobileShaderProps={{ colorFront: "#006CFF", speed: 0.7, }} > {/* compose primitives */} </HeroDitheringRoot>

Swap Hero Copy and CTA

Replace copy and CTA target via props:

<HeroDitheringRoot title="Composable Hero Dithering" subtitle="Ship branded launches faster" description="Reusable hero primitive with configurable visuals and slots." ctaProps={{ label: "Explore workflows", href: "/workflows", target: "_self", rel: undefined, }} > {/* compose primitives */} </HeroDitheringRoot>

Replace Badge Rendering

Use techStack + renderBadge for custom chips while preserving defaults:

<HeroDitheringRoot techStack={[ { name: "Next.js", version: "v16" }, { name: "AI SDK", version: "v6" }, { name: "Tailwind", version: "v4" }, ]} renderBadge={(tech, _index, defaultBadge) => tech.name === "AI SDK" ? ( <span className="rounded-b-full border px-3 py-1 text-xs font-semibold"> {tech.name} {tech.version} </span> ) : ( defaultBadge ) } > {/* compose primitives */} </HeroDitheringRoot>

Compose with Slot Primitives

Use primitive exports for custom layout composition:

<HeroDitheringRoot> <HeroDitheringContainer> <HeroDitheringContent> <HeroDitheringHeading /> <HeroDitheringDescription /> <HeroDitheringActions /> <HeroDitheringBadges /> </HeroDitheringContent> <HeroDitheringVisual desktopShaderProps={{ colorFront: "#00d2ff" }} /> </HeroDitheringContainer> <HeroDitheringMobileVisual /> </HeroDitheringRoot>

Performance Notes

  • Dithering is wrapped with memo to avoid unnecessary rerenders.
  • Mobile and desktop effects are rendered as separate sections so each layout can be tuned independently.
  • Keep the hero in client-rendered regions only ("use client" is required).

Accessibility Notes

  • Includes a screen-reader-only heading (sr-only) so page structure remains meaningful.
  • CTA link includes rel="noopener noreferrer" when opened in a new tab.
  • Ensure visible contrast remains sufficient if you change shader colors or text opacity.

Troubleshooting

Shader does not render

  • Confirm @paper-design/shaders-react is installed.
  • Verify this component runs in a client context.
  • Confirm parent containers are not clipping to zero height.

Layout looks crowded on small screens

  • Increase the mobile shader container height.
  • Reduce heading size classes or copy length.
  • Move badges under the fold for dense hero content.