Skip to content

Commit 770d920

Browse files
authored
Merge pull request #76 from pras75299/feat/hero-radial-burst
feat(registry): add hero-radial-burst block with time-of-day themes
2 parents 3d87a51 + c5230ed commit 770d920

17 files changed

Lines changed: 2105 additions & 4 deletions

File tree

apps/www/components/ui/hero-radial-burst.tsx

Lines changed: 796 additions & 0 deletions
Large diffs are not rendered by default.

apps/www/config/components.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {
2929
LucideScanLine,
3030
LucideScrollText,
3131
LucideShield,
32+
LucideSparkle,
3233
LucideSparkles,
3334
LucideSquare,
3435
LucideStars,
@@ -101,6 +102,7 @@ const iconMap = {
101102
LucideScanLine,
102103
LucideScrollText,
103104
LucideShield,
105+
LucideSparkle,
104106
LucideSparkles,
105107
LucideSquare,
106108
LucideStars,
@@ -3421,6 +3423,39 @@ const componentDefinitions = [
34213423
}
34223424
],
34233425
"usageCode": "import { FlowFieldHero } from \"@/components/ui/hero-flow-field\";\n\nexport default function Hero() {\n return (\n <FlowFieldHero theme=\"dark\">\n <span className=\"mb-5 inline-flex items-center gap-2 rounded-full border border-white/15 bg-white/5 px-3 py-1 font-mono text-[10px] uppercase tracking-[0.2em] text-white/70 backdrop-blur\">\n <span\n aria-hidden\n className=\"h-1.5 w-1.5 rounded-full bg-sky-400 shadow-[0_0_10px_2px] shadow-sky-400/40\"\n />\n Field · scroll to flow\n </span>\n <h1 className=\"text-balance text-4xl font-semibold tracking-tight sm:text-6xl\">\n Momentum you can see.\n </h1>\n <p className=\"mt-5 max-w-xl text-pretty text-base text-white/65 sm:text-lg\">\n A canvas flow field of streamlines that bend and wave with the page\n scroll position. Scroll-driven, not cursor-driven — no external deps.\n </p>\n <div className=\"mt-9 flex flex-wrap items-center justify-center gap-3\">\n <button\n type=\"button\"\n className=\"group inline-flex h-11 cursor-pointer items-center gap-2 rounded-full bg-white px-6 text-sm font-medium text-black transition-transform duration-200 hover:-translate-y-px\"\n >\n <span>Get started</span>\n <span aria-hidden className=\"transition-transform duration-200 group-hover:translate-x-0.5\">\n →\n </span>\n </button>\n <button\n type=\"button\"\n className=\"inline-flex h-11 cursor-pointer items-center gap-2 rounded-full border border-white/15 px-6 font-mono text-xs uppercase tracking-[0.18em] text-white/85 backdrop-blur transition-colors hover:bg-white/5\"\n >\n View source\n </button>\n </div>\n </FlowFieldHero>\n );\n}"
3426+
},
3427+
{
3428+
"slug": "hero-radial-burst",
3429+
"name": "Radial Burst Hero",
3430+
"description": "A Stripe-style hero block: an interactive fiber-optic radial burst on canvas. Fine glowing rays stream out of a bottom-center origin in a wide fan, each one continuously growing, over-extending, fading, and regenerating with fresh angle/length/speed/opacity, with a single glowing dot riding each fiber's tip. Hovering the middle or tip of a fiber makes it (and its neighbours) brighten, stretch, and bend toward the cursor, then ease back to their drift; the dense zone near the origin stays calm. The burst sits in a short lower band, masked so it fades out below the headline. Ships with six time-of-day themes (Pre-dawn, Sunrise, Daytime, Dusk, Sunset, Night) and an in-block switcher; the background crossfades and the burst colors lerp between themes. devicePixelRatio-aware, keyboard-accessible switcher, honors `prefers-reduced-motion` (renders a calm static frame), and uses `motion` for the intro, theme blend, and dropdown.",
3431+
"icon": "LucideSparkle",
3432+
"category": "Hero",
3433+
"kind": "block",
3434+
"addedAt": "2026-06-02",
3435+
"props": [
3436+
{
3437+
"name": "defaultTheme",
3438+
"type": "\"pre-dawn\" | \"sunrise\" | \"daytime\" | \"dusk\" | \"sunset\" | \"night\"",
3439+
"default": "\"night\"",
3440+
"description": "Initial time-of-day theme. Re-synced if it changes (e.g. from a site theme toggle); the in-block switcher overrides until then."
3441+
},
3442+
{
3443+
"name": "title",
3444+
"type": "ReactNode",
3445+
"description": "Headline content. Defaults to \"The backbone of global commerce\"."
3446+
},
3447+
{
3448+
"name": "burstProps",
3449+
"type": "{ className?: string; density?: number; interactive?: boolean }",
3450+
"description": "Forwarded to the canvas burst layer (`RadialBurst`). `density` scales ray count (0.4–2); set `interactive` to false to disable pointer reactivity."
3451+
},
3452+
{
3453+
"name": "className",
3454+
"type": "string",
3455+
"description": "Classes for the outer `<section>`."
3456+
}
3457+
],
3458+
"usageCode": "import { RadialBurstHero } from \"@/components/ui/hero-radial-burst\";\n\nexport default function Hero() {\n return (\n <RadialBurstHero\n defaultTheme=\"night\"\n title={\n <>\n The backbone\n <br />\n of global commerce\n </>\n }\n />\n );\n}"
34243459
}
34253460
] satisfies ComponentDefinition[];
34263461

apps/www/config/demos.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ import { LogoMarqueeHero } from "@/components/ui/hero-logo-marquee";
7979
import { MagneticLettersHero } from "@/components/ui/hero-magnetic-letters";
8080
import { TerminalHero } from "@/components/ui/hero-terminal";
8181
import { FlowFieldHero } from "@/components/ui/hero-flow-field";
82+
import { RadialBurstHero } from "@/components/ui/hero-radial-burst";
8283
import { motion } from "motion/react";
8384
import { useRef, useState } from "react";
8485
import {
@@ -3834,4 +3835,16 @@ export const componentDemos: Record<string, DemoComponent> = {
38343835
"hero-flow-field": ({ theme = "dark" }) => (
38353836
<FlowFieldHero theme={theme as "light" | "dark"} />
38363837
),
3838+
"hero-radial-burst": ({ theme = "dark" }) => (
3839+
<RadialBurstHero
3840+
defaultTheme={theme === "light" ? "daytime" : "night"}
3841+
title={
3842+
<>
3843+
The backbone
3844+
<br />
3845+
of global commerce
3846+
</>
3847+
}
3848+
/>
3849+
),
38373850
};

apps/www/config/docs-scenarios.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,5 +1126,10 @@ export const docsScenarios: Record<string, ComponentDocs> = {
11261126
"slug": "hero-flow-field",
11271127
"overview": "Scroll-driven canvas flow field. Particles flow along a summed-sine vector field and leave fading comet trails; the field's phase tracks `window.scrollY`, so the streamlines bend and wave as the page scrolls, with a slow idle drift keeping it alive at rest. A centered radial scrim lifts text contrast over the field, and the `theme` prop switches the whole palette (field, scrim, text, CTAs) between light and dark. `FlowFieldBackground` is a separate export and can be reused under any composition.",
11281128
"scenarios": []
1129+
},
1130+
"hero-radial-burst": {
1131+
"slug": "hero-radial-burst",
1132+
"overview": "An interactive fiber-optic burst rises from a bottom-center origin that touches the bottom edge: fine rays fan across the upper semicircle (longest near vertical, forming a soft dome), each a base-bright→tip-faint gradient drawn as a soft wide glow pass plus a crisp core, with a single glowing dot riding its tip. Every ray continuously grows, slightly over-extends, fades, and respawns with a fresh angle, length, speed, and opacity, so the loop is seamless with no global reset. Hovering the middle or tip of a fiber makes it and its neighbours brighten, stretch, and bend toward the cursor before easing back; the dense zone near the origin does not react. The burst is kept to a short lower band, masked so it never reaches the headline above. Six time-of-day themes — Pre-dawn, Sunrise, Daytime, Dusk, Sunset, Night — are selectable from an in-block dropdown; switching crossfades the background gradient and eases the burst colors between palettes. `RadialBurst` is exported separately for reuse under your own layout.",
1133+
"scenarios": []
11291134
}
11301135
};

apps/www/public/r/hero-radial-burst.json

Lines changed: 21 additions & 0 deletions
Large diffs are not rendered by default.

apps/www/public/r/registry.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,25 @@
11971197
"target": "components/ui/magnetic-text.tsx"
11981198
}
11991199
]
1200+
},
1201+
{
1202+
"name": "hero-radial-burst",
1203+
"type": "registry:ui",
1204+
"title": "Radial Burst Hero",
1205+
"description": "A Stripe-style hero block: an interactive fiber-optic radial burst on canvas. Fine glowing rays stream out of a bottom-center origin in a wide fan, each one continuously growing, over-extending, fading, and regenerating with fresh angle/length/speed/opacity, with a single glowing dot riding each fiber's tip. Hovering the middle or tip of a fiber makes it (and its neighbours) brighten, stretch, and bend toward the cursor, then ease back to their drift; the dense zone near the origin stays calm. The burst sits in a short lower band, masked so it fades out below the headline. Ships with six time-of-day themes (Pre-dawn, Sunrise, Daytime, Dusk, Sunset, Night) and an in-block switcher; the background crossfades and the burst colors lerp between themes. devicePixelRatio-aware, keyboard-accessible switcher, honors `prefers-reduced-motion` (renders a calm static frame), and uses `motion` for the intro, theme blend, and dropdown.",
1206+
"dependencies": [
1207+
"motion",
1208+
"lucide-react",
1209+
"clsx",
1210+
"tailwind-merge"
1211+
],
1212+
"files": [
1213+
{
1214+
"path": "components/ui/hero-radial-burst.tsx",
1215+
"type": "registry:component",
1216+
"target": "components/ui/hero-radial-burst.tsx"
1217+
}
1218+
]
12001219
}
12011220
]
12021221
}

apps/www/public/registry.json

Lines changed: 83 additions & 0 deletions
Large diffs are not rendered by default.

apps/www/public/registry/changelogs.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,5 +669,37 @@
669669
"Initial release: standalone per-letter cursor-tracking text component. Wraps any string with springs that lean toward the pointer; falloff is linear inside `radius`, zero outside; capped at `strength`. Optional `animateEntry` staggers letters in on mount. `as` prop lets it render as h1/h2/p/span. aria-label on the wrapper + aria-hidden on every glyph keep screen readers from spelling out the word."
670670
]
671671
}
672+
],
673+
"hero-radial-burst": [
674+
{
675+
"version": "2.0.1",
676+
"date": "2026-06-05",
677+
"changes": [
678+
"Theme switcher now uses a plain button-menu pattern (disclosure button + `aria-current` on the active theme) instead of `role=\"listbox\"`/`role=\"option\"`, which had promised listbox keyboard semantics the widget did not implement."
679+
]
680+
},
681+
{
682+
"version": "2.0.0",
683+
"date": "2026-06-03",
684+
"changes": [
685+
"Rewrote the burst as a continuous, seamlessly looping fiber-optic engine: rays grow, over-extend, fade, and respawn with fresh angle/length/speed/opacity instead of a one-time reveal.",
686+
"Added pointer reactivity — fibers near the cursor (middle→tip only) brighten, stretch, and bend toward it, then ease back; the dense zone near the origin stays calm.",
687+
"Each fiber now carries a single glowing dot fixed at its tip instead of dots travelling along it.",
688+
"Softened the origin: fibers fade to near-zero through the dense convergence zone and peak only after fanning apart, plus a diffuser core bloom, so the bottom-center no longer blows out to white.",
689+
"Raised the fiber count for a fuller, more balanced spread.",
690+
"Increased overall fiber count and shortened the burst (~100px), with the origin touching the bottom edge.",
691+
"Widened the fan horizontally and lengthened the side fibers so it spreads to the full width along the bottom (height unchanged).",
692+
"Constrained the burst to a masked lower band so it no longer reaches the headline.",
693+
"Removed the count-up stat row; the hero now shows the headline only.",
694+
"Added a `burstProps.interactive` flag to toggle pointer reactivity."
695+
]
696+
},
697+
{
698+
"version": "1.0.0",
699+
"date": "2026-06-02",
700+
"changes": [
701+
"Initial release."
702+
]
703+
}
672704
]
673705
}

apps/www/public/registry/hero-radial-burst.json

Lines changed: 83 additions & 0 deletions
Large diffs are not rendered by default.

apps/www/public/registry/index.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"hero-magnetic-letters",
6464
"hero-terminal",
6565
"hero-flow-field",
66-
"magnetic-text"
66+
"magnetic-text",
67+
"hero-radial-burst"
6768
]
6869
}

0 commit comments

Comments
 (0)