# GodUI — Animated React UI Components for Design Engineers - Complete Documentation This file contains all documentation concatenated into a single file for easy consumption by LLMs. > GodUI is an open-source collection of animated UI components for React, built with TypeScript, Tailwind CSS, and Motion. Copy-paste, shadcn/ui-ready components for design engineers. ## Table of Contents This document includes all content from this project. Each section is separated by a horizontal rule (---) for easy parsing. --- # GodUI — UI Collection for Modern Interfaces URL: https://godui.design > An open-source collection of beautifully crafted motion components built with React, TypeScript, Tailwind CSS, Motion, and shadcn/ui. [GodUI](/)[Components](/docs/components)[Animated Icons](https://svg-animated-icons.vercel.app/) Search ⌘K [](https://github.com/LucasBassetti/godui) [Actively building — star us on GitHub](https://github.com/LucasBassetti/godui) ## UI Collection for Modern Interfaces An open-source collection of beautifully crafted motion components built with React, TypeScript, Tailwind CSS, Motion, and shadcn/ui. [Browse Components](/docs/components) --- # Agent Timeline Source: docs/components/ai/agent-timeline.mdx > A vertical timeline of agent steps with live status, a spring-filled connector, and collapsible reasoning or tool-output bodies that morph open. import { AgentTimelineDemo } from "@/components/demos/agent-timeline-demo"; Indexed 128 files across 6 packages. Changed the expiry check from < to <=. ); }`} > ### Installation Each `AgentStep` reflects a `status` (`pending`, `running`, `success`, `error`). Running steps pulse and the connector below fills as the step completes. Steps with children become collapsible — click to morph the body open. ### Usage ```tsx import { AgentTimeline, AgentStep } from "@/components/godui/agent-timeline"; ``` ```tsx Optional collapsible body. ``` ### Props #### AgentStep | Prop | Type | Default | Description | | ------------- | ------------------------------------------------- | --------- | ----------------------------------------- | | `status` | `"pending" \| "running" \| "success" \| "error"` | `"pending"` | Drives the node icon and connector fill. | | `title` | `ReactNode` | — | Step label. | | `meta` | `ReactNode` | — | Secondary label (duration, tool name). | | `children` | `ReactNode` | — | Collapsible body. Omit for a leaf step. | | `defaultOpen` | `boolean` | `false` | Start expanded. | | `last` | `boolean` | `false` | Hides the connector below the step. | --- # Conversation Thread Source: docs/components/ai/conversation-thread.mdx > A streaming AI chat surface — messages spring in, tokens reveal with a blinking caret, hover actions fade in, and the view auto-sticks to the latest message. import { ConversationThreadDemo } from "@/components/demos/conversation-thread-demo"; How do I center a div in 2026? ); }`} > ### Installation `ConversationThread` owns the scroll container: it stays pinned to the newest message until you scroll up, then reveals a **Jump to latest** pill. Each `ConversationMessage` springs in, aligns by `role`, and reveals hover actions. `StreamingText` reveals a string token-by-token and honors reduced motion. ### Usage ```tsx import { ConversationThread, ConversationMessage, StreamingText, } from "@/components/godui/conversation-thread"; ``` ```tsx Hi , onClick: copy }]} > Hello! ``` ### Props #### ConversationThread | Prop | Type | Default | Description | | ------------ | ----------------------------------------- | ----------- | -------------------------------------------- | | `variant` | `"bubbles" \| "document" \| "compact"` | `"bubbles"` | Layout style. | | `autoScroll` | `boolean` | `true` | Stick to the newest message when at bottom. | #### ConversationMessage | Prop | Type | Default | Description | | ----------- | --------------------------------- | ------- | ---------------------------------------- | | `role` | `"user" \| "assistant" \| "system"` | — | Determines alignment and tint. | | `name` | `string` | — | Author label. | | `avatar` | `ReactNode` | — | Avatar node. | | `timestamp` | `string` | — | Time label. | | `actions` | `MessageAction[]` | — | Hover actions (copy, regenerate, …). | | `streaming` | `boolean` | `false` | Shows a blinking caret while streaming. | #### StreamingText | Prop | Type | Default | Description | | -------- | ------------ | ------- | ------------------------------------ | | `text` | `string` | — | Full text to reveal. | | `chunk` | `number` | `2` | Characters revealed per tick. | | `speed` | `number` | `24` | Milliseconds between ticks. | | `onDone` | `() => void` | — | Fired when the full text is shown. | --- # Prompt Composer Source: docs/components/ai/prompt-composer.mdx > An AI input box with auto-growing textarea, attachment chips, an inline model picker, and a send button that morphs into a stop control while streaming. import { PromptComposerDemo } from "@/components/demos/prompt-composer-demo"; { setStreaming(true); setTimeout(() => setStreaming(false), 2200); }} onStop={() => setStreaming(false)} /> ); }`} > ### Installation The textarea auto-grows up to `maxRows`, then scrolls. Submit with the send button or ⌘/Ctrl + Enter. Drop or paste files to attach them as chips. While `isStreaming` is true, the send button cross-fades into a stop button. ### Usage ```tsx import { PromptComposer } from "@/components/godui/prompt-composer"; ``` ```tsx send(text, attachments)} /> ``` #### Controlled value ```tsx const [value, setValue] = useState(""); ; ``` ### Props | Prop | Type | Default | Description | | --------------------- | --------------------------------------------- | ---------------- | -------------------------------------------------- | | `value` | `string` | — | Controlled textarea value. | | `defaultValue` | `string` | `""` | Uncontrolled initial value. | | `onValueChange` | `(value: string) => void` | — | Fired on every keystroke. | | `onSend` | `(value, attachments) => void` | — | Fired on submit with the text + attachments. | | `isStreaming` | `boolean` | `false` | Morphs the send button into a stop button. | | `onStop` | `() => void` | — | Fired when stop is pressed while streaming. | | `variant` | `"comfortable" \| "compact" \| "minimal"` | `"comfortable"` | Visual density. | | `maxRows` | `number` | `8` | Rows before the textarea scrolls. | | `attachments` | `PromptAttachment[]` | — | Controlled attachment chips. | | `onAttachmentsChange` | `(attachments: PromptAttachment[]) => void` | — | Fired when attachments change. | | `models` | `string[]` | — | Enables the inline model picker. | | `model` | `string` | — | Selected model. | | `onModelChange` | `(model: string) => void` | — | Fired when a model is chosen. | --- # Prompt Suggestions Source: docs/components/ai/prompt-suggestions.mdx > Animated starter prompts for AI empty states — cards stagger in, lift on hover, and feed straight into the composer when chosen. import { PromptSuggestionsDemo } from "@/components/demos/prompt-suggestions-demo"; console.log(s.label)} /> ); }`} > ### Installation Suggestions stagger in with a spring, lift on hover, and support arrow-key navigation. Pair `onSelect` with a controlled `PromptComposer` to drop the chosen prompt into the input. Set `loading` to show shimmering skeletons. ### Usage ```tsx import { PromptSuggestions } from "@/components/godui/prompt-suggestions"; ``` ```tsx setValue(suggestion.label)} /> ``` ### Props | Prop | Type | Default | Description | | --------------- | --------------------------------- | -------- | ------------------------------------ | | `suggestions` | `PromptSuggestion[]` | — | Items to render. | | `onSelect` | `(suggestion) => void` | — | Fired when an item is chosen. | | `variant` | `"grid" \| "chips" \| "list"` | `"grid"` | Layout style. | | `loading` | `boolean` | `false` | Render shimmer skeletons. | | `skeletonCount` | `number` | `4` | Skeletons shown while loading. | --- # Source Citations Source: docs/components/ai/source-citations.mdx > Inline numbered citation pills that spring out a rich preview card on hover, plus a collapsible source list for AI answers. import { SourceCitationsDemo } from "@/components/demos/source-citations-demo";

Design systems standardize on OKLCH and Tailwind v4 .

); }`} >
### Installation `SourceCitation` renders a compact numbered pill inline with text; on hover or focus it springs out a preview card with the hostname, title, and snippet. `SourceList` renders the full source set as a footer, optionally collapsed behind a **+N more** toggle. ### Usage ```tsx import { SourceCitation, SourceList, } from "@/components/godui/source-citations"; ``` ```tsx

Answer text.

``` ### Props #### SourceCitation | Prop | Type | Default | Description | | -------- | ---------------- | ------- | ---------------------------- | | `index` | `number` | — | Number rendered in the pill. | | `source` | `CitationSource` | — | Title, url, snippet, favicon.| #### SourceList | Prop | Type | Default | Description | | -------------- | ------------------ | ------- | ------------------------------------ | | `sources` | `CitationSource[]` | — | Sources to list. | | `collapsible` | `boolean` | `true` | Collapse extras behind a toggle. | | `previewCount` | `number` | `3` | Shown before **+N more**. | --- # Voice Orb Source: docs/components/ai/voice-orb.mdx > A Siri-style audio-reactive orb that breathes when idle, pulses while listening, and swells with the voice as it speaks. import { VoiceOrb } from "@godui/components"; import { VoiceOrbDemo } from "@/components/demos/voice-orb-demo"; ; }`} > ### Installation A rotating rainbow corona blooms behind a glassy core. The core breathes on its own when `idle`; feed a live `amplitude` (`0`–`1`) and it swells with the voice while `speaking`, or pulses a ring while `listening`. All motion is paused under `prefers-reduced-motion`. ### Usage ```tsx import { VoiceOrb, useAudioAmplitude } from "@/components/godui/voice-orb"; ``` The bundled `useAudioAmplitude` hook turns a `MediaStream` into a smoothed `0`–`1` level you can hand straight to the orb. It returns `0` on the server or when no stream is attached, so it's safe to call unconditionally. ```tsx const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); const amplitude = useAudioAmplitude(stream); return ; ``` Driving it from an agent instead of a mic? Set `state="speaking"` and feed the output level from your TTS / realtime stream. ### Props | Prop | Type | Default | Description | | ----------- | --------------------------------------- | -------- | ----------------------------------------------------- | | `state` | `"idle" \| "listening" \| "speaking"` | `"idle"` | Conversation phase the orb visualizes. | | `amplitude` | `number` | `0` | Live audio level `0`–`1`; drives the swell and corona. | | `size` | `number` | `160` | Diameter in pixels. | `VoiceOrb` also forwards every standard `
` attribute to the root element. --- # Blueprint Grid Source: docs/components/backgrounds/blueprint-grid.mdx > A technical lattice — lines, dots, or a perspective floor — with a light sweep and cursor spotlight. import { BlueprintGrid } from "@godui/components"; The engineering-blueprint backdrop: a precise lattice with a diagonal light sweep traveling across it and a soft spotlight that follows the cursor. Choose ruled `lines`, a `dots` matrix, or a floor-fading `perspective` grid. Pure CSS. Drop it as the first child of a `relative overflow-hidden` container.

Built with precision

Move your cursor across the grid.

); }`} >

Built with precision

Move your cursor across the grid.

### Installation ### Usage ```tsx import { BlueprintGrid } from "@/components/godui/blueprint-grid";
``` The layer is `absolute inset-0 z-base`; parent must be `relative overflow-hidden`, content at `z-raised`+. Color defaults to `--color-border`. The sweep hides under `prefers-reduced-motion`; the static lattice remains. ### Examples #### Dots ); }`} >
#### Perspective ); }`} >
### Props | Prop | Type | Default | Description | | ---- | ---- | ------- | ----------- | | `variant` | `"lines" \| "dots" \| "perspective"` | `"lines"` | Grid style. | | `cellSize` | `number` | `32` | Cell size (px). | | `color` | `string` | `--color-border` | Line / dot color. | | `sweep` | `boolean` | `true` | Diagonal light sweep. | | `sweepDuration` | `number` | `8` | Seconds per sweep pass. | | `spotlight` | `boolean` | `true` | Cursor spotlight that lights up nearby cells (ignored for `perspective`). | | `spotlightColor` | `string` | `--color-primary` | Color the spotlit cells light up in. | | `spotlightRadius` | `number` | `200` | Spotlight radius (px). | Also accepts standard `div` attributes (e.g. `className`, `style`). --- # Decorative Background Source: docs/components/backgrounds/decorative-background.mdx > Full-bleed decorative backgrounds — radial and corner gradient washes. A full-bleed decorative wash. Drop it as the first child of a `relative overflow-hidden` container and your content sits above it. Pick a look below — 44 patterns ported from [PatternCraft](https://patterncraft.fun). The component itself just takes `background`, `backgroundImage`, and `backgroundSize`; the picker fills them in. ### Usage ```tsx import { DecorativeBackground } from "@/components/godui/decorative-background";
``` ### Props The component bakes the selected variant's full style. It takes no custom props — just the standard `div` attributes. | Prop | Type | Description | | ---- | ---- | ----------- | | `style` | `CSSProperties` | Supply your own background. Setting any background key (`background`, `backgroundImage`, `backgroundColor`, …) replaces the baked default entirely. | | `className` | `string` | Extra classes on the layer (it is `absolute inset-0 z-base`). | All other `div` attributes are forwarded. --- # Effect Background Source: docs/components/backgrounds/effect-background.mdx > Full-bleed effect backgrounds — radial glows, aurora dreams, and soft pastel washes. A full-bleed atmospheric layer. Drop it as the first child of a `relative overflow-hidden` container and your content sits above it. Pick a look below — 66 patterns ported from [PatternCraft](https://patterncraft.fun). The component itself just takes `background`, `backgroundImage`, and `backgroundSize`; the picker fills them in. ### Usage ```tsx import { EffectBackground } from "@/components/godui/effect-background";
``` ### Props The component bakes the selected variant's full style. It takes no custom props — just the standard `div` attributes. | Prop | Type | Description | | ---- | ---- | ----------- | | `style` | `CSSProperties` | Supply your own background. Setting any background key (`background`, `backgroundImage`, `backgroundColor`, …) replaces the baked default entirely. | | `className` | `string` | Extra classes on the layer (it is `absolute inset-0 z-base`). | All other `div` attributes are forwarded. --- # Flow Field Source: docs/components/backgrounds/flow-field.mdx > Particles streaming along an evolving noise vector field, leaving silky fading trails. import { FlowField } from "@godui/components"; Hundreds of particles ride an invisible, slowly-evolving current, leaving silky trails that fade behind them — generative, organic, hypnotic. It paints its own themed background, so drop it as the first child of a `relative` container and let your content sit above it.

Generative by default

Currents you never see twice.

); }`} >

Generative by default

Currents you never see twice.

### Installation ### Usage ```tsx import { FlowField } from "@/components/godui/flow-field";
``` The layer is `absolute inset-0 z-base`; parent must be `relative`, content at `z-raised`+. It paints its own background from `--color-background` and draws trails in `color` (default `--color-primary`); both track light/dark. Caps DPR at 2, pauses off-screen and on hidden tabs, and renders a frozen still under `prefers-reduced-motion`. ### Examples #### Long trails Lower `fade` for longer, silkier streaks. ); }`} >
### Props | Prop | Type | Default | Description | | ---- | ---- | ------- | ----------- | | `particleCount` | `number` | `900` | Number of particles (auto-scaled to area). | | `noiseScale` | `number` | `0.0016` | Field scale — smaller is broader/smoother. | | `speed` | `number` | `1` | Flow speed multiplier. | | `color` | `string` | `--color-primary` | Trail color. | | `fade` | `number` | `0.06` | Trail fade per frame, `0`–`1` (lower = longer trails). | Also accepts standard `div` attributes (e.g. `className`, `style`). --- # Geometric Background Source: docs/components/backgrounds/geometric-background.mdx > Full-bleed geometric backgrounds — grids, dashed grids, diagonal crosses, and masked fades. A full-bleed geometric layer. Drop it as the first child of a `relative overflow-hidden` container and your content sits above it. Pick a look below — 99 patterns ported from [PatternCraft](https://patterncraft.fun). The component itself just takes `background`, `backgroundImage`, and `backgroundSize`; the picker fills them in. ### Usage ```tsx import { GeometricBackground } from "@/components/godui/geometric-background";
``` ### Props The component bakes the selected variant's full style. It takes no custom props — just the standard `div` attributes. | Prop | Type | Description | | ---- | ---- | ----------- | | `style` | `CSSProperties` | Supply your own background. Setting any background key (`background`, `backgroundImage`, `backgroundColor`, …) replaces the baked default entirely. | | `className` | `string` | Extra classes on the layer (it is `absolute inset-0 z-base`). | All other `div` attributes are forwarded. --- # Gradient Background Source: docs/components/backgrounds/gradient-background.mdx > Full-bleed gradient backgrounds — radial glows, aurora washes, and depth fades. A full-bleed gradient layer. Drop it as the first child of a `relative overflow-hidden` container and your content sits above it. Pick a look below — 48 gradients ported from [PatternCraft](https://patterncraft.fun). The component itself just takes `background`, `backgroundImage`, and `backgroundSize`; the picker fills them in. ### Usage ```tsx import { GradientBackground } from "@/components/godui/gradient-background";
``` ### Props The component bakes the selected variant's full style. It takes no custom props — just the standard `div` attributes. | Prop | Type | Description | | ---- | ---- | ----------- | | `style` | `CSSProperties` | Supply your own background. Setting any background key (`background`, `backgroundImage`, `backgroundColor`, …) replaces the baked default entirely. | | `className` | `string` | Extra classes on the layer (it is `absolute inset-0 z-base`). | All other `div` attributes are forwarded. --- # Light Rays Source: docs/components/backgrounds/light-rays.mdx > Volumetric god-rays that slowly sweep and breathe, with optional film grain. Pure CSS. import { LightRays } from "@godui/components"; A soft fan of volumetric light rays beams down from above, slowly sweeping and breathing in intensity, finished with a layer of film grain. Cinematic and warm — the spotlight-from-the-heavens hero. Pure CSS. Drop it as the first child of a `relative overflow-hidden` container.

Step into the light

God-rays that gently breathe.

); }`} >

Step into the light

God-rays that gently breathe.

### Installation ### Usage ```tsx import { LightRays } from "@/components/godui/light-rays";
``` The layer is `absolute inset-0 z-base`; parent must be `relative overflow-hidden`, content at `z-raised`+. Color defaults to `--color-primary`. The sweep stops under `prefers-reduced-motion`; the static fan remains. ### Examples #### Warm ); }`} >
### Props | Prop | Type | Default | Description | | ---- | ---- | ------- | ----------- | | `rayCount` | `number` | `14` | Number of rays in the fan. | | `color` | `string` | `--color-primary` | Ray color. | | `speed` | `number` | `1` | Sweep speed multiplier. | | `angle` | `number` | `0` | Base angle (deg) the fan points from. | | `intensity` | `number` | `0.6` | Overall ray opacity, `0`–`1`. | | `grain` | `number` | `0.05` | Film-grain amount, `0`–`1` (`0` disables it). | Also accepts standard `div` attributes (e.g. `className`, `style`). --- # Liquid Metaballs Source: docs/components/backgrounds/liquid-metaballs.mdx > Gooey blobs that drift, collide, and merge under an SVG goo filter — with a cursor blob. import { LiquidMetaballs } from "@godui/components"; Soft blobs of color drift across the surface and fuse into one gooey mass wherever they meet, courtesy of an SVG goo filter. An extra blob follows the cursor and merges with the rest. Playful and organic. Drop it as the first child of a `relative` container.

Fluid by nature

Move your cursor to stir the goo.

); }`} >

Fluid by nature

Move your cursor to stir the goo.

### Installation ### Usage ```tsx import { LiquidMetaballs } from "@/components/godui/liquid-metaballs";
``` The layer is `absolute inset-0 z-base`; parent must be `relative`, content at `z-raised`+. The goo filter id is per-instance, so multiple metaball backgrounds coexist safely. Pauses off-screen and on hidden tabs; freezes under `prefers-reduced-motion`. ### Examples #### Extra gooey Raise `gooeyness` and `blobCount`. ); }`} >
### Props | Prop | Type | Default | Description | | ---- | ---- | ------- | ----------- | | `blobCount` | `number` | `7` | Number of floating blobs. | | `colors` | `string[]` | indigo/violet/pink/cyan | Blob colors (cycled). | | `speed` | `number` | `1` | Drift speed multiplier. | | `gooeyness` | `number` | `16` | Goo strength (blur stdDeviation). | | `interactive` | `boolean` | `true` | A blob follows the cursor (adds a pointer listener). | Also accepts standard `div` attributes (e.g. `className`, `style`). --- # Pixel Grid Source: docs/components/backgrounds/pixel-grid.mdx > A grid of squares that flicker their opacity — as an automatic animated background, or revealed only under the cursor. import { PixelGrid } from "@godui/components"; A field of small squares that flicker their opacity on a loop. It has two modes. With `interactive={false}` the whole field flickers on its own — an automatic animated background. With `interactive`, only the squares within `interactionRadius` of the cursor animate; the rest are hidden or held at a static dim, depending on `cursorReveal`. Drop it as the first child of a `relative overflow-hidden` container; your content sits above it. The square color defaults to the `--color-foreground` theme token and re-resolves on theme change, so it tracks light and dark automatically. ); }`} >
### Installation ### Usage ```tsx import { PixelGrid } from "@/components/godui/pixel-grid"; ``` `PixelGrid` is absolutely positioned and fills its nearest positioned ancestor, so that parent must be `relative`. Add `overflow-hidden` to keep the edges clean. ```tsx
``` ### Examples #### Cursor reveal Set `interactive` so only the squares within `interactionRadius` of the cursor animate. With the default `cursorReveal="hidden"`, the rest stay invisible — a spotlight that follows the pointer.

Move your cursor across the grid

); }`} >

Move your cursor across the grid

#### Cursor reveal over a dim field `cursorReveal="dim"` keeps the squares outside the radius visible at a static low opacity, so the cursor lights up an already-present grid.

Move your cursor across the grid

); }`} >

Move your cursor across the grid

#### Custom color Pass any CSS color string to `color` to override the theme token. ); }`} >
#### Dense grid Smaller `squareSize` and `gridGap` pack the field tighter. ); }`} >
### Props | Prop | Type | Default | Description | | ---- | ---- | ------- | ----------- | | `squareSize` | `number` | `4` | Side length (px) of each square. | | `gridGap` | `number` | `6` | Gap (px) between squares. | | `flickerChance` | `number` | `0.3` | Per-second probability a square re-rolls its opacity. | | `color` | `string` | `--color-foreground` | Square color, any CSS color string. Defaults to the theme token. | | `maxOpacity` | `number` | `0.3` | Upper bound on square opacity (0–1). | | `interactive` | `boolean` | `true` | `false` flickers the whole field automatically; `true` animates only squares within the cursor radius. | | `interactionRadius` | `number` | `120` | Radius (px) of the cursor reveal. | | `interactionStrength` | `number` | `1` | How strongly the cursor reveals squares within the radius (0–1). | | `cursorReveal` | `"hidden" \| "dim"` | `"hidden"` | How squares outside the radius render in interactive mode — invisible, or a static dim. | | `width` | `number` | — | Fixed width (px). Defaults to filling the parent. | | `height` | `number` | — | Fixed height (px). Defaults to filling the parent. | Also accepts standard `div` attributes (e.g. `className`, `style`). Honors `prefers-reduced-motion`: the flicker animation pauses and a single static frame is drawn instead. --- # Topographic Drift Source: docs/components/backgrounds/topographic-drift.mdx > Slowly drifting topographic contour lines — a living elevation map drawn with marching squares. import { TopographicDrift } from "@godui/components"; Contour lines of an imaginary landscape, slowly rising and falling as the terrain beneath them evolves. Editorial, cartographic, and calm — drawn with marching squares on one Canvas. Drop it as the first child of a `relative` container.

Chart the unknown

Terrain that never stops shifting.

); }`} >

Chart the unknown

Terrain that never stops shifting.

### Installation ### Usage ```tsx import { TopographicDrift } from "@/components/godui/topographic-drift";
``` The layer is `absolute inset-0 z-base`; parent must be `relative`, content at `z-raised`+. Color defaults to `--color-foreground` (tracks light/dark). Caps DPR at 2, pauses off-screen and on hidden tabs, and renders a static map under `prefers-reduced-motion`. ### Examples #### Dense More levels, finer terrain. ); }`} >
### Props | Prop | Type | Default | Description | | ---- | ---- | ------- | ----------- | | `lineCount` | `number` | `9` | Number of contour levels. | | `speed` | `number` | `1` | Drift speed multiplier. | | `color` | `string` | `--color-foreground` | Contour color. | | `noiseScale` | `number` | `0.004` | Field scale — smaller is broader terrain. | | `weight` | `number` | `1` | Contour line width (px). | Also accepts standard `div` attributes (e.g. `className`, `style`). --- # Warp Starfield Source: docs/components/backgrounds/warp-starfield.mdx > A depth starfield you fly through — cursor parallax and an optional hyperspace warp. import { WarpStarfield } from "@godui/components"; Stars stream toward you out of the dark, with the cursor gently steering the field for parallax. Flip on `warp` for a hyperspace jump where the stars stretch into streaks. Drop it as the first child of a `relative` container.

Reach the stars

Move your cursor to steer.

); }`} >

Reach the stars

Move your cursor to steer.

### Installation ### Usage ```tsx import { WarpStarfield } from "@/components/godui/warp-starfield";
``` The layer is `absolute inset-0 z-base`; parent must be `relative`, content at `z-raised`+. Star color defaults to `--color-foreground` (tracks light/dark — it reads on light surfaces too). Caps DPR at 2, pauses off-screen and on hidden tabs, and renders a static frame under `prefers-reduced-motion`. ### Examples #### Hyperspace ); }`} >
### Props | Prop | Type | Default | Description | | ---- | ---- | ------- | ----------- | | `starCount` | `number` | `400` | Number of stars (auto-scaled to area). | | `speed` | `number` | `1` | Forward speed multiplier. | | `depth` | `number` | `1.5` | Field depth — larger is deeper. | | `color` | `string` | `--color-foreground` | Star color. | | `warp` | `boolean` | `false` | Hyperspace mode — stars become streaks. | | `parallax` | `number` | `30` | Cursor parallax strength (px). | Also accepts standard `div` attributes (e.g. `className`, `style`). --- # Gooey FAB Source: docs/components/buttons/gooey-fab.mdx > A floating action button that gooey-morphs to extrude its satellite actions like liquid metaballs. import { GooeyFab } from "@godui/components"; The Gooey FAB extrudes a set of satellite actions from a single trigger, fused by an SVG metaball filter so they split apart like mercury. The trigger icon rotates from a plus into a cross as it opens. ( ); export function GooeyFabDemo() { return ( }, { label: "Share", icon: }, { label: "Delete", icon: }, ]} /> ); }`} > }, { label: "Share", icon: }, { label: "Delete", icon: }, ]} /> ### Installation ### Usage ```tsx import { GooeyFab } from "@/components/godui/gooey-fab"; ``` ```tsx , onClick: edit }, { label: "Share", icon: , onClick: share }, ]} /> ``` ### Props | Prop | Type | Default | Description | | ---- | ---- | ------- | ----------- | | `actions` | `GooeyFabAction[]` | — | Satellite actions (`icon`, `label`, `onClick`) | | `size` | `"sm" \| "md" \| "lg"` | `"md"` | Trigger and satellite size | | `direction` | `"up" \| "down" \| "left" \| "right"` | `"up"` | Direction the satellites extrude | | `open` | `boolean` | — | Controlled open state | | `defaultOpen` | `boolean` | `false` | Uncontrolled initial open state | | `onOpenChange` | `(open: boolean) => void` | — | Fires when the open state changes | | `triggerIcon` | `ReactNode` | plus → cross | Custom trigger icon | | `triggerLabel` | `string` | `"Open actions"` | Accessible trigger label | --- # Hold Confirm Button Source: docs/components/buttons/hold-confirm-button.mdx > Press and hold to confirm a destructive action — a radial fill commits at 100%, releasing early cancels. import { HoldConfirmButton } from "@godui/components"; The Hold Confirm Button replaces a confirmation dialog with a deliberate gesture: hold to fill the progress sweep, release early to cancel. It supports pointer and keyboard holds. console.log("deleted")}> Hold to delete ); }`} > Hold to delete ### Installation ### Usage ```tsx import { HoldConfirmButton } from "@/components/godui/hold-confirm-button"; ``` ```tsx Hold to delete ``` ### Examples #### Variants and duration Hold to delete Hold to publish ); }`} >
Hold to delete Hold to publish
### Props | Prop | Type | Default | Description | | ---- | ---- | ------- | ----------- | | `onConfirm` | `() => void` | — | Fires once the hold completes | | `variant` | `"destructive" \| "default"` | `"destructive"` | Visual style | | `size` | `"sm" \| "md" \| "lg"` | `"md"` | Padding and text size | | `duration` | `number` | `900` | ms the user must hold to confirm | | `holdingLabel` | `ReactNode` | `"Confirming…"` | Label while holding | | `confirmedLabel` | `ReactNode` | `"Confirmed"` | Label after confirming | --- # Magic Button Source: docs/components/buttons/magic-button.mdx > A pushable 3D button with rainbow edge animation and solid front face. import { MagicButton } from "@godui/components"; Push me Push me ); }`} >
Push me Push me
### Installation ### Usage ```tsx import { MagicButton } from "@/components/godui/magic-button"; ``` ```tsx Push me ``` ### Examples #### Sizes Small Medium Large ); }`} >
Small Medium Large
#### Without rainbow Set `rainbow={false}` for a static 3D edge that uses the variant color instead of the animated gradient. Push me Push me ); }`} >
Push me Push me
#### Disabled Push me; }`} > Push me ### Props | Prop | Type | Default | Description | | ---- | ---- | ------- | ----------- | | `variant` | `"default" \| "secondary"` | `"default"` | Front face color scheme | | `size` | `"sm" \| "default" \| "lg"` | `"default"` | Button padding and text size | | `rainbow` | `boolean` | `true` | Animate the 3D edge and shadow with a rainbow gradient | --- # Magnetic Button Source: docs/components/buttons/magnetic-button.mdx > A button whose content is magnetically pulled toward the cursor within a sensor range, springing back on exit. import { MagneticButton } from "@godui/components"; import { MagneticButtonDemo } from "@/components/demos/magnetic-button-demo"; Get started Star on GitHub Label stays centered ); }`} > ### Installation `MagneticButton` wraps the button in an invisible sensor. As the pointer moves inside that area, the button spring-translates toward the cursor by `strength`, and the label drifts a little further for a layered, parallax feel. On exit both spring back to rest. The pull is disabled under `prefers-reduced-motion`. ### Usage ```tsx import { MagneticButton } from "@/components/godui/magnetic-button"; ``` ```tsx Get started ``` #### Variants ```tsx Default Secondary Outline ``` Default Secondary Outline `} >
Default Secondary Outline
#### Sizes Small Medium Large `} >
Small Medium Large
#### Stronger pull and wider sensor `strength` controls how far the button follows the cursor (0–1); `range` adds invisible padding so the pull engages before the pointer reaches the edge. Pull me`} > Pull me #### Keep the label centered By default the label drifts a little further than the shell for parallax. Set `staticLabel` so the label rides with the button and stays centered — the whole button moves as one piece, with no drift. Parallax label Centered label `} >
Parallax label Centered label
### Props | Prop | Type | Default | Description | | ------------- | ----------------------------------------- | ----------- | ---------------------------------------------------------------- | | `variant` | `"default" \| "secondary" \| "outline"` | `"default"` | Visual style. | | `size` | `"sm" \| "md" \| "lg"` | `"md"` | Padding and text size. | | `strength` | `number` | `0.4` | How strongly the button follows the cursor (0–1). | | `range` | `number` | `0` | Invisible sensor padding in px around the button. | | `staticLabel` | `boolean` | `false` | Keep the label centered in the button (rides with the shell, no drift). | `MagneticButton` also forwards every standard ` ``` #### Direct call ```tsx import { confetti } from "@/components/godui/confetti"; confetti({ particleCount: 200, spread: 120 }); ``` ### Props #### `ConfettiButton` | Prop | Type | Default | Description | | --------- | ----------------- | ------- | ---------------------------------------- | | `options` | `ConfettiOptions` | — | Confetti options applied on click. | Forwards every standard `