A long-form heading + body with a styled `::selection` — drag your cursor across it and the highlight is part of the brand. The demo auto-cycles a synthetic selection.
import SelectionColor from '@crazygl/hero-selection-color';
export default function Page() {
return (
<SelectionColor
heading="Drag across this line to see how good a selection can look."
selectionBg="#ffd86b"
selectionFg="#0a0c14"
/>
);
}heading, body.selectionBg, selectionFg.textColor, bodyColor, fontSize, headingFontFamily, headingFontWeight.transparentBackground, bgColor.npm install @crazygl/hero-selection-colorThe component takes the same props you see in the live customizer on the right — every default ships poster-quality.
import SelectionColor from '@crazygl/hero-selection-color';
export default function Landing() {
return (
<SelectionColor />
);
}The wrapper renders static HTML on the server and only initialises the canvas after hydration, so search engines see your copy.
// app/page.tsx — works in SSR-first frameworks (Next, Remix, Astro, etc.)
'use client';
import SelectionColor from '@crazygl/hero-selection-color';
export default function Page() {
return (
<section>
<SelectionColor
heading="Say hi."
subheading="Your new hero."
/>
<article>
<h2>Welcome</h2>
<p>Your content keeps its own voice below the hero.</p>
</article>
</section>
);
}