# 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.
```
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.
```
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.
```
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.
```
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.
```
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.
```
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 deleteHold to publish
);
}`}
>
Hold to deleteHold 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 mePush me
);
}`}
>
#### Without rainbow
Set `rainbow={false}` for a static 3D edge that uses the variant color instead of the animated gradient.
Push mePush me
);
}`}
>
Push mePush 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
DefaultSecondaryOutline
```
DefaultSecondaryOutline
`}
>
DefaultSecondaryOutline
#### Sizes
SmallMediumLarge
`}
>
SmallMediumLarge
#### 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 labelCentered label
`}
>
Parallax labelCentered 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 `
### Installation
`Highlighter` draws its sketch annotations with [`rough-notation`](https://github.com/linktohack/rough-notation)
and uses `framer-motion` for the optional in-view trigger. Both are peer dependencies:
```bash
npm install rough-notation framer-motion
```
### Usage
```tsx
import { Highlighter } from "@/components/godui/highlighter";
```
Wrap any inline text. The annotation is drawn over the element on mount.
```tsx
The quick brown fox jumps over the lazy dog.
```
#### Actions
```tsx
highlightunderlineboxcirclestrike-throughcrossed-offbracket
```
The `highlight` action paints a pale marker behind the text and renders it in
dark ink — like a real highlighter pen — so it stays legible in both light and
dark mode. The other actions draw around the text and keep the inherited color.
#### Animate on scroll
Set `isView` to defer the draw-in animation until the element scrolls into view.
```tsx
Reveals as you scroll
```
#### Tuning the sketch
```tsx
Bolder, looser, slower
```
### Examples
#### In a sentence
Drop it around any inline word — the sketch draws over the text in place.
The quick brown fox{" "}
jumps over the lazy dog.
);
}`}
>
The quick brown fox jumps over the lazy dog.
#### Tuning the sketch
Push `strokeWidth`, `iterations`, `padding`, and `animationDuration` for a bolder, looser, slower draw.
Bolder, looser, slower
);
}`}
>
Bolder, looser, slower
### Props
| Prop | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| `children` | `ReactNode` | — | Inline text to annotate |
| `action` | `"highlight" \| "underline" \| "box" \| "circle" \| "strike-through" \| "crossed-off" \| "bracket"` | `"highlight"` | Annotation style |
| `color` | `string` | `"#ffd1dc"` | Annotation color (any CSS color string) |
| `strokeWidth` | `number` | `1.5` | Stroke width of the annotation |
| `animationDuration` | `number` | `600` | Draw-in animation duration in milliseconds |
| `iterations` | `number` | `2` | Number of sketch passes (higher = more hand-drawn) |
| `padding` | `number` | `2` | Gap between the text and the annotation |
| `multiline` | `boolean` | `true` | Allow the annotation to wrap across lines |
| `isView` | `boolean` | `false` | Defer the animation until scrolled into view |
### Accessibility
The annotation is a decorative SVG overlay; it does not alter the text content,
so the underlying text remains fully readable and selectable by screen readers.
---
# Number Ticker
Source: docs/components/text/number-ticker.mdx
> Animates a number to its target value with spring physics when scrolled into view.
import { NumberTicker } from "@godui/components";
);
}`}
>
### Installation
`NumberTicker` animates only once, when it scrolls into view. It renders
`tabular-nums` so the width stays stable while the digits change.
### Usage
```tsx
import { NumberTicker } from "@/components/godui/number-ticker";
```
`NumberTicker` is an inline `` that inherits the surrounding font size,
weight, and color. Style the element directly:
```tsx
```
#### Decimal places
```tsx
```
#### Count down
Set `direction="down"` to count from `value` to `startValue`.
```tsx
```
#### Delay
`delay` is in seconds and starts once the element is in view.
```tsx
```
### Props
| Prop | Type | Default | Description |
| --------------- | ----------------- | ------- | ------------------------------------------------------------------ |
| `value` | `number` | — | Target value the ticker animates to (or from, when counting down). |
| `startValue` | `number` | `0` | Value the counter starts at. |
| `direction` | `"up" \| "down"` | `"up"` | `"up"` counts toward `value`; `"down"` counts from `value`. |
| `delay` | `number` | `0` | Delay in seconds before the animation begins once in view. |
| `decimalPlaces` | `number` | `0` | Number of decimal places to render. |
| `damping` | `number` | `60` | Spring damping — higher is less bouncy. |
| `stiffness` | `number` | `100` | Spring stiffness — higher is faster. |
`NumberTicker` also forwards every standard `` attribute (`className`,
`style`, `id`, …) to the root element.
---
# Text Animate
Source: docs/components/text/text-animate.mdx
> Staggered entrance animations for headlines and copy, split by word, character, or line.
import { TextAnimate } from "@godui/components";
`TextAnimate` splits text into words, characters, or lines and staggers each fragment through an entrance animation.
Animate your ideas into reality
);
}`}
>
Animate your ideas into reality
### Installation
`TextAnimate` requires `framer-motion` as a peer dependency:
```bash
npm install framer-motion
```
### Usage
```tsx
import { TextAnimate } from "@/components/godui/text-animate";
```
#### Word fade in
```tsx
Animate your ideas into reality
```
#### Character stagger
```tsx
Character by character
```
#### Scroll into view
```tsx
Scroll to reveal
```
#### Semantic heading
```tsx
Hero headline
```
### Examples
Hit the replay button on any preview to play the animation again.
#### Word fade in
Animate your ideas into reality
);
}`}
>
Animate your ideas into reality
#### Character stagger
Character by character
);
}`}
>
Character by character
#### Scale up
Scale up with spring
);
}`}
>
Scale up with spring
#### Slide from the right
Slide from the right
);
}`}
>
Slide from the right
#### Semantic heading
Render a real `h1` with `as` while keeping the staggered entrance.
Hero headline
);
}`}
>
Hero headline
### Props
| Prop | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| `children` | `string` | — | Text content to animate |
| `animation` | `"fadeIn" \| "blurIn" \| "blurInUp" \| "blurInDown" \| "slideUp" \| "slideDown" \| "slideLeft" \| "slideRight" \| "scaleUp" \| "scaleDown"` | `"fadeIn"` | Entrance animation preset |
| `by` | `"text" \| "word" \| "character" \| "line"` | `"word"` | How to split text for staggering |
| `as` | `"p" \| "h1"–"h6" \| "span" \| "div" \| …` | `"p"` | Root element to render |
| `delay` | `number` | `0` | Delay before animation starts (seconds) |
| `duration` | `number` | `0.3` | Total animation duration; also drives default stagger when `stagger` is omitted |
| `stagger` | `number` | derived | Delay between each segment |
| `startOnView` | `boolean` | `true` | Animate when the element enters the viewport |
| `once` | `boolean` | `true` | Animate only the first time it enters view, then never again |
| `viewportAmount` | `number \| "some" \| "all"` | `0.3` | How much of the element must be visible to trigger |
| `accessible` | `boolean` | `true` | Screen-reader text with `aria-hidden` on animated segments |
| `className` | `string` | — | Classes on the root element |
| `segmentClassName` | `string` | — | Classes on each animated segment |
| `variants` | `Variants` | — | Custom Framer Motion item variants |
Respects `prefers-reduced-motion` — text renders immediately without animation when the user has reduced motion enabled.
---
# Text Scramble
Source: docs/components/text/text-scramble.mdx
> Characters cycle through random glyphs and resolve into the target text — a decrypt / matrix reveal.
import { TextScramble } from "@godui/components";
import { TextScrambleDemo } from "@/components/demos/text-scramble-demo";
Each character flickers through a glyph pool then locks into place, left to right — the unresolved glyphs glow in the accent color until they settle. When the text changes, only the characters that differ re-scramble. The demo below swaps words on a timer.
;
}`}
>
### Installation
Each position is given a staggered start and end frame; before its start it
shows the previous character, between them a random glyph from the charset, and
after, the resolved character. Changing `text` animates from the current string
to the next, so only the differing characters move.
### Usage
```tsx
import { TextScramble } from "@/components/godui/text-scramble";
```
```tsx
```
#### Charsets
Choose `alphanumeric`, `symbols`, `katakana`, or `binary` — or pass your own
string of glyphs.
```tsx
```
#### Triggers
`mount` runs once on load, `in-view` waits until scrolled into view, and `hover`
runs on pointer enter.
```tsx
```
#### Tuning
`speed` is the ms per frame (lower is faster); `spread` is how widely the
per-character stagger is spread.
```tsx
```
### Accessibility
The resolved text is always present as a visually hidden, selectable string, so
assistive tech and copy/paste get clean text while the animated glyphs are
`aria-hidden`. When `prefers-reduced-motion` is set, the text is shown resolved
with no scramble.
### Props
| Prop | Type | Default | Description |
| --------- | ------------------------------------------------- | ---------------- | ---------------------------------------------------- |
| `text` | `string` | — | The resolved text; changing it re-scrambles the diff.|
| `trigger` | `"mount" \| "in-view" \| "hover"` | `"mount"` | When the first scramble runs. |
| `charset` | `"alphanumeric" \| "symbols" \| "katakana" \| "binary"` \| `string` | `"alphanumeric"` | Glyph pool used while unresolved. |
| `speed` | `number` | `28` | Milliseconds per frame — lower is faster. |
| `spread` | `number` | `28` | Max stagger spread, in frames. |
`TextScramble` also forwards every standard `` attribute to the root element.
---
# Animated Beam
Source: docs/components/visualizations/animated-beam.mdx
> An animated gradient beam that travels along a path connecting two separate nodes.
import { AnimatedBeamDemo } from "@/components/demos/animated-beam-demo";
import { AnimatedBeamPipelineDemo } from "@/components/demos/animated-beam-pipeline-demo";
import { AnimatedBeamSyncDemo } from "@/components/demos/animated-beam-sync-demo";
);
}`}
>
### Installation
`AnimatedBeam` renders an absolutely-positioned SVG over a container and draws a
quadratic path between two child refs, measured live with a `ResizeObserver` and
on window resize. A travelling gradient animates along the path. Mount it as the
last child of a `relative` container that also holds `fromRef` and `toRef`.
### Usage
```tsx
import { AnimatedBeam } from "@/components/godui/animated-beam";
const containerRef = useRef(null);
const fromRef = useRef(null);
const toRef = useRef(null);
```
```tsx
```
### Examples
#### Dotted data pipeline
Set `pathDashArray` for a dotted or dashed resting line. Here each stage connects
with a dotted track (`"0.1 8"` with the round cap renders as dots), and staggered
`delay`s send the beam flowing from stage to stage.
`}
>
#### Bidirectional sync
Stack two dashed beams with opposite `curvature` — and `reverse` on one — for a
continuous two-way connection.
`}
>
### Props
| Prop | Type | Default | Description |
| -------------------- | --------------------- | ----------- | -------------------------------------------- |
| `containerRef` | `RefObject` | — | Element the SVG overlays. |
| `fromRef` | `RefObject` | — | Element the beam starts from. |
| `toRef` | `RefObject` | — | Element the beam ends at. |
| `curvature` | `number` | `0` | Bow of the curve in pixels. |
| `reverse` | `boolean` | `false` | Animate from end toward start. |
| `duration` | `number` | `3` | Seconds for one travel of the gradient. |
| `delay` | `number` | `0` | Delay before the first travel, in seconds. |
| `pathColor` | `string` | `var(--border)` | Color of the static resting path. |
| `pathWidth` | `number` | `2` | Width of the path in pixels. |
| `pathOpacity` | `number` | `0.2` | Opacity of the static resting path. |
| `pathDashArray` | `string` | — | `stroke-dasharray` for the resting path (`"4 5"` dashes, `"0.1 8"` dots). |
| `gradientStartColor` | `string` | `var(--primary)` | Leading color of the travelling gradient.|
| `gradientStopColor` | `string` | — | Trailing color of the travelling gradient. |
---
# Globe
Source: docs/components/visualizations/globe.mdx
> A draggable, auto-rotating WebGL globe with glowing location markers.
import { GlobeDemo } from "@/components/demos/globe-demo";
Deployed across every region on Earth
Routed to the closest data center for sub-50ms responses anywhere.
);
}`}
>
### Installation
`Globe` renders a WebGL globe with [cobe](https://github.com/shuding/cobe), driven
by a `requestAnimationFrame` loop. It auto-rotates while idle and hands rotation
to the pointer on drag, picking up where the spin left off. Drag it to spin.
### Usage
```tsx
import { Globe } from "@/components/godui/globe";
```
```tsx
```
#### Custom markers and colors
`config` is merged over the defaults and accepts any
[cobe option](https://github.com/shuding/cobe#props) — markers, arcs, colors, glow.
```tsx
```
### Props
| Prop | Type | Default | Description |
| -------- | ----------------------- | ------- | ------------------------------------------------- |
| `config` | `Partial` | — | Override any cobe option (markers, colors, glow). |
`Globe` also forwards every standard `
` attribute to the root element.
---
# Orbiting Circles
Source: docs/components/visualizations/orbiting-circles.mdx
> Icons that orbit a center point on a configurable ring, staying upright as they travel.
import { OrbitingCircles } from "@godui/components";
import { OrbitingCirclesDemo } from "@/components/demos/orbiting-circles-demo";
GodUIABCDEFG
);
}`}
>
### Installation
Children are spread evenly around a ring of `radius`. A single ring animation
carries every slot in lockstep while each slot counter-rotates so its content
stays upright. The orbit pauses entirely under `prefers-reduced-motion`.
### Usage
```tsx
import { OrbitingCircles } from "@/components/godui/orbiting-circles";
```
```tsx
```
#### Reversed inner ring
Stack two rings with different `radius`, `duration`, and `reverse` for a layered
ecosystem diagram.
12345
`}
>
12345
### Props
| Prop | Type | Default | Description |
| ---------- | --------- | ------- | -------------------------------------------- |
| `radius` | `number` | `120` | Orbit radius in pixels. |
| `duration` | `number` | `20` | Seconds per full revolution. |
| `delay` | `number` | `0` | Delay before the orbit starts, in seconds. |
| `reverse` | `boolean` | `false` | Reverse the orbit direction. |
| `showPath` | `boolean` | `true` | Render the faint circular track. |
| `iconSize` | `number` | `40` | Size of each orbiting slot in pixels. |
`OrbitingCircles` also forwards every standard `
` attribute to the root element.
---
# Motion Patterns
Source: docs/guidelines/patterns.mdx
> The reusable motion recipes that put the principles into practice — one card per pattern.
import { MotionPatterns } from "@/components/motion-guidelines/motion-patterns";
If [Principles](/docs/guidelines/principles) are the *why*, these patterns are the
*how*. Each one is a small, proven recipe drawn straight from the components, built
from the same handful of springs, durations, and easings so everything in GodUI
moves with one voice. Press play on any card to see it run.
---
# Motion Principles
Source: docs/guidelines/principles.mdx
> The philosophy behind every animation in GodUI — twelve principles, each with a live demo.
import { MotionPrinciples } from "@/components/motion-guidelines/motion-principles";
Motion in GodUI is never decoration. Every animation earns its place by making
the interface clearer, calmer, and easier to follow. These twelve principles are the
shared language behind the whole collection — each card below demonstrates one in
motion. For the concrete recipes that implement them, see [Patterns](/docs/guidelines/patterns).
### References
These principles aren't invented — they distil the established motion canon, and
the token values track it directly (durations map to Material 3's `short3 / short4
/ medium2`; the spring presets mirror Material 3 Expressive's overshoot vs.
subdued schemes).
- [Material Design 3 — Motion](https://m3.material.io/styles/motion/overview/how-it-works) · [Easing & duration](https://m3.material.io/styles/motion/easing-and-duration) · [Building with M3 Expressive](https://m3.material.io/blog/building-with-m3-expressive)
- [Apple Human Interface Guidelines — Motion](https://developer.apple.com/design/human-interface-guidelines/motion)
- [Disney's 12 principles of animation, applied to UI (IxDF)](https://www.interaction-design.org/literature/article/ui-animation-how-to-apply-disney-s-12-principles-of-animation-to-ui-design)
---
# Introduction
Source: docs/index.mdx
> An open-source collection of beautifully crafted motion components built with React, TypeScript, Tailwind CSS, Motion, and shadcn/ui.
import { Cards, Card } from "fumadocs-ui/components/card";
import { MagicButton } from "@godui/components";
**GodUI** is a collection of open-source, animated UI components for Design
Engineers. Built with **React**, **TypeScript**, **Tailwind CSS v4**, and
**Motion**, and distributed as a [shadcn](https://ui.shadcn.com) registry — so
the components are copied straight into your project and you own every line.
Get Started;
}`}>
Get Started
### What you get
- **You own the code.** Components are installed into your codebase via the
shadcn CLI — not hidden behind a versioned dependency.
- **Motion-first.** Every component ships with polished, performant animation
out of the box.
- **shadcn-native.** Same install flow as shadcn/ui. If you already use shadcn,
just add the `@godui` registry.
- **Tailwind v4 tokens.** Themed with CSS variables — light and dark modes work
with zero extra config.
- **Type-safe.** Full TypeScript types for every component and its props.
### Next steps
Add the `@godui` registry and pull your first component in minutes.
Browse the full collection of animated components.
---
# Installation
Source: docs/installation.mdx
> Install GodUI components with the shadcn CLI.
GodUI is a design system built with Tailwind CSS v4 and React, distributed as a
[shadcn](https://ui.shadcn.com) registry. Components are copied straight into
your project — you own the source.
> **Note:** We have the exact same installation process as
> [shadcn/ui](https://ui.shadcn.com/docs/installation). If you already use
> shadcn, skip straight to step 2.
### 1. Create project
Run the `init` command to create a new project or to set up an existing one:
```bash
pnpm dlx shadcn@latest init
```
### 2. Add components
Add any GodUI component with its registry URL — no configuration required:
```bash
pnpm dlx shadcn@latest add https://godui.design/r/magic-button.json
```
This copies the component into `components/godui/` and merges the GodUI theme
tokens and component styles into your global stylesheet automatically.
### Typography (bring your own font)
GodUI is font-agnostic. The theme ships a neutral system font stack as the
default, so components look right with zero setup. To use any font, override
`--font-sans` (and optionally `--font-mono` / `--font-serif`) in your global
stylesheet — everything inherits it.
```css title="globals.css"
:root {
--font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}
```
#### Optional: Geist (the GodUI brand font)
The docs site uses [Geist](https://vercel.com/font). To match it in a Next.js
app, install `geist` and point `--font-sans` / `--font-mono` at its variables:
```bash
pnpm add geist
```
```tsx title="app/layout.tsx"
import { GeistMono, GeistSans } from "geist/font";
export default function RootLayout({ children }) {
return (
{children}
);
}
```
```css title="globals.css"
:root {
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
}
```
### Dark mode
The theme supports light and dark via the `.dark` class on a parent element
(typically ``). Toggle it with your framework's theme switcher.
```html
```
Browse the [Magic Button](/docs/components/buttons/magic-button) docs for a live
preview.
---
# MCP Server
Source: docs/mcp.mdx
> Use GodUI from your AI IDE — discover and install components by description.
GodUI ships an [MCP](https://modelcontextprotocol.io) server so AI coding agents
(Cursor, Windsurf, Claude, Cline, Roo-Cline, …) can browse the GodUI catalog and
install components straight into your project. Add it once, then just ask for the
component you want in plain language.
### Installation
Use the **CLI** to write the config automatically, or add it **Manually**.
The server runs locally over `stdio` via `npx` — no API key, no account. The CLI
installs into your editor's MCP config; with Manual you paste the block into it
yourself.
### Usage
Ask your IDE to use any GodUI component:
- "Add a GodUI magic button"
- "Add a marquee of logos"
- "Add an animated gradient background"
- "Add a number ticker that counts to 1000"
The agent finds the right component, then installs it with the
[shadcn CLI](/docs/installation) — copying the source into your project so you
own it.
### Tools
The server exposes three tools:
| Tool | What it does |
| --- | --- |
| `list_components` | List the full catalog, optionally filtered by category. |
| `search_components` | Find components by what they do (natural language). |
| `get_component` | Fetch one component's install command and full source. |
### How it works
The server fetches the live registry at `https://godui.design/r`, so it always
serves the latest components — no upgrade needed when GodUI ships something new.
Point it at a local registry for development by setting `GODUI_REGISTRY_URL`:
```bash
GODUI_REGISTRY_URL=http://localhost:3000/r npx @godui/mcp@latest
```
---
## About This Document
This concatenated documentation file is generated automatically by aeo.js
to make it easier for AI systems to understand the complete context of this project.
For a structured index, see: https://godui.design/llms.txt
For individual files, see: https://godui.design/docs.json
Generated by aeo.js - https://aeojs.org