# GLINUI full documentation > 142 components concatenated. Size: about 714 KB (roughly 183k tokens). For one component, fetch https://glinui.com/md/.md instead. --- # Button > Action control with default, glass, liquid, matte, glow, outline, and ghost variants. - id: `button` - type: primitive - category: Buttons - tags: primitive - docs: https://glinui.com/docs/components/radix/button - markdown: https://glinui.com/md/button.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add button ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/button.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Button, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS, SURFACE_VARIANT_ALIASES, STYLE_DEFAULT_VARIANT, GlinProvider, GLIN_MOTIONS } from "@glinui/ui" ``` ## Usage An editor action bar: a destructive soft button, a ghost cancel and a solid save that shows its loading state. ```tsx "use client" import { useEffect, useRef, useState } from "react" import { Check, FloppyDisk, Trash } from "@phosphor-icons/react" import { Badge, Button, Card, CardDescription, CardFooter, CardHeader, CardTitle } from "@glinui/ui" export function ButtonActionBar() { const [state, setState] = useState<"idle" | "saving" | "saved">("idle") const timer = useRef | undefined>(undefined) useEffect(() => () => clearTimeout(timer.current), []) function save() { setState("saving") timer.current = setTimeout(() => setState("saved"), 1400) } return (
Release notes for v2.4 {state === "saved" ? "Saved" : "Unsaved changes"}
Edited a few minutes ago by Maya Chen. Changes apply to the public changelog.
) } ``` ### Variants ```tsx import { Button, SURFACE_TONES, SURFACE_VARIANTS } from "@glinui/ui" export function Demo() { return (
{SURFACE_VARIANTS.map((variant) => (
{SURFACE_TONES.map((tone) => ( ))}
))}
) } ``` ### Glass (opt-in) ```tsx import { Button } from "@glinui/ui" // Glass needs a colorful or photographic backdrop to read. export function Demo() { return } ``` ## Props ### ButtonProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `asChild?` | `boolean` | `false` | | | `iconNudge?` | `boolean` | | | | `leadingIcon?` | `React.ReactNode` | | Icon before the label (decorative). | | `loading?` | `boolean` | `false` | Show a spinner, set `aria-busy` and block interaction. | | `size?` | `ButtonSize` | | | | `tone?` | `ButtonTone` | | Colour axis for the vocabulary variants. | | `trailingIcon?` | `React.ReactNode` | | Icon after the label (decorative). | | `variant?` | `ButtonVariant` | | Look. Omit for the ambient default (`glinr`, or `plain` / `glass` under `style="minimal"` / `"glass"`). Legacy names (`default`, `primary... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Native `button` semantics by default. - Visible 2px accent focus ring with offset on every variant (plain uses a neutral ring). - `disabled` and `loading` block interaction, lower emphasis and set `aria-disabled` / `aria-busy`. - Icon-only buttons need an `aria-label`. - Supports `asChild` for semantic link rendering. Keyboard: | Key | Action | | --- | --- | | Enter | Activate the button. | | Space | Activate the button. | ARIA: - `role="button"` native - `aria-disabled` when disabled or loading - `aria-busy` while loading - Reduced motion: Transitions use tokenized timing and disable transform-heavy motion with `prefers-reduced-motion`. --- # Shimmer Button > Button with animated shimmer sweep overlay and glass-aware variants. - id: `shimmer-button` - type: signature - category: Buttons - tags: signature - docs: https://glinui.com/docs/components/shimmer-button - markdown: https://glinui.com/md/shimmer-button.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add shimmer-button ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/shimmer-button.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { ShimmerButton, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage ```tsx import { ShimmerButton } from "@glinui/ui" export function ShimmerButtonVariantsDemo() { return (
glinr solid plain soft outline ghost gradient
) } ``` ```tsx import { ShimmerButton } from "@glinui/ui" export function ShimmerButtonGlassDemo() { return ( Glass ) } ``` ```tsx import { ShimmerButton } from "@glinui/ui" export function ShimmerButtonSizesDemo() { return (
SM MD LG
) } ``` ## Props ### ShimmerButtonProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `shimmerColor?` | `string` | | Sweep colour. Defaults to the button's own text colour at 35 percent, so it shows on light and dark surfaces. | | `shimmerDuration?` | `number` | `2` | Seconds per sweep. | | `variant?` | `ButtonVariant \| "accent"` | | Vocabulary or legacy variant. `accent` is kept as an alias of `primary`. Omit for the ambient default. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `accent`. ## Accessibility - Renders through `Button`: native ``, 2px accent focus ring with offset, `disabled` and `aria-busy` states. - Accessible name comes from the label. Decorative effect layers are `aria-hidden` and `pointer-events-none`. - Reduced motion: The sweep renders only at motion level `full`. It is removed under `prefers-reduced-motion` and `data-glin-motion="none"`, leaving a normal button. --- # Ripple Button > Button with liquid ripple effect on press. - id: `ripple-button` - type: signature - category: Buttons - tags: signature - docs: https://glinui.com/docs/components/ripple-button - markdown: https://glinui.com/md/ripple-button.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add ripple-button ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/ripple-button.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { RippleButton, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage ```tsx import { RippleButton } from "@glinui/ui" export function RippleButtonVariantsDemo() { return (
glinr solid plain soft outline ghost gradient
) } ``` ```tsx import { RippleButton } from "@glinui/ui" export function RippleButtonGlassDemo() { return ( Glass ) } ``` ```tsx import { RippleButton } from "@glinui/ui" export function RippleButtonSizesDemo() { return (
SM MD LG
) } ``` ## Props ### RippleButtonProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `rippleColor?` | `string` | | Ripple colour. Defaults to the button's own text colour at 30 percent, so it shows on light and dark surfaces. | | `variant?` | `ButtonVariant` | | Vocabulary or legacy variant. Omit for the ambient default. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders through `Button`: native ``, 2px accent focus ring with offset, `disabled` and `aria-busy` states. - Accessible name comes from the label. Decorative effect layers are `aria-hidden` and `pointer-events-none`. - Defaults to `type="button"`. - Reduced motion: No ripple is created under `prefers-reduced-motion` or `data-glin-motion="none"`. The click handler still runs. --- # Pulsating Button > Button with a pulsing glow ring animation for attention-grabbing CTAs. - id: `pulsating-button` - type: signature - category: Buttons - tags: signature - docs: https://glinui.com/docs/components/pulsating-button - markdown: https://glinui.com/md/pulsating-button.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add pulsating-button ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/pulsating-button.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { PulsatingButton, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage ```tsx import { PulsatingButton } from "@glinui/ui" export function PulsatingButtonVariantsDemo() { return (
glinr solid plain soft outline ghost gradient
) } ``` ```tsx import { PulsatingButton } from "@glinui/ui" export function PulsatingButtonGlassDemo() { return ( Glass ) } ``` ```tsx import { PulsatingButton } from "@glinui/ui" export function PulsatingButtonColorDemo() { return ( Custom pulse ) } ``` ## Props ### PulsatingButtonProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `pulseColor?` | `string` | | Ring colour. Defaults to the accent token, visible on light and dark scopes. | | `pulseDuration?` | `number` | `2` | Seconds per pulse. | | `variant?` | `ButtonVariant \| "accent"` | | Vocabulary or legacy variant. `accent` is kept as an alias of `primary`. Omit for the ambient default. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `accent`. ## Accessibility - Renders through `Button`: native ``, 2px accent focus ring with offset, `disabled` and `aria-busy` states. - Accessible name comes from the label. Decorative effect layers are `aria-hidden` and `pointer-events-none`. - Reduced motion: The ring renders only at motion level `full`. It is removed under `prefers-reduced-motion` and `data-glin-motion="none"`. --- # Liquid Button > Button with fluid hover lift, press squish, and radial shine effect. - id: `liquid-button` - type: signature - category: Buttons - tags: signature - docs: https://glinui.com/docs/components/liquid-button - markdown: https://glinui.com/md/liquid-button.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add liquid-button ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/liquid-button.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { LiquidButton } from "@glinui/ui" ``` ## Usage ```tsx import { LiquidButton } from "@glinui/ui" export function LiquidButtonVariantsDemo() { return (
glinr solid plain soft outline ghost gradient
) } ``` ```tsx import { LiquidButton } from "@glinui/ui" export function LiquidButtonGlassDemo() { return ( Glass ) } ``` ```tsx import { LiquidButton } from "@glinui/ui" export function LiquidButtonIntensityDemo() { return (
Soft Strong
) } ``` ## Props ### LiquidButtonProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `intensity?` | `"soft" \| "strong"` | `"soft"` | Variant option from liquidButtonVariants. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders through `Button`: native ``, 2px accent focus ring with offset, `disabled` and `aria-busy` states. - Accessible name comes from the label. Decorative effect layers are `aria-hidden` and `pointer-events-none`. - Reduced motion: Scale, brightness and the fill transition are disabled under `prefers-reduced-motion` and `data-glin-motion="none"`. --- # Magnetic CTA > Call-to-action button with subtle cursor-attraction on hover. - id: `magnetic-cta` - type: signature - category: Buttons - tags: signature - docs: https://glinui.com/docs/components/magnetic-cta - markdown: https://glinui.com/md/magnetic-cta.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add magnetic-cta ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/magnetic-cta.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { MagneticCTA, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage ```tsx import { MagneticCTA } from "@glinui/ui" export function MagneticCTAVariantsDemo() { return (
glinr solid plain soft outline ghost gradient
) } ``` ```tsx import { MagneticCTA } from "@glinui/ui" export function MagneticCTAGlassDemo() { return ( Glass ) } ``` ```tsx import { MagneticCTA } from "@glinui/ui" export function MagneticCTAStrongDemo() { return (
Strong pull Subtle pull
) } ``` ## Props ### MagneticCTAProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `containerClassName?` | `string` | | | | `magnetRadius?` | `number` | `140` | | | `maxOffset?` | `number` | `8` | | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders through `Button`: native ``, 2px accent focus ring with offset, `disabled` and `aria-busy` states. - Accessible name comes from the label. Decorative effect layers are `aria-hidden` and `pointer-events-none`. - The focus ring stays on the button and is not hidden by the offset. - Reduced motion: The pull is disabled under `prefers-reduced-motion` and `data-glin-motion="none"`: the offset resets to zero. --- # Interactive Hover Button > Pill button whose accent dot floods the surface on hover, focus or press. - id: `interactive-hover-button` - type: primitive - category: Buttons - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/interactive-hover-button - markdown: https://glinui.com/md/interactive-hover-button.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add interactive-hover-button ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/interactive-hover-button.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { InteractiveHoverButton, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Interactive Hover Button by Magic UI (MIT). Improvements: one accessible label instead of two, a cheap clip-path fill instead of a 100x scaled dot, focus-visible and active parity with hover, logical RTL offsets with a mirrored arrow, sizes, the shared variant vocabulary (glinr default, glass opt-in), loading, asChild and motion levels. Hover, focus or press the button to flood it with the accent. ```tsx import { Card, CardDescription, CardFooter, CardHeader, CardTitle, InteractiveHoverButton } from "@glinui/ui" export function HoverButtonCta() { return ( Join the beta Early access to the new analytics workspace. Hover or focus the button to see it fill. 1,240 teams already in Request access ) } ``` ### Variants The shared vocabulary. The accent dot floods whichever surface you pick. ```tsx
glinr solid plain soft outline ghost gradient
``` ### Glass (opt-in) Glass is never the default. It needs a colorful or photographic backdrop to read. ```tsx Book a demo ``` ## Props ### InteractiveHoverButtonProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `leadingIcon?` | `React.ReactNode` | | Icon before the label (decorative). | | `loading?` | `boolean` | `false` | Show a spinner, set aria-busy and block interaction. | | `size?` | `"xs" \| "sm" \| "md" \| "lg" \| "icon"` | `"md"` | Variant option from interactiveHoverButtonVariants. | | `trailingIcon?` | `React.ReactNode` | | Icon after the label. Defaults to an arrow that mirrors in RTL on the hover face. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Native button (or your element with asChild) with the Button focus ring. - The hover face is aria-hidden, so the label is read once. The original duplicated it. - Keyboard focus triggers the same fill as hover, and press fills it on touch. Keyboard: | Key | Action | | --- | --- | | Enter | Activates the button. | | Space | Activates the button. | | Tab | Moves focus and plays the fill. | ARIA: - `aria-busy` while loading - `aria-disabled` when disabled or loading - Decorative icons and the hover face use `aria-hidden` - Reduced motion: Motion level full slides the label and floods the surface with a clip-path. Subtle keeps the flood and opacity swap but drops the slide. None, or prefers-reduced-motion, switches state instantly. Hover effects only run on fine pointers. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/interactive-hover-button. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Generate Button > AI style call to action with idle, generating and loading states. - id: `generate-button` - type: primitive - category: Buttons - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/generate-button - markdown: https://glinui.com/md/generate-button.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add generate-button ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/generate-button.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { GenerateButton, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider, GlinProvider, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS } from "@glinui/ui" ``` ## Usage Adapted from Generate Button by Ashutoshx7 (Vengeance UI, MIT). Improvements: no injected style tag or font stack, scoped utilities on tokens, explicit generating and loading props instead of focus-driven state, aria-busy with a polite announcement, real disabled state, variant vocabulary (glinr default, glass opt-in), sizes and asChild. Click to enter the glowing generating state, click again to stop. ```tsx import { Sparkle } from "@phosphor-icons/react" import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, GenerateButton } from "@glinui/ui" export function GenerateCompose() { return ( Product description Draft copy for the Studio keyboard from its spec sheet. Press the button to start and again to stop.
75% layout, gasket mount, hot-swap switches, USB-C and Bluetooth, aluminum case in three finishes.
Uses 1 credit } />
) } ``` ### Variants The shining label follows the surface text colour on every variant. ```tsx
``` ### Glass (opt-in) Glass is never the default. It needs a colorful or photographic backdrop to read. ```tsx ``` ## Props ### GenerateButtonProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children?` | `React.ReactElement` | | With `asChild`, pass the element to render, for example an anchor. | | `defaultGenerating?` | `boolean` | `false` | Initial generating state when uncontrolled. | | `generatingLabel?` | `string` | `"Generating"` | Label shown (and announced) while generating. | | `hue?` | `number` | | Highlight hue, 0 to 360. Defaults to a violet-blue. | | `isGenerating?` | `boolean` | | Controlled generating state. | | `label?` | `string` | `"Generate"` | Idle label. | | `leadingIcon?` | `React.ReactNode` | | Icon before the label. Defaults to a sparkle. | | `loading?` | `boolean` | `false` | Submitting state: spinner, aria-busy and a disabled button (separate from the generating glow). | | `onGeneratingChange?` | `(generating: boolean) => void` | | Called with the requested next state when the button is activated. | | `size?` | `"xs" \| "sm" \| "md" \| "lg" \| "icon"` | `"md"` | Variant option from generateButtonVariants. | | `trailingIcon?` | `React.ReactNode` | | Icon after the label. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Native button with the Button focus ring. Generating is never triggered by focus alone. - Only the visible label is in the accessibility tree, so the name is never doubled. - A polite status region announces the generating label. Keyboard: | Key | Action | | --- | --- | | Enter | Requests the next state. | | Space | Requests the next state. | ARIA: - `aria-busy` while generating or loading - `role=status` live region with the generating label - `data-generating` for styling hooks - Reduced motion: Full motion sweeps a highlight across the label and pulses the sparkle. Subtle and none keep a static glow and the label swap only. ## Provenance Adapted from Vengeance UI (MIT, Copyright (c) 2025-2026 Ashutoshx7). Upstream: https://github.com/Ashutoshx7/VengeanceUI/blob/0376d8e37b4a565016cce1064d7b96905c4494ab/src/components/ui/generate-button.tsx. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Button Group > Merges adjacent buttons into one segmented control with shared borders. - id: `button-group` - type: primitive - category: Buttons - tags: primitive - docs: https://glinui.com/docs/components/radix/button-group - markdown: https://glinui.com/md/button-group.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add button-group ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/button-group.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { ButtonGroupContext, ButtonGroup, ButtonGroupText, ButtonGroupSeparator, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS, SURFACE_VARIANT_ALIASES } from "@glinui/ui" ``` ## Usage A range switcher and a split merge action sharing merged borders. ```tsx "use client" import { useState } from "react" import { ArrowRight, Check } from "@phosphor-icons/react" import { Button, ButtonGroup, ButtonGroupSeparator, Card, CardContent } from "@glinui/ui" export function ButtonGroupToolbar() { const [range, setRange] = useState("week") return ( {["day", "week", "month"].map((value) => ( ))} ) } ``` ### Variants ```tsx import { Button, ButtonGroup } from "@glinui/ui" export function Demo() { return (
) } ``` ### Glass (opt-in) ```tsx import { Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText } from "@glinui/ui" // Glass needs a colorful or photographic backdrop to read. export function Demo() { return ( 100% ) } ``` ## Props ### ButtonGroupProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `orientation?` | `"horizontal" \| "vertical"` | `"vertical"` | Variant option from buttonGroupVariants. | | `size?` | `ButtonGroupContextValue["size"]` | | Size applied to child Buttons that do not set their own. | | `tone?` | `SurfaceTone` | | Tone applied to child Buttons that do not set their own. | | `variant?` | `"default" \| "glass" \| "glinr" \| "solid" \| "plain" \| "soft" \| "outline" \| "ghost" \| "gradient"` | `"default"` | Variant option from buttonGroupVariants. | ### ButtonGroupTextProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `asChild?` | `boolean` | `false` | | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `glass`, `glinr`, `solid`, `plain`, `soft`, `outline`, `ghost`, `gradient`. ## Accessibility - Renders `role="group"`; give it an `aria-label` describing the set. - Each child keeps its own button semantics and focus ring (raised above neighbours). Keyboard: | Key | Action | | --- | --- | | Tab | Move through each button in order. | ARIA: - `role="group"` with `aria-label` - `role="separator"` on ButtonGroupSeparator - Reduced motion: Hover lift and press scale are disabled inside the group so merged edges stay aligned. --- # Copy Button > Raised pill that copies text, announces the result and resets after 1.6 seconds. - id: `copy-button` - type: primitive - category: Buttons - tags: primitive - docs: https://glinui.com/docs/components/radix/copy-button - markdown: https://glinui.com/md/copy-button.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add copy-button ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/copy-button.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { CopyButton } from "@glinui/ui" ``` ## Usage Labelled and icon-only copy buttons announce the result to screen readers. ```tsx import { Card, CardContent, CardDescription, CardHeader, CardTitle, CopyButton } from "@glinui/ui" export function CopyApiKey() { return ( API key Use this key to authenticate server requests. Treat it like a password.
glin_live_4f9a7c21b6e8
pnpm add @glinui/ui
) } ``` ### Icon only ```tsx ``` ### Variants ```tsx ``` ## Props ### CopyButtonProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `copiedLabel?` | `string` | `"Copied"` | Label shown (and announced) after copying. | | `getValue?` | `() => string` | | Lazily resolve the text to copy (wins over `value`). | | `iconOnly?` | `boolean` | `false` | Hide the text label and keep only the icon (label stays as the accessible name). | | `label?` | `string` | `"Copy"` | Idle label. | | `onCopy?` | `(value: string) => void` | | Called after a successful copy with the copied text (analytics hook). | | `resetMs?` | `number` | `1600` | Milliseconds before returning to the idle state. | | `value?` | `string` | `""` | Static text to copy. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Native button; the result is announced through a polite live region. - data-copied reflects state for styling hooks. - Falls back to document.execCommand when the Clipboard API is unavailable. Keyboard: | Key | Action | | --- | --- | | Enter / Space | Copies the text. | ARIA: - role=status live region with the copied label - aria-label when iconOnly - Reduced motion: Only a 1px press translate, removed under reduced motion. --- # Toggle > A two-state button that can be pressed on or off. - id: `toggle` - type: primitive - category: Buttons - tags: primitive - docs: https://glinui.com/docs/components/radix/toggle - markdown: https://glinui.com/md/toggle.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add toggle ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/toggle.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Toggle, CONTROL_LEGACY_VARIANTS, CONTROL_SIZE_CLASSES, GlinProvider, GLIN_MOTIONS, GLIN_ENGINES, GLIN_SURFACES, GLIN_STYLES } from "@glinui/ui" ``` ## Usage Toggles and toggle groups in an editor toolbar. ```tsx import { BellRinging, TextAlignCenter, TextAlignLeft, TextAlignRight, TextB, TextItalic, TextUnderline } from "@phosphor-icons/react" import { Card, CardContent, Toggle, ToggleGroup, ToggleGroupItem } from "@glinui/ui" export function ToggleEditorToolbar() { return (

Weekly digest: three launches, one deprecation and a new way to schedule deploys.

) } ``` ### Variants Each variant in the pressed state. ```tsx import { Toggle } from "@glinui/ui" import { TextB } from "@phosphor-icons/react" export function Demo() { return (
) } ``` ### Glass (opt-in) Glass is opt-in and needs a backdrop behind it: pick Photo or Vivid in the stage backdrop switcher. ```tsx import { Toggle } from "@glinui/ui" import { TextUnderline } from "@phosphor-icons/react" export function Demo() { return ( ) } ``` ## Props ### ToggleProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Variant option from toggleVariants. | | `variant?` | `ControlVariantProp` | | Surface look. Omit to follow the ambient design style (glinr = raised key that presses in when on). Also: solid, plain, soft, outline, gh... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders a native button with `aria-pressed`. - Icon-only toggles need an `aria-label`. - Visible violet focus ring on `:focus-visible`. Keyboard: | Key | Action | | --- | --- | | Enter / Space | Toggle the pressed state. | | Tab | Move focus to the toggle. | ARIA: - `aria-pressed` reflects state - `data-state="on|off"` for styling - Reduced motion: Colour transitions are removed under prefers-reduced-motion. --- # Toggle Group > A set of toggles with single or multiple selection and merged segmented borders. - id: `toggle-group` - type: primitive - category: Buttons - tags: primitive - docs: https://glinui.com/docs/components/radix/toggle-group - markdown: https://glinui.com/md/toggle-group.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add toggle-group ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/toggle-group.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { ToggleGroup, ToggleGroupItem, CONTROL_LEGACY_VARIANTS, CONTROL_SIZE_CLASSES, GlinProvider, GLIN_MOTIONS, GLIN_ENGINES, GLIN_SURFACES } from "@glinui/ui" ``` ## Usage A single-select group that switches the layout of a list. ```tsx "use client" import { useState } from "react" import { Card, CardContent, CardHeader, CardTitle, ToggleGroup, ToggleGroupItem } from "@glinui/ui" export function ToggleViewSwitcher() { const [view, setView] = useState("list") const rows = ["Atlas redesign", "Billing migration", "Mobile onboarding"] return (
Projects next && setView(next)} aria-label="Layout" size="sm" > List Grid
    {rows.map((row) => (
  • {row}
  • ))}
) } ``` ### Variants ```tsx import { ToggleGroup, ToggleGroupItem } from "@glinui/ui" export function Demo() { return (
Day Week Month Day Week Month Day Week Month Day Week Month Day Week Month Day Week Month
) } ``` ### Multiple with spacing ```tsx import { ToggleGroup, ToggleGroupItem } from "@glinui/ui" import { TextB, TextItalic } from "@phosphor-icons/react" export function Demo() { return ( ) } ``` ## Props ### ToggleGroupItemProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant?` | `ControlVariantProp` | | | ### ToggleGroupProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `spacing?` | `ToggleGroupSpacing` | `0` | Gap between items. 0 merges items into one segmented control. | | `variant?` | `ControlVariantProp` | | Surface look for every item. Omit to follow the ambient design style. Same vocabulary as Toggle. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Single mode exposes `radiogroup` with `radio` items, multiple mode exposes `group` with toggle buttons. - Roving tabindex: one tab stop for the whole group. - Always label the group with `aria-label`. Keyboard: | Key | Action | | --- | --- | | Arrow keys | Move focus between items. | | Enter / Space | Toggle the focused item. | | Home / End | Move to first or last item. | ARIA: - `aria-label` on group - `aria-checked` (single) or `aria-pressed` (multiple) on items - Reduced motion: Item colour transitions are disabled under prefers-reduced-motion. --- # Glass Toggle > Toggle switch with liquid fill animation and frosted glass surface. - id: `glass-toggle` - type: signature - category: Buttons - tags: signature - docs: https://glinui.com/docs/components/glass-toggle - markdown: https://glinui.com/md/glass-toggle.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add glass-toggle ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/glass-toggle.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { GlassToggle } from "@glinui/ui" ``` ## Usage ```tsx "use client" import { GlassToggle } from "@glinui/ui" export function GlassOnPhoto() { return (
) } ``` ```tsx "use client" import { GlassToggle } from "@glinui/ui" export function GlassToggleColorDemo() { return (
) } ``` ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders with `role="switch"` and `aria-checked`. - Supports keyboard activation (Space) and a visible focus ring. - Native form participation through `name`, `value`, `required` and `form`. - `loading` sets `aria-busy` and makes the toggle inert. - 44px minimum hit area at every size; thumb moves toward the inline end in RTL. - Disabled state reduces opacity and blocks interaction. - Reduced motion: When `prefers-reduced-motion: reduce` is active, or `data-glin-motion` is `none` or `subtle`, the thumb and fill change state instantly with no sliding transform. --- # Text > Body text primitive for default, muted, and glass-highlighted copy. - id: `text` - type: primitive - category: Text and code - tags: primitive - docs: https://glinui.com/docs/components/radix/text - markdown: https://glinui.com/md/text.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add text ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/text.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Text } from "@glinui/ui" ``` ## Usage Eyebrow, lead, body and caption sizes build a clear reading order. ```tsx import { Code, Heading, Text } from "@glinui/ui" export function ReleaseNote() { return (
Release notes Version 4.2 is out Scheduled exports now run in your timezone, and the audit log keeps 400 days of history on every plan. Existing schedules migrate automatically. If you pinned a UTC offset in the API, it keeps working, and the new timezone field takes priority when both are set. Published Oct 7, 2026. Questions? Reply to this post or write to support.
) } ``` ### Variants Default, muted, eyebrow, ghost and glass on a vivid backdrop. ```tsx import { Text } from "@glinui/ui" export function TextVariants() { return (
Default Muted Eyebrow Ghost Glass
) } ``` ### In a layout Short entries in a changelog, paired with Badge. ```tsx import { Badge, Heading, Text } from "@glinui/ui" const entries = [ { date: "Oct 7", tag: "New", tone: "accent", text: "Scheduled exports follow the workspace timezone." }, { date: "Sep 29", tag: "Fixed", tone: "success", text: "Invoice PDFs no longer clip long company names." }, { date: "Sep 18", tag: "Changed", tone: "warning", text: "API keys created before 2024 now expire after 12 months." } ] as const export function Changelog() { return (
Changelog
    {entries.map((entry) => (
  1. {entry.date}
    {entry.tag} {entry.text}
  2. ))}
) } ``` ## Props ### TextProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `as?` | `"p" \| "span" \| "div"` | `"p"` | Element to render. Use `span` with `tone` for an inline mark. | | `dot?` | `boolean` | `false` | Eyebrow variant only: show the accent dot before the label. | | `lead?` | `"true" \| "false"` | `false` | Variant option from textVariants. | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Variant option from textVariants. | | `tone?` | `"live" \| "violet"` | | Variant option from textVariants. | | `variant?` | `"default" \| "muted" \| "glass" \| "ghost" \| "eyebrow"` | `"default"` | Variant option from textVariants. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `muted`, `glass`, `ghost`, `eyebrow`. ## Accessibility - Renders semantic paragraph text by default. - `Text` renders a `

` element, which carries implicit paragraph semantics for screen readers. - Avoid nesting block-level elements inside ``, use inline elements such as `` or `` for emphasis within copy. - Color-only meaning (e.g. muted = disabled) must be supplemented with `aria-disabled` or equivalent on the containing control. - Reduced motion: No motion-dependent behavior. `Text` is a static element with no animation. It is unaffected by `prefers-reduced-motion`. --- # Heading > Semantic heading primitive with independent style scaling. - id: `heading` - type: primitive - category: Text and code - tags: primitive - docs: https://glinui.com/docs/components/radix/heading - markdown: https://glinui.com/md/heading.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add heading ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/heading.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Heading } from "@glinui/ui" ``` ## Usage Display heading with an eyebrow, lead, and byline. The size prop sets the scale, level sets the outline. ```tsx import { Avatar, Heading, Text } from "@glinui/ui" export function ArticleHeader() { return (

Engineering, 8 min read How we cut cold starts from 900 ms to 90 ms A walk through snapshotting, lazy imports and the one runtime flag that did most of the work.
Maya Kovacs Platform team, Oct 7 2026
) } ``` ### Type scale Six sizes, independent of the semantic level. ```tsx import { Heading } from "@glinui/ui" const scale = ["display", "h2", "h3", "lg", "md", "sm"] as const export function TypeScale() { return (
{scale.map((size) => (
Quarterly review size="{size}"
))}
) } ``` ### Variants Outline, ghost and glass surfaces. Glass needs a colorful backdrop behind it. ```tsx import { Heading } from "@glinui/ui" export function HeadingVariants() { return (
Default Outline Ghost Glass
) } ``` ## Props ### HeadingProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `level?` | `HeadingLevel` | `2` | | | `size?` | `"sm" \| "md" \| "lg" \| "display" \| "h2" \| "h3"` | `"md"` | Variant option from headingVariants. | | `variant?` | `"default" \| "glass" \| "outline" \| "ghost"` | `"default"` | Variant option from headingVariants. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `glass`, `outline`, `ghost`. ## Accessibility - Preserves semantic heading hierarchy with configurable level. - Always use headings in a logical, non-skipping order (h1 → h2 → h3) to maintain a coherent document outline for screen readers. - The `level` prop controls the rendered HTML tag, never override this with CSS `display` tricks that break semantics. - Decoupling `level` from `size` lets you meet visual design requirements without compromising heading hierarchy. - Avoid using multiple `level={1}` headings on a single page; pages should have exactly one `

`. - Reduced motion: No motion-dependent behavior. `Heading` is a static text primitive with no animation. No reduced-motion considerations apply. --- # Text Reveal > Word-by-word opacity reveal driven by scroll position. - id: `text-reveal` - type: signature - category: Text and code - tags: signature - docs: https://glinui.com/docs/components/text-reveal - markdown: https://glinui.com/md/text-reveal.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add text-reveal ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/text-reveal.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { TextReveal, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage ```tsx import { TextReveal } from "@glinui/ui" export function TextRevealLongDemo() { return ( ) } ``` ## Props ### TextRevealProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `duration?` | `number` | | Duration per word in ms (`reveal` mode). | | `engine?` | `EngineName` | | Engine override: `css` (default), `motion`, `gsap` or a registered custom engine. | | `immediate?` | `boolean` | `false` | Play on mount instead of waiting for the viewport (`reveal` mode). | | `mode?` | `"scroll" \| "reveal"` | `"scroll"` | `scroll` (default) scrubs word opacity with scroll position and is css only. `reveal` plays a timed word-by-word reveal once in view, dri... | | `motion?` | `MotionLevel` | | Motion override. `none` renders the static final state, `subtle` is opacity only. | | `step?` | `number` | `60` | Delay between words in ms (`reveal` mode). Default 60. | | `text` | `string` | | | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - All text is in the DOM and readable by screen readers at all times. - Opacity is visual only, content is never hidden from assistive technologies. - Reduced motion: When `prefers-reduced-motion` is active, all words are immediately shown at full opacity. --- # Reveal Text > Text that reveals through a clip-path wipe animation triggered on view. - id: `reveal-text` - type: signature - category: Text and code - tags: signature - docs: https://glinui.com/docs/components/reveal-text - markdown: https://glinui.com/md/reveal-text.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add reveal-text ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/reveal-text.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { RevealText, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage ```tsx "use client" import { RevealText } from "@glinui/ui" export function RevealTextDirectionsDemo() { return (

) } ``` ## Props ### RevealTextProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `delay?` | `number` | `0` | Delay before animation starts, in ms | | `direction?` | `"left" \| "right" \| "top" \| "bottom"` | `"left"` | Reveal direction | | `duration?` | `number` | `0.8` | Animation duration in seconds | | `engine?` | `EngineName` | | Engine override: `css` (default), `motion`, `gsap` or a registered custom engine. | | `motion?` | `MotionLevel` | | Motion override. `none` renders the static final state, `subtle` is opacity only. | | `text` | `string` | | Text to reveal | | `threshold?` | `number` | `0.5` | Intersection threshold | | `triggerOnView?` | `boolean` | `true` | Trigger on intersection | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The text content is always present in the DOM for screen readers. - The animation is purely visual via `clip-path`. - Reduced motion: When `prefers-reduced-motion: reduce` is active, the text is shown immediately with no animation. --- # Typewriter > Character-by-character typing animation with blinking cursor and loop support. - id: `typewriter` - type: signature - category: Text and code - tags: signature - docs: https://glinui.com/docs/components/typewriter - markdown: https://glinui.com/md/typewriter.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add typewriter ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/typewriter.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Typewriter, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage ```tsx "use client" import { Typewriter } from "@glinui/ui" export function TypewriterWordsDemo() { return (

Build{" "}

) } ``` ```tsx "use client" import { Typewriter } from "@glinui/ui" export function TypewriterLoopDemo() { return (

) } ``` ```tsx "use client" import { Typewriter } from "@glinui/ui" export function TypewriterCustomDemo() { return (
) } ``` ## Props ### TypewriterProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `cursor?` | `boolean` | `true` | Show a blinking cursor. Default: true | | `cursorChar?` | `string` | `"\|"` | The cursor character. Default: "\|" | | `delay?` | `number` | `0` | Initial delay before typing starts, in ms. Default: 0 | | `deleteSpeed?` | `number` | `30` | Milliseconds per character when deleting. Default: 30 | | `engine?` | `EngineName` | | Engine override: `css` (default), `motion`, `gsap` or a registered custom engine. | | `loop?` | `boolean` | `false` | Loop the typing animation. Default: false | | `motion?` | `MotionLevel` | | Motion override. `none` renders the static final state, `subtle` is opacity only. | | `onComplete?` | `() => void` | | Callback fired when a word finishes typing (fires per cycle). | | `pauseDuration?` | `number` | `1500` | Pause at end before deleting/retyping, in ms. Default: 1500 | | `speed?` | `number` | `50` | Milliseconds per character when typing. Default: 50 | | `text?` | `string` | | The text to type out (single string mode). | | `words?` | `string[]` | | Array of words/phrases to cycle through (multi-word mode). | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The component renders with `aria-label` set to the full `text` value so screen readers announce the complete text immediately. - The typed characters and cursor are both `aria-hidden="true"` to prevent partial reading. - No interactive elements are created by the typewriter itself. - Reduced motion: When `prefers-reduced-motion: reduce` is active, the full text is displayed immediately with no animation. The cursor remains visible but does not blink. --- # Word Rotate > Cycling text animation that rotates through an array of words. - id: `word-rotate` - type: signature - category: Text and code - tags: signature - docs: https://glinui.com/docs/components/word-rotate - markdown: https://glinui.com/md/word-rotate.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add word-rotate ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/word-rotate.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { WordRotate, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage ```tsx "use client" import { WordRotate } from "@glinui/ui" export function WordRotateFastDemo() { return (

Powered by{" "}

) } ``` ## Props ### WordRotateProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `animationDuration?` | `number` | `300` | Animation speed for enter/exit (ms) | | `duration?` | `number` | `2500` | Duration each word is shown (ms) | | `engine?` | `EngineName` | | Engine override: `css` (default), `motion`, `gsap` or a registered custom engine. | | `motion?` | `MotionLevel` | | Motion override. `none` renders the static final state, `subtle` is opacity only. | | `words` | `string[]` | | Array of words to cycle through | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The component renders with `aria-live="polite"` so screen readers announce each new word as it appears. - The outgoing word is removed from the DOM after its exit animation, preventing duplicate announcements. - Surrounding static text is not affected by the live region and is read normally. - Reduced motion: When `prefers-reduced-motion: reduce` is active, word cycling stops and the first word in the `words` array is displayed statically without any animation. --- # Chromatic Text > Text with chromatic aberration effect, RGB channel splitting. - id: `chromatic-text` - type: signature - category: Text and code - tags: signature - docs: https://glinui.com/docs/components/chromatic-text - markdown: https://glinui.com/md/chromatic-text.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add chromatic-text ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/chromatic-text.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { ChromaticText } from "@glinui/ui" ``` ## Usage ```tsx import { Badge, Button, ChromaticText, Text } from "@glinui/ui" export function EventTeaser() { return (
Live, Nov 12

Signal Conf 2026

One day of talks on realtime systems, observability and the humans who carry the pager.
) } ``` ```tsx import { ChromaticText } from "@glinui/ui" export function ChromaticVariants() { return (
Default Glitch Neon
) } ``` ## Props ### ChromaticTextProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `colors?` | `[string, string]` | `["var(--tone-danger)", "var(--tone-in...` | Colors for the channels [red, blue]. Defaults come from theme tokens; the fringes sit behind the base text so they read on any stage. | | `duration?` | `number` | `0` | Animation duration in seconds (0 = static) | | `offset?` | `number` | `2` | Offset amount in px for the chromatic split | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Ghost layers are `aria-hidden="true"`, screen readers only see the base text. - The base text remains fully readable and accessible. - Reduced motion: When `prefers-reduced-motion: reduce` is active, the animated chromatic shift is paused via `motion-reduce:[animation:none]`. The static offset layers remain visible. --- # Hyper Text > Text that scrambles through random characters and settles on the real string, on hover, in view or on mount. - id: `hyper-text` - type: primitive - category: Text and code - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/hyper-text - markdown: https://glinui.com/md/hyper-text.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add hyper-text ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/hyper-text.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { HyperText, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Hyper Text by Magic UI (MIT). Improvements: no motion dependency (a single rAF loop), per code point cells with no layout shift, graphemes kept together for emoji and combining marks, view and mount triggers, SSR renders the final text so there is no hydration mismatch, and every frame and timer is cancelled on unmount. Engines: this component drives its main animation through the pluggable motion engine. Pass `engine` (css, motion or gsap), wrap a subtree in `MotionEngineProvider`, or set `data-glin-engine` on ``. The css engine is built in and dependency free; motion and gsap are opt-in via `@glinui/motion/register/*`. `motion="none"` renders the final state and `subtle` is opacity only. Hover or focus the heading to re-run the scramble. ```tsx import { Badge, HyperText } from "@glinui/ui" export function Demo() { return (
Changelog Version 0.4 is live

Hover the headline to scramble it again.

) } ``` ### On view with custom characters Runs once when scrolled into view, scrambling through binary digits. ```tsx import { HyperText } from "@glinui/ui" export function Demo() { return ( Decrypting signal ) } ``` ### Proportional glyphs Turn off tabular cells to use the natural font width. ```tsx import { HyperText } from "@glinui/ui" export function Demo() { return Mixed width } ``` ## Props ### HyperTextProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `as?` | `HyperTextTag` | `"div"` | Element to render. | | `characterSet?` | `string \| readonly string[]` | `DEFAULT_CHARACTER_SET` | Characters used while scrambling. Defaults to A to Z. | | `children` | `string` | | The text to reveal. | | `delay?` | `number` | `0` | Delay before an automatic run (view or mount) in milliseconds. | | `duration?` | `number` | `800` | Scramble length in milliseconds. | | `engine?` | `EngineName` | | Engine override: `css` (default), `motion`, `gsap` or a registered custom engine. | | `focusable?` | `boolean` | `false` | Make the element tabbable so keyboard users can trigger the hover effect. | | `motion?` | `MotionLevel` | | Motion override. `none` renders the static final state, `subtle` is opacity only. | | `tabular?` | `boolean` | `true` | Render every glyph in a one character wide cell so the line never changes width. | | `trigger?` | `HyperTextTrigger` | `"hover"` | When the scramble runs: pointer or keyboard focus, once in view, or once on mount. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The real string is always present in a screen reader only span; the scrambling glyph layer is aria-hidden. - Assistive tech never reads random characters. - With focusable, keyboard focus triggers the same effect as hover and shows a visible focus ring. Keyboard: | Key | Action | | --- | --- | | Tab | Focus the text (only when focusable is set) to run the scramble. | ARIA: - `aria-hidden` on the glyph layer - real text in an `sr-only` span - Reduced motion: With prefers-reduced-motion, or Glin motion level none or subtle, no scramble runs and the final text is shown immediately. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/hyper-text. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Morphing Text > Cycles through words with a gooey blur and threshold morph, paused off screen and static under reduced motion. - id: `morphing-text` - type: primitive - category: Text and code - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/morphing-text - markdown: https://glinui.com/md/morphing-text.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add morphing-text ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/morphing-text.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { MorphingText, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Morphing Text by Magic UI (MIT). Improvements: the SVG filter id is unique per instance (the original used a global id that collides), the loop pauses off screen, large frame gaps are clamped, text size is container relative with clamp, and initial markup is the first text, readable before JS runs. Difference from Word Rotate: Morphing Text is a blur and threshold gooey crossfade in place, Word Rotate swaps words with a vertical slide. Engines: the `engine` prop is not applicable. Continuous glyph cross-fade driven by a css filter loop; an engine adds nothing. Cycles through three words. ```tsx import { MorphingText } from "@glinui/ui" export function Demo() { return (

Your workspace is

) } ``` ### Slower timing Longer morph and rest times, smaller text via className. ```tsx import { MorphingText } from "@glinui/ui" export function Demo() { return ( ) } ``` ## Props ### MorphingTextProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `cooldownTime?` | `number` | `0.5` | Seconds each text rests before the next morph. | | `morphTime?` | `number` | `1.5` | Seconds a morph takes. | | `texts` | `string[]` | | Words or phrases to cycle through. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - All texts are exposed once in a screen reader only span, so the animation never spams a live region. - The visual layer is aria-hidden. - The loop pauses while the component is off screen and in background tabs. ARIA: - `aria-hidden` on the visual layer - all texts joined in an `sr-only` span - Reduced motion: Motion level none (or prefers-reduced-motion) shows the first text and runs no loop. Level subtle swaps texts with a plain opacity crossfade, no blur and no filter. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/morphing-text. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Sparkles Text > Text with twinkling star sparkles that scale and rotate, with a static accent under reduced motion. - id: `sparkles-text` - type: primitive - category: Text and code - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/sparkles-text - markdown: https://glinui.com/md/sparkles-text.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add sparkles-text ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/sparkles-text.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { MAX_SPARKLES, SparklesText, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Sparkles Text by Magic UI (MIT). Improvements: no motion dependency (Web Animations API), sparkles are created after mount so there is no hydration mismatch from Math.random, a fixed pool re-rolls position in place instead of replacing DOM every 100ms, positions use logical inline-start so RTL mirrors, and the count is capped. Engines: the `engine` prop is not applicable. Continuous particle twinkle in css keyframes; no entrance to hand to an engine. ```tsx import { Button, SparklesText } from "@glinui/ui" export function Demo() { return (
Glin UI Pro

Lifetime access to every template.

) } ``` ### Custom colors and count Any CSS color works, including tokens. ```tsx import { SparklesText } from "@glinui/ui" export function Demo() { return ( Shipped ) } ``` ## Props ### SparklesTextProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `as?` | `"div" \| "span" \| "p" \| "h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6"` | `"div"` | Element to render. | | `children` | `React.ReactNode` | | | | `colors?` | `SparklesTextColors` | `DEFAULT_COLORS` | Sparkle colors. Any CSS color, defaults to Glin tokens. | | `sparklesCount?` | `number` | `10` | Number of sparkles alive at once. Capped at 24. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The text is real DOM text and is read normally. - Every sparkle is a decorative svg with aria-hidden and is pointer-events none. - No flashing: sparkles scale and fade over about one second each. ARIA: - `aria-hidden` on every sparkle - Reduced motion: With prefers-reduced-motion or motion level none or subtle, the animated pool is replaced by two static stars. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/sparkles-text. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Gradient Text > Flowing gradient or shine sweep text, optionally inside a solid or glass pill badge. - id: `gradient-text` - type: primitive - category: Text and code - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/gradient-text - markdown: https://glinui.com/md/gradient-text.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add gradient-text ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/gradient-text.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { GradientText, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS, SURFACE_VARIANT_ALIASES } from "@glinui/ui" ``` ## Usage Adapted from Animated Gradient Text and Animated Shiny Text by Magic UI (MIT). Improvements: colors come from tokens, the badge wrapper ships with solid and glass surfaces, forced-colors fallback, and the sweep is a Web Animations API loop with no global keyframes. Not to be confused with Animated Gradient, which is a background. A shine badge and a flowing gradient phrase inside a headline on a dark section. ```tsx import { ArrowRight } from "@phosphor-icons/react" import { Button, GradientText, Text } from "@glinui/ui" export function Announcement() { return (
Now in public beta

Design systems that ship themselves

Sync tokens from Figma, open a pull request with the diff and publish a versioned package, all from one workflow.
) } ``` ### Effects and badges Flow and shine effects, custom colors, and badge surfaces. ```tsx import { GradientText } from "@glinui/ui" export function GradientVariants() { return (
Flow effect Shine effect Custom colors
Badge Outline badge Glass badge
) } ``` ## Props ### GradientTextProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `badge?` | `boolean` | `false` | Wrap the text in a pill badge. `variant` styles the pill surface. | | `effect?` | `"flow" \| "shine"` | `"flow"` | `flow` slides a looping two color gradient, `shine` sweeps a glint over muted text. | | `from?` | `string` | | Gradient start color (flow) or text color (shine). Any CSS color, defaults to Glin tokens. | | `speed?` | `number` | `1` | Animation speed multiplier. 1 is a 6 second loop for flow, 3 seconds for shine. | | `to?` | `string` | | Gradient end color (flow) or glint color (shine). | | `variant?` | `SurfaceVariant \| "default"` | | Badge surface (with `badge`). Omit for the ambient design style (glinr by default). Vocabulary: glinr, solid, plain, soft, outline, ghost... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`. ## Accessibility - Plain inline text, fully selectable and readable. - Under forced colors (Windows high contrast) the clip gradient is dropped and the text uses CanvasText, so it never disappears. - Keep contrast in mind: pick from and to colors that pass 3:1 against the background for large text. - Reduced motion: With prefers-reduced-motion or motion level none or subtle, the gradient is rendered static, with no sweep. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/animated-gradient-text. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Gooey Text Reveal > Heading whose words melt in through a shared SVG goo filter, or morph between phrases. - id: `gooey-text-reveal` - type: primitive - category: Text and code - tags: primitive - docs: https://glinui.com/docs/components/radix/gooey-text-reveal - markdown: https://glinui.com/md/gooey-text-reveal.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add gooey-text-reveal ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/gooey-text-reveal.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { GooeyTextReveal, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Our own design, written from a behavior spec. One SVG filter (a small gaussian blur plus an alpha contrast matrix) is shared by the whole stage, and each word fades and blurs in with a staggered delay, so the soft edges merge like liquid before settling. The filter is attached only while an animation runs and is removed afterwards, so settled type is always crisp. Every instance gets its own filter id from `useId`. Pass an array to `text` to morph between phrases in a loop (the loop pauses offscreen and in hidden tabs). SVG filters on large HTML text cost GPU time: keep it to headings and avoid several large instances in the viewport at once. Safari renders CSS filters that reference SVG filters on HTML but can soften text mid animation, which is expected. The headline melts in when it scrolls into view. ```tsx import { GooeyTextReveal } from "@glinui/ui" export function Demo() { return } ``` ### Variants Type treatments for each style. ```tsx ``` ### States Morph between phrases, or tune the blob size and stagger. ```tsx ``` ## Props ### GooeyTextRevealProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `as?` | `GooeyTag` | `"h2"` | Element to render. | | `blur?` | `number` | `12` | Blur radius in pixels at the start of a reveal. Larger values give fatter blobs. | | `duration?` | `number` | `900` | Duration of one word reveal or one morph in milliseconds. | | `hold?` | `number` | `2200` | Time each phrase rests before the next morph, in milliseconds (morph mode). | | `once?` | `boolean` | `true` | Reveal once (true) or replay every time the text re-enters the viewport (reveal mode, trigger view). | | `stagger?` | `number` | `90` | Delay between words in milliseconds (reveal mode). | | `text` | `string \| string[]` | | A string reveals word by word with a liquid edge. An array of two or more strings morphs from one to the next in a loop, like a droplet c... | | `trigger?` | `"mount" \| "view"` | `"view"` | Start on mount or when scrolled into view (reveal mode). | | `variant?` | `"default" \| "plain" \| "glass"` | `"default"` | Variant option from gooeyTextRevealVariants. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `plain`, `glass`. ## Accessibility - The full text is the element's accessible name through `aria-label`; the animated words and the SVG are `aria-hidden`. - Array text is announced as a comma separated list of every phrase. - The heading level is yours to choose with `as`. - Animation pauses offscreen and while the tab is hidden. ARIA: - `aria-label` on the root with the full text - `aria-hidden="true"` on the stage and the filter SVG - Reduced motion: Motion subtle swaps the goo for a plain opacity fade. Under motion none or prefers-reduced-motion the component renders its static frame. The final text is shown with no filter. --- # Spinning Text > Text laid out on a rotating circle with an accessible name and pause on hover. - id: `spinning-text` - type: primitive - category: Text and code - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/spinning-text - markdown: https://glinui.com/md/spinning-text.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add spinning-text ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/spinning-text.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { SpinningText, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Spinning Text by Motion Primitives (MIT). Modified: motion/react removed (the ring turns through the Web Animations API), per-glyph angle is a CSS variable, the string is the accessible name of a `role="img"` wrapper, and RTL mirrors the glyph order and spin direction. Improvement over the original: pause on hover or focus, pause offscreen and in hidden tabs, static ring at motion none, no inline style attributes. End the string with a separator and a space so the loop reads as a ring: `"open source * made to be owned * "`. A rotating seal. Hover to pause. ```tsx import { SpinningText } from "@glinui/ui" {"open source * made to be owned * "} ``` ### Variants Type treatments. ```tsx {"glass * glass * "} ``` ### States Speed, direction and ring size. ```tsx ... ``` ## Props ### SpinningTextProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `children` | `string` | | The string laid out on the ring. It becomes the accessible name. | | `duration?` | `number` | `10` | Seconds per full turn. | | `fontSize?` | `number` | `1` | Glyph size in rem. | | `pauseOnHover?` | `boolean` | `false` | Pause the rotation while hovered or focused within. | | `radius?` | `number` | `5` | Ring radius in ch units. | | `reverse?` | `boolean` | `false` | Spin counter-clockwise. In RTL documents the default direction is mirrored. | | `variant?` | `"default" \| "plain" \| "glass"` | `"default"` | Variant option from spinningTextVariants. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `plain`, `glass`. ## Accessibility - The wrapper is `role="img"` with `aria-label` set to the full string; the individual glyphs are `aria-hidden`. - Decorative by default. Pair it with a visible heading if the text carries meaning. - Never traps focus or intercepts pointer events beyond the optional hover pause. ARIA: - `role="img"` with `aria-label` - `aria-hidden="true"` on the glyph ring - Reduced motion: The ring only turns at motion level full. Under motion none or prefers-reduced-motion the component renders its static frame. Glyphs stay placed on the circle. ## Provenance Adapted from Motion Primitives (MIT, Copyright (c) 2024 ibelick). Upstream: https://motion-primitives.com/docs/spinning-text. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Code > Inline code element for commands, snippets, and tokenized literals. - id: `code` - type: primitive - category: Text and code - tags: primitive - docs: https://glinui.com/docs/components/radix/code - markdown: https://glinui.com/md/code.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add code ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/code.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Code, LIFT_RING, LIFT_MONO_LABEL, PLAIN_CONTAINER, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS, SURFACE_VARIANT_ALIASES } from "@glinui/ui" ``` ## Usage Code marks identifiers, values and commands inside prose. The block variant sets a one line command apart. ```tsx import { Code, Heading, Text } from "@glinui/ui" export function RetryDocs() { return (
Configure retries Set maxRetries on the client to control how often a failed request is repeated. The default is 3, and requests that return 4xx are never retried. Override it per call with client.get(url, {"{ maxRetries: 0 }"}) or set the ACME_MAX_RETRIES variable in your environment. pnpm acme config set maxRetries 5
) } ``` ### Variants and tones Surface variants plus tones for status values. ```tsx import { Code } from "@glinui/ui" export function CodeVariants() { return (
{(["glinr", "plain", "soft", "outline", "ghost", "solid"] as const).map((variant) => ( {variant} ))} {(["accent", "success", "warning", "danger"] as const).map((tone) => ( {tone} ))}
) } ``` ### Variants The `variant` prop adjusts the surface behind the code token, filled, glass-blurred, border-only, or fully transparent. ```tsx import { Code } from "@glinui/ui" export function CodeVariantDemo() { return (
default glass outline ghost
) } ``` ## Props ### CodeProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `"sm" \| "md" \| "lg"` | | | | `tone?` | `SurfaceTone` | | | | `variant?` | `SurfaceVariant \| "block" \| "default" \| "primary" \| "secondary" \| "destructive" \| "success" \| "warnin...` | | Visual variant. Omit for the ambient design style (glinr by default). `block` renders a full width code well: inset well under glinr, fla... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `block`, `default`, `primary`, `secondary`, `destructive`, `success`, `warning`, `info`, `raised`, `frosted`. ## Accessibility - Uses semantic `` element for inline code fragments. - `Code` renders a native `` element, which assistive technologies announce as a code region. - Screen readers may vocalize code content differently, keep snippets short and purposeful. - Do not use `Code` for decorative styling; only wrap content that is genuinely code or a technical literal. - Ensure sufficient contrast between the code token and the surrounding prose in all variants. - Reduced motion: No motion-dependent behavior. `Code` is a static inline element with no animation. No reduced-motion considerations apply. --- # Code Panel > Raised header bar over an inset code well with tok-k, tok-s, tok-c and tok-f token classes. - id: `code-panel` - type: primitive - category: Text and code - tags: primitive - docs: https://glinui.com/docs/components/radix/code-panel - markdown: https://glinui.com/md/code-panel.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add code-panel ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/code-panel.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { CodePanel, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS, SURFACE_VARIANT_ALIASES, STYLE_DEFAULT_VARIANT, GlinProvider, GLIN_MOTIONS } from "@glinui/ui" ``` ## Usage A docs page step: install tabs, then a CodePanel whose header tabs switch between filenames. Copy always matches the visible file. ```tsx "use client" import { Fragment, useState } from "react" import { CodePanel, Heading, InstallCommand, Tabs, TabsContent, TabsList, TabsTrigger, Text, tokens } from "@glinui/ui" type Part = string | readonly ["k" | "s" | "c" | "f", string] const layoutLines: Array = [[["k","import"]," { GlinProvider } ",["k","from"]," ",["s","\"@glinui/ui\""]],[["k","import"]," ",["s","\"@glinui/tokens/styles.css\""]],[],[["k","export default function"]," ",["f","RootLayout"],"({ children }) {"],[" ",["k","return"]," ("],[" "],[" "],[" {children}"],[" "],[" "],[" )"],["}"]] const pageLines: Array = [[["k","import"]," { Button } ",["k","from"]," ",["s","\"@glinui/ui\""]],[],[["k","export default function"]," ",["f","Page"],"() {"],[" ",["k","return"]," "],["}"]] const textOf = (lines: Array) => lines.map((line) => line.map((part) => (typeof part === "string" ? part : part[1])).join("")).join("\n") function Lines({ lines }: { lines: Array }) { return ( <> {lines.map((parts, index) => ( {tokens(...parts)} {index < lines.length - 1 ? "\n" : null} ))} ) } export function QuickStart() { const [file, setFile] = useState("layout") return (
Getting started Add Glin UI to a Next.js app Two packages, one import and your first component. It takes about two minutes.
1. Install the packages 2. Wrap your app and use a component
layout.tsx page.tsx } >
) } ``` ### Variants Glinr raised panel, plain flat block and outline, each with a filename title and copy button. ```tsx import { CodePanel, tokens } from "@glinui/ui" const variants = ["glinr", "plain", "outline"] as const export function PanelVariants() { return (
{variants.map((variant) => ( {tokens(["k", "const"], " retries = ", ["f", "3"], "\n", ["c", "// 4xx errors never retry"])} ))}
) } ``` ## Props ### CodePanelProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `actions?` | `React.ReactNode` | | Header slot on the right. When `copyValue` is set a CopyButton is appended. | | `codeLabel?` | `string` | `"Code"` | Accessible label for the scrollable code region. | | `copyValue?` | `string` | | Adds a CopyButton to the header copying this text. | | `hideHeader?` | `boolean` | `false` | Hide the header bar entirely. | | `onCopy?` | `(value: string) => void` | | Called when the built-in CopyButton succeeds. | | `preClassName?` | `string` | | Classes for the `pre` element. | | `tabs?` | `React.ReactNode` | | Header slot after the title, for example a tab group. | | `title?` | `React.ReactNode` | | Header title (usually a file name). | | `tone?` | `SurfaceTone` | | | | `variant?` | `SurfaceVariant \| "default" \| "raised" \| "frosted"` | | Visual variant. Omit for the ambient design style: glinr is the canonical raised panel (header strip + inset well), plain is a flat borde... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `raised`, `frosted`. ## Accessibility - The code well is focusable so keyboard users can scroll it horizontally. - Token colors rely on the tok-k, tok-s, tok-c and tok-f classes, never on color alone for meaning. ARIA: - aria-label on the pre element - Reduced motion: No motion. --- # Install Command > Package manager tabs, a $ prefixed command and a copy button inside a code panel. - id: `install-command` - type: primitive - category: Text and code - tags: primitive - docs: https://glinui.com/docs/components/radix/install-command - markdown: https://glinui.com/md/install-command.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add install-command ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/install-command.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { InstallCommand } from "@glinui/ui" ``` ## Usage Package manager tabs for a package, plus a custom command map for a registry add. ```tsx import { Heading, InstallCommand, Text } from "@glinui/ui" export function InstallDocs() { return (
Install the CLI Pick your package manager. The command is copied exactly as shown. Or add a single component with the registry command.
) } ``` ### Variants Surface variants of the underlying CodePanel. ```tsx import { InstallCommand } from "@glinui/ui" export function InstallVariants() { return (
) } ``` ## Props ### InstallCommandProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `commands?` | `Record` | | Custom tab label to full command map. Keys become the tabs, in insertion order. | | `defaultValue?` | `string` | | Initial tab when uncontrolled. Defaults to the first tab. | | `onCopy?` | `(command: string, tab: string) => void` | | Called after a successful copy with the copied command (without the `$`). | | `onValueChange?` | `(value: string) => void` | | Called when the tab changes. | | `packageName?` | `string` | `"@glinui/ui"` | Package name(s); builds npm / pnpm / yarn / bun commands. Ignored when `commands` is set. | | `tabsLabel?` | `string` | `"Package manager"` | Accessible name of the tab list. | | `title?` | `React.ReactNode` | | Header title. | | `value?` | `string` | | Controlled active tab. | | `variant?` | `CodePanelProps["variant"]` | | Surface variant of the underlying CodePanel. Omit for the ambient design style (glinr canonical, plain flat block, glass opt-in). | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `variant`. ## Accessibility - Built on Tabs: arrow keys move between package managers. - The $ prefix is hidden from assistive technology and from selection. Keyboard: | Key | Action | | --- | --- | | ArrowLeft / ArrowRight | Move between tabs. | | Enter / Space | Activate the copy button. | - Reduced motion: No motion beyond the copy button press. --- # Terminal > Terminal window with sequenced typing and output, a full transcript and copy. - id: `terminal` - type: primitive - category: Text and code - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/terminal - markdown: https://glinui.com/md/terminal.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add terminal ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/terminal.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { AnimatedSpan, TypingAnimation, Terminal, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider, SURFACE_VARIANTS, SURFACE_TONES } from "@glinui/ui" ``` ## Usage Adapted from Terminal by Magic UI (MIT). Improvements: no animation library, timers with cleanup and Strict Mode safety, a static first render for SSR and reduced motion, a screen-reader transcript instead of live typing, a built-in copy button, glass variant and tokenised colors. Engines: this component drives its main animation through the pluggable motion engine. Pass `engine` (css, motion or gsap), wrap a subtree in `MotionEngineProvider`, or set `data-glin-engine` on ``. The css engine is built in and dependency free; motion and gsap are opt-in via `@glinui/motion/register/*`. `motion="none"` renders the final state and `subtle` is opacity only. Typed command followed by output lines. ```tsx import { AnimatedSpan, Terminal, TypingAnimation } from "@glinui/ui" export function Demo() { return ( pnpm dlx glinui init Detected Next.js and Tailwind CSS Wrote glinui.json and theme tokens pnpm dlx glinui add button card Added 2 components in 1.2s ) } ``` ### Variants Every vocabulary variant on the default tone. Omit variant to follow the ambient design style. ```tsx import { AnimatedSpan, Terminal } from "@glinui/ui" export function TerminalVariantsDemo() { return (
$ pnpm add @glinui/ui $ pnpm add @glinui/ui $ pnpm add @glinui/ui $ pnpm add @glinui/ui $ pnpm add @glinui/ui $ pnpm add @glinui/ui $ pnpm add @glinui/ui
) } ``` ### No sequence Every line starts on its own delay. ```tsx one two ``` ## Props ### AnimatedSpanProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `delay?` | `number` | `0` | Milliseconds to wait after this line's turn before it appears. | ### TerminalProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `copyValue?` | `string` | | Text copied by the button. Defaults to the full transcript. | | `engine?` | `EngineName` | | Engine override: `css` (default), `motion`, `gsap` or a registered custom engine. | | `motion?` | `MotionLevel` | | Motion override. `none` renders the static final state, `subtle` is opacity only. | | `outputClassName?` | `string` | | Class for the scrolling output area. | | `sequence?` | `boolean` | `true` | Reveal animated children one after another. | | `showCopy?` | `boolean` | `true` | Show the copy button. | | `startOnView?` | `boolean` | `true` | Wait until the terminal is scrolled into view before playing. | | `title?` | `string` | | Window title in the chrome. | | `tone?` | `SurfaceTone` | | | | `variant?` | `SurfaceVariant \| "default" \| "raised" \| "frosted"` | | Visual variant. Omit for the ambient design style (glinr: lift shell, raised chrome strip, inset output well; plain: flat bordered termin... | ### TypingAnimationProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `as?` | `"span" \| "div" \| "p"` | `"span"` | | | `children` | `string` | | Text to type. Must be a string. | | `delay?` | `number` | `0` | Milliseconds to wait after this line's turn before typing starts. | | `duration?` | `number` | `60` | Milliseconds per character. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `raised`, `frosted`. ## Accessibility - The first render, SSR and reduced motion all show the full final text. - While animating, the visual layer is aria-hidden and a screen-reader-only transcript carries the full text, so nothing is announced character by character. - The copy button announces the result through a polite live region. Keyboard: | Key | Action | | --- | --- | | Tab | Reaches the copy button; the output area has no extra tab stops. | ARIA: - `role=group` with `aria-label` - `aria-live=off` on the animated layer - Copy status is `role=status` - Reduced motion: Full motion types commands and fades lines in. Subtle fades lines in without typing. None, or prefers-reduced-motion, renders the full transcript at once. Timers are cleared on unmount. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/terminal. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Kbd > Keyboard keycap primitive for shortcuts and key hints. - id: `kbd` - type: primitive - category: Text and code - tags: primitive - docs: https://glinui.com/docs/components/radix/kbd - markdown: https://glinui.com/md/kbd.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add kbd ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/kbd.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Kbd, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS, SURFACE_VARIANT_ALIASES, STYLE_DEFAULT_VARIANT, GlinProvider, GLIN_MOTIONS } from "@glinui/ui" ``` ## Usage A shortcut cheat sheet grouped by task. ```tsx import { Card, CardContent, CardDescription, CardHeader, CardTitle, Kbd } from "@glinui/ui" export function Demo() { const groups = [ { title: "Navigation", rows: [["Open command palette", ["Ctrl", "K"]], ["Go to dashboard", ["G", "D"]], ["Toggle sidebar", ["Ctrl", "B"]]] }, { title: "Editing", rows: [["Save", ["Ctrl", "S"]], ["Undo", ["Ctrl", "Z"]], ["Duplicate line", ["Shift", "Alt", "Down"]]] } ] as const return ( Keyboard shortcuts Press ? anywhere to open this list. {groups.map((group) => (

{group.title}

{group.rows.map(([label, keys]) => (
{label} {keys.map((key) => ( {key} ))}
))}
))}
) } ``` ### Inline hints A search field hint, keys in running text and three sizes. ```tsx import { MagnifyingGlass } from "@phosphor-icons/react" import { Input, Kbd } from "@glinui/ui" export function Demo() { return (

Press Esc to close, Enter to open the first result.

sm md lg
) } ``` ### Shortcuts Combine multiple `Kbd` elements with a `+` separator to represent compound key shortcuts. ```tsx import { Kbd } from "@glinui/ui" export function KbdShortcutDemo() { return (
⌘ + K
) } ``` ## Props ### KbdProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `"sm" \| "md" \| "lg"` | | | | `tone?` | `SurfaceTone` | | | | `variant?` | `SurfaceVariant \| "default" \| "primary" \| "secondary" \| "destructive" \| "success" \| "warning" \| "info...` | | Visual variant. Omit for the ambient design style (glinr: tactile raised key). | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `primary`, `secondary`, `destructive`, `success`, `warning`, `info`, `raised`, `frosted`. ## Accessibility - Uses semantic `` element for keyboard shortcuts. - `Kbd` renders a native `` element which is recognized by assistive technologies as denoting keyboard input. - Screen readers will announce the content of each `` element; use descriptive key names or Unicode symbols that read naturally. - Avoid using `` purely for styling, reserve it for actual keyboard key references. - Reduced motion: No motion-dependent behavior. `Kbd` is a static element with no animation. It is unaffected by `prefers-reduced-motion`. --- # Animated Gradient > Animated color-shifting gradient background with warm, cool, aurora, and glass presets. - id: `animated-gradient` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/animated-gradient - markdown: https://glinui.com/md/animated-gradient.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add animated-gradient ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/animated-gradient.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { AnimatedGradient } from "@glinui/ui" ``` ## Usage ```tsx import { AnimatedGradient, Button, Heading, Text } from "@glinui/ui" export function TrialBanner() { return (
Your trial ends in 3 days Keep your projects, history and team seats by picking a plan today.
) } ``` ```tsx import { Check } from "@phosphor-icons/react" import { AnimatedGradient, Badge, Button, Heading, Text } from "@glinui/ui" const plans = [ { name: "Starter", price: "$0", note: "For side projects", items: ["3 projects", "Community support"], featured: false }, { name: "Pro", price: "$24", note: "For growing teams", items: ["Unlimited projects", "Priority support", "Audit log export"], featured: true }, { name: "Scale", price: "$99", note: "For large orgs", items: ["SSO and SCIM", "99.99% uptime SLA"], featured: false } ] const card = "flex flex-col gap-4 rounded-2xl border border-[var(--line-soft)] bg-[var(--surface-1)] p-6 text-left" export function Pricing() { return (
{plans.map((plan) => { const body = ( <>
{plan.name} {plan.featured ? Most popular : null}

{plan.price}/ seat

{plan.note}
    {plan.items.map((item) => (
  • {item}
  • ))}
) return plan.featured ? ( {body} ) : (
{body}
) })}
) } ``` ```tsx import { AnimatedGradient } from "@glinui/ui" export function AnimatedGradientVariantsDemo() { return (
Warm Cool Aurora Glass
) } ``` ## Props ### AnimatedGradientProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `duration?` | `number` | `6` | | | `variant?` | `"default" \| "glass" \| "warm" \| "cool" \| "aurora"` | `"default"` | Variant option from gradientVariants. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `glass`, `warm`, `cool`, `aurora`. ## Accessibility - Decorative background container, content inside remains accessible. - No interactive elements in the gradient itself. - Reduced motion: Animation uses `motion-reduce:animate-none`. Under `prefers-reduced-motion`, the gradient renders as a static background. --- # Gradient Mesh > Generative mesh gradient background using overlapping radial gradients. - id: `gradient-mesh` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/gradient-mesh - markdown: https://glinui.com/md/gradient-mesh.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add gradient-mesh ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/gradient-mesh.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { GradientMesh } from "@glinui/ui" ``` ## Usage ```tsx import { GradientMesh, Badge, Button, Heading, Text } from "@glinui/ui" export function Hero() { return (
Dashboards 2.0 Answers from your data, without the SQL Connect a warehouse, ask in plain language and pin the result to a dashboard your whole team can open.
Works with
    {/* Your partner or customer logos go here */}
  • Vercel
  • GitHub
  • Cloudflare
  • Astro
) } ``` ```tsx import { GradientMesh } from "@glinui/ui" export function Variants() { return (
Default
Warm
Slow and soft
) } ``` ```tsx import { GradientMesh, Button, Heading, Input, Label, Text } from "@glinui/ui" export function SignIn() { return (
Sign in to Northwind Use your work email to continue.
) } ``` ## Props ### GradientMeshProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `blur?` | `number` | `60` | Blur intensity in px | | `colors?` | `string[]` | `["var(--color-accent)", "var(--tone-d...` | Gradient color stops. Defaults come from theme tokens. | | `duration?` | `number` | `10` | Animation duration in seconds | | `intensity?` | `number` | `0.6` | Overall intensity/opacity (0-1) | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders with `aria-hidden`, invisible to assistive technologies. - Purely decorative; carries no semantic meaning. - Reduced motion: Mesh animations are paused via `motion-reduce:[animation:none]`. Static gradients remain visible. --- # Aurora Background > Animated gradient mesh backdrop with floating blurred blobs. - id: `aurora-background` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/aurora-background - markdown: https://glinui.com/md/aurora-background.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add aurora-background ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/aurora-background.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { AuroraBackground } from "@glinui/ui" ``` ## Usage ```tsx import { AuroraBackground, Badge, Button, Heading, Text } from "@glinui/ui" export function Hero() { return (
Branch previews are live Ship every branch to a live URL Push to Git and get a shareable preview in under a minute, with logs, rollbacks and per-branch environment variables.
Works with
    {/* Your partner or customer logos go here */}
  • Vercel
  • GitHub
  • Cloudflare
  • Astro
) } ``` ```tsx import { AuroraBackground } from "@glinui/ui" export function Variants() { return (
Default
Cool tones
Dense
) } ``` ```tsx import { AuroraBackground, Button, Heading, Input, Label, Text } from "@glinui/ui" export function SignIn() { return (
Sign in to Northwind Use your work email to continue.
) } ``` ## Props ### AuroraBackgroundProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `blobCount?` | `number` | `3` | Number of gradient blobs | | `blur?` | `number` | `80` | Blur intensity in px | | `colors?` | `string[]` | `["var(--color-accent)", "var(--tone-i...` | Base colors for the aurora. Defaults come from theme tokens so the blobs read on light and dark scopes. | | `duration?` | `number` | `8` | Animation duration in seconds | | `intensity?` | `number` | `0.4` | Opacity of the aurora layer (0-1) | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The component renders with `aria-hidden`, invisible to assistive technologies. - Purely decorative; carries no semantic meaning. - Reduced motion: When `prefers-reduced-motion: reduce` is active, all blob animations are paused via `motion-reduce:[animation:none]`. The static gradient blobs remain visible. --- # Dot Pattern > Static SVG dot grid background with configurable size, gap, and theme colors. - id: `dot-pattern` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/dot-pattern - markdown: https://glinui.com/md/dot-pattern.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add dot-pattern ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/dot-pattern.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { DotPattern } from "@glinui/ui" ``` ## Usage ```tsx import { DotPattern, Badge, Button, Heading, Text } from "@glinui/ui" export function Hero() { return (
Docs, reimagined Documentation your team keeps current Write in Markdown, review in pull requests and publish to a fast static site with search and versioning built in.
Works with
    {/* Your partner or customer logos go here */}
  • Vercel
  • GitHub
  • Cloudflare
  • Astro
) } ``` ```tsx import { DotPattern } from "@glinui/ui" export function Variants() { return (
Default
Large dots
Tight
) } ``` ```tsx import { DotPattern, Button, Heading, Input, Label, Text } from "@glinui/ui" export function SignIn() { return (
Sign in to Northwind Use your work email to continue.
) } ``` ## Props ### DotPatternProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `cr?` | `number` | | | | `dotColor?` | `string` | `"currentColor"` | | | `dotOpacity?` | `number` | `0.2` | | | `dotSize?` | `number` | `1.5` | | | `gap?` | `number` | `20` | | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - SVG is marked `aria-hidden`, invisible to screen readers. - Purely decorative background pattern. - Reduced motion: No animation, static SVG pattern. No reduced motion handling needed. --- # Retro Grid > CSS perspective grid with scrolling lines for retro-futuristic backgrounds. - id: `retro-grid` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/retro-grid - markdown: https://glinui.com/md/retro-grid.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add retro-grid ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/retro-grid.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { RetroGrid } from "@glinui/ui" ``` ## Usage ```tsx import { RetroGrid, Badge, Button, Heading, Text } from "@glinui/ui" export function Hero() { return (
Oct 21, online Launch Week: five days, five releases Join the live walkthroughs, ask the engineers questions and get early access to everything we announce.
Works with
    {/* Your partner or customer logos go here */}
  • Vercel
  • GitHub
  • Cloudflare
  • Astro
) } ``` ```tsx import { RetroGrid } from "@glinui/ui" export function Variants() { return (
Default
Steep angle
Wide cells
) } ``` ```tsx import { RetroGrid, Button, Heading, Input, Label, Text } from "@glinui/ui" export function SignIn() { return (
Sign in to Northwind Use your work email to continue.
) } ``` ## Props ### RetroGridProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `angle?` | `number` | `65` | Perspective angle in degrees | | `cellSize?` | `number` | `60` | Grid cell size in px | | `lineColor?` | `string` | | Grid line color | | `lineOpacity?` | `number` | `0.3` | Grid line opacity (0-1) | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The grid element is marked `aria-hidden="true"`, invisible to assistive technologies. - Purely decorative; carries no semantic meaning. - Reduced motion: The perspective scroll animation is paused via `motion-reduce:animate-none` and `motion-reduce:[animation-play-state:paused]`. The static grid remains visible so the layout is unaffected. --- # Grid Pattern > SVG grid, stripes and interactive cell patterns with edge fades. - id: `grid-pattern` - type: primitive - category: Backgrounds - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/grid-pattern - markdown: https://glinui.com/md/grid-pattern.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add grid-pattern ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/grid-pattern.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { GridPattern, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Grid Pattern, Interactive Grid Pattern and Striped Pattern by Magic UI (MIT). Glin UI merges the three into one component with a variant prop, creates collision-free SVG pattern ids with useId, draws strokes with currentColor tied to the line token, and runs the interactive hover with CSS only. Use the fade prop (or your own mask) so the pattern dissolves toward the edges. Interactive cells need pointer events: content layered above the pattern will intercept them, and the cell count is capped at 1600. Highlighted squares pulse only at motion level full. Headline, subcopy, two buttons and a logo row sit above the effect. The section opts into the dark token scope so text keeps AA contrast. The logo row uses docs-only BrandIcon marks; swap in your own logos. ```tsx import { GridPattern, Badge, Button, Heading, Text } from "@glinui/ui" export function Hero() { return (
Open source A typed API client in every language Generate SDKs from your OpenAPI spec on every merge and publish them to npm, PyPI and Maven without leaving CI.
Works with
    {/* Your partner or customer logos go here */}
  • Vercel
  • GitHub
  • Cloudflare
  • Astro
) } ``` ### Variants Plain grid, dashed grid and the stripes variant. ```tsx import { GridPattern } from "@glinui/ui" export function Variants() { return (
Grid
Dashed
Stripes
) } ``` ### Behind a dashboard header A faded grid gives dashboard headers structure without competing with the data. ```tsx import { GridPattern, Button, Heading, Text } from "@glinui/ui" const stats = [ ["Requests", "2.41M", "+8.2%"], ["p95 latency", "184 ms", "-12 ms"], ["Error rate", "0.03%", "-0.01%"] ] export function UsageHeader() { return (
Production, last 24 hours API overview
{stats.map(([label, value, delta]) => (
{label}
{value}
{delta} vs yesterday
))}
) } ``` ## Props ### GridPatternProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `fade?` | `"none" \| "radial" \| "top" \| "bottom"` | `"none"` | Variant option from gridPatternVariants. | | `height?` | `number` | `40` | Cell height in px. | | `interactive?` | `boolean` | `false` | Cells light up on hover (CSS only). Content above the pattern will block pointer events. | | `squareColor?` | `string` | `"var(--color-accent)"` | Fill of highlighted and hovered cells. Defaults to the accent token. | | `squares?` | `GridPatternSquare[]` | | Highlighted cells as [column, row] pairs. | | `strokeDasharray?` | `string` | `"0"` | | | `variant?` | `"grid" \| "stripes"` | `"grid"` | Variant option from gridPatternVariants. | | `width?` | `number` | `40` | Cell width in px. | | `x?` | `number` | `-1` | | | `y?` | `number` | `-1` | | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `grid`, `stripes`. ## Accessibility - Decorative: aria-hidden, not focusable, pointer-events none (interactive cells opt back in). - Hover highlighting is a visual flourish only and has no keyboard equivalent by design. - Keep line contrast low behind text. ARIA: - `aria-hidden="true"` and `focusable="false"` on the svg - Reduced motion: Highlighted squares pulse at motion level full. With reduced motion or level none or subtle the squares are static, and hover cell transitions are removed. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/grid-pattern. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Flickering Grid > Canvas grid of squares that flicker, with token colors and a static fallback. - id: `flickering-grid` - type: primitive - category: Backgrounds - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/flickering-grid - markdown: https://glinui.com/md/flickering-grid.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add flickering-grid ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/flickering-grid.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { FlickeringGrid, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Flickering Grid by Magic UI (MIT). Glin UI resolves token and modern CSS colors (var(), oklch(), color-mix()) at runtime and re-resolves them when the theme changes, draws with a devicePixelRatio transform, caps the frame rate (30 fps by default), pauses the loop offscreen and in background tabs, uses a seeded starting pattern, and draws one static frame under reduced motion. The grid fills its parent (size-full), so give the parent a size. Keep maxOpacity at 0.3 or lower behind text. The loop costs battery, so avoid stacking several grids on one page. Headline, subcopy, two buttons and a logo row sit above the effect. The section opts into the dark token scope so text keeps AA contrast. The logo row uses docs-only BrandIcon marks; swap in your own logos. ```tsx import { FlickeringGrid, Badge, Button, Heading, Text } from "@glinui/ui" export function Hero() { return (
Status Know about the outage before your users do Probe from 14 regions every 30 seconds, route alerts to the right on-call and publish incidents to a status page.
Works with
    {/* Your partner or customer logos go here */}
  • Vercel
  • GitHub
  • Cloudflare
  • Astro
) } ``` ### Variants Square and round cells, and a busier field with a higher flicker chance. ```tsx import { FlickeringGrid } from "@glinui/ui" export function Variants() { return (
Square
Round
Busy
) } ``` ### Behind a dashboard header A quiet flicker behind live metrics suggests activity without distracting from numbers. ```tsx import { FlickeringGrid, Button, Heading, Text } from "@glinui/ui" const stats = [ ["Requests", "2.41M", "+8.2%"], ["p95 latency", "184 ms", "-12 ms"], ["Error rate", "0.03%", "-0.01%"] ] export function UsageHeader() { return (
Production, last 24 hours API overview
{stats.map(([label, value, delta]) => (
{label}
{value}
{delta} vs yesterday
))}
) } ``` ## Props ### FlickeringGridProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `color?` | `string` | `"var(--color-foreground)"` | Any CSS color, including var(), oklch() and color-mix(). Defaults to the foreground token. | | `flickerChance?` | `number` | `0.3` | Chance per second that a square re-rolls its opacity. | | `gridGap?` | `number` | `6` | Gap between squares in px. | | `maxFps?` | `number` | `30` | Frame cap for the flicker loop. | | `maxOpacity?` | `number` | `0.3` | Highest opacity a square can reach. Keep at or below 0.3 behind text. | | `seed?` | `number` | `7` | Seed for the deterministic starting pattern. | | `squareSize?` | `number` | `4` | Square edge in px. | | `variant?` | `"square" \| "round"` | `"square"` | | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `square`, `round`. ## Accessibility - Decorative canvas: aria-hidden, pointer-events none. - Flicker is low contrast and slow. Keep maxOpacity at 0.3 or lower; it never flashes more than three times per second per cell on average at default settings. - Content on top should still meet AA contrast. ARIA: - `aria-hidden="true"` on the wrapper - Reduced motion: At motion level full squares flicker through requestAnimationFrame. With prefers-reduced-motion or level none or subtle the grid draws a single static frame. The loop pauses offscreen and when the tab is hidden. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/flickering-grid. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Spotlight > Full-page spotlight overlay for onboarding and feature highlighting. - id: `spotlight` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/spotlight - markdown: https://glinui.com/md/spotlight.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add spotlight ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/spotlight.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Spotlight } from "@glinui/ui" ``` ## Usage ```tsx "use client" import { Spotlight } from "@glinui/ui" import { useState } from "react" export function SpotlightDemo() { const [active, setActive] = useState(false) return (
setActive(false)} />
) } ``` ```tsx "use client" import { Spotlight } from "@glinui/ui" export function SpotlightPulseDemo() { return ( {}} /> ) } ``` ## Props ### SpotlightProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `active?` | `boolean` | `true` | Whether the spotlight is active | | `onDismiss?` | `() => void` | | Click overlay to dismiss | | `overlayColor?` | `string` | `"rgba(0, 0, 0, 0.7)"` | Overlay color | | `pulse?` | `boolean` | `false` | Pulsing animation | | `size?` | `number` | `150` | Spotlight radius in px | | `x?` | `number \| string` | `"50%"` | X position of spotlight center (px or %) | | `y?` | `number \| string` | `"50%"` | Y position of spotlight center (px or %) | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - When `onDismiss` is provided, the overlay becomes a focusable button with `aria-label="Dismiss spotlight"`. - Supports keyboard dismissal via Enter and Space keys. - Without `onDismiss`, the overlay is a passive visual element. - Reduced motion: The pulse ring animation is paused via `motion-reduce:[animation:none]`. --- # Blur Spotlight > Cursor-following ambient glow effect for background layers. - id: `blur-spotlight` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/blur-spotlight - markdown: https://glinui.com/md/blur-spotlight.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add blur-spotlight ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/blur-spotlight.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { BlurSpotlight } from "@glinui/ui" ``` ## Usage ```tsx "use client" import { BlurSpotlight } from "@glinui/ui" export function BlurSpotlightDemo() { return (
Hover Me
) } ``` ```tsx "use client" import { BlurSpotlight } from "@glinui/ui" export function BlurSpotlightCustomDemo() { return (
Pink Glow
) } ``` ```tsx "use client" import { BlurSpotlight } from "@glinui/ui" export function BlurSpotlightSubtleDemo() { return (
Subtle
) } ``` ## Props ### BlurSpotlightProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `blur?` | `number` | `80` | Blur amount in px | | `color?` | `string` | `"var(--color-accent)"` | Spotlight color | | `intensity?` | `number` | `0.5` | Intensity/opacity (0-1) | | `size?` | `number` | `300` | Spotlight radius in px | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The component renders with `aria-hidden`, invisible to assistive technologies. - Purely decorative; carries no semantic meaning. - `pointer-events-none` ensures content beneath remains interactive. - Reduced motion: The entire spotlight layer is hidden via `motion-reduce:hidden` when reduced motion is preferred. --- # Light Rays > Soft swaying rays of light for hero and section backgrounds. - id: `light-rays` - type: primitive - category: Backgrounds - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/light-rays - markdown: https://glinui.com/md/light-rays.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add light-rays ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/light-rays.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { LightRays, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Light Rays by Magic UI (MIT). Glin UI replaces the motion library with the Web Animations API, builds a deterministic seeded ray layout (no Math.random during render, so no hydration mismatch), reads the accent token, mirrors in RTL, and pauses when offscreen or when the tab is hidden. Place the component as the first child of a relative parent and keep it behind content (use -z-10 or DOM order). Recommended intensity is 0.5 or lower behind body text so contrast stays at WCAG AA. Large blur radii are expensive to paint. Count is capped at 24 and only the rays carry will-change. Headline, subcopy, two buttons and a logo row sit above the effect. The section opts into the dark token scope so text keeps AA contrast. The logo row uses docs-only BrandIcon marks; swap in your own logos. ```tsx import { LightRays, Badge, Button, Heading, Text } from "@glinui/ui" export function Hero() { return (
SOC 2 Type II See every login before it becomes an incident Risk scoring on each sign in, device trust checks and one click session revocation from a single audit trail.
Works with
    {/* Your partner or customer logos go here */}
  • Vercel
  • GitHub
  • Cloudflare
  • Astro
) } ``` ### Variants Soft rays, crisp rays and another seed for a different layout. ```tsx import { LightRays } from "@glinui/ui" export function Variants() { return (
Soft
Crisp
Seed 4
) } ``` ### Behind a sign in card Rays at intensity 0.45 or lower keep body text above AA contrast. ```tsx import { LightRays, Button, Heading, Input, Label, Text } from "@glinui/ui" export function SignIn() { return (
Sign in to Northwind Use your work email to continue.
) } ``` ## Props ### LightRaysProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `blur?` | `number` | | Blur radius in px. Defaults to 24 (soft) or 6 (crisp). | | `color?` | `string` | `"var(--color-accent)"` | Any CSS color. Defaults to the accent token. | | `count?` | `number` | `7` | Number of rays, capped at 24. | | `intensity?` | `number` | `0.35` | Overall strength from 0 to 1. Keep at or below 0.5 behind text. | | `length?` | `string` | `"120%"` | CSS length of each ray, for example "70%" or "28rem". | | `seed?` | `number` | `1` | Seed for the deterministic ray layout. | | `speed?` | `number` | `14` | Seconds for one sway cycle. | | `variant?` | `"soft" \| "crisp"` | `"soft"` | Variant option from lightRaysVariants. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `soft`, `crisp`. ## Accessibility - Purely decorative: aria-hidden and pointer-events none, never focusable. - Keep intensity at 0.5 or lower behind text; verify AA contrast on your own background. - No information is carried by the rays. ARIA: - `aria-hidden="true"` on the root - Reduced motion: At motion level full the rays sway with WAAPI. With prefers-reduced-motion or data-glin-motion none or subtle, the rays render as a static frame with no animation. Animations also pause offscreen and in background tabs. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/light-rays. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Particle Field > Ambient floating particle system with CSS-only staggered animations. - id: `particle-field` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/particle-field - markdown: https://glinui.com/md/particle-field.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add particle-field ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/particle-field.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { ParticleField } from "@glinui/ui" ``` ## Usage ```tsx import { ParticleField, Badge, Button, Heading, Text } from "@glinui/ui" export function Hero() { return (
Realtime Presence for every page, in one hook Show who is viewing, typing and pointing without running your own socket servers or paying per connection.
Works with
    {/* Your partner or customer logos go here */}
  • Vercel
  • GitHub
  • Cloudflare
  • Astro
) } ``` ```tsx import { ParticleField } from "@glinui/ui" export function Variants() { return (
Default
Squares
Long drift
) } ``` ```tsx import { ParticleField, Button, Heading, Text } from "@glinui/ui" const stats = [ ["Requests", "2.41M", "+8.2%"], ["p95 latency", "184 ms", "-12 ms"], ["Error rate", "0.03%", "-0.01%"] ] export function UsageHeader() { return (
Production, last 24 hours API overview
{stats.map(([label, value, delta]) => (
{label}
{value}
{delta} vs yesterday
))}
) } ``` ## Props ### ParticleFieldProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `color?` | `string` | | Particle color | | `count?` | `number` | `30` | Number of particles | | `distance?` | `number` | `200` | Float distance in px | | `duration?` | `number` | `5` | Float duration in seconds | | `maxSize?` | `number` | `5` | Max particle size in px | | `minSize?` | `number` | `2` | Min particle size in px | | `shape?` | `"circle" \| "square"` | `"circle"` | Particle shape | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The component renders with `aria-hidden`, invisible to assistive technologies. - Purely decorative; carries no semantic meaning. - Reduced motion: All particle animations are paused via `motion-reduce:[animation:none]`. The static particles remain visible. --- # Meteor Shower > Falling diagonal streaks with staggered delays for hero backgrounds. - id: `meteor-shower` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/meteor-shower - markdown: https://glinui.com/md/meteor-shower.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add meteor-shower ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/meteor-shower.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { MeteorShower } from "@glinui/ui" ``` ## Usage ```tsx import { MeteorShower, Badge, Button, Heading, Text } from "@glinui/ui" export function Hero() { return (
Changelog Everything we shipped this quarter Forty two improvements across builds, caching and observability, with migration notes where behavior changed.
Works with
    {/* Your partner or customer logos go here */}
  • Vercel
  • GitHub
  • Cloudflare
  • Astro
) } ``` ```tsx import { MeteorShower } from "@glinui/ui" export function Variants() { return (
Default
Steep
Heavy
) } ``` ```tsx import { MeteorShower, Button, Heading, Input, Label, Text } from "@glinui/ui" export function SignIn() { return (
Sign in to Northwind Use your work email to continue.
) } ``` ## Props ### MeteorShowerProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `angle?` | `number` | `215` | | | `count?` | `number` | `12` | | | `maxDelay?` | `number` | `4` | | | `maxDuration?` | `number` | `5` | | | `minDelay?` | `number` | `0` | | | `minDuration?` | `number` | `2` | | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Decorative (`aria-hidden`), invisible to screen readers. - No interactive elements. - Reduced motion: Component returns `null` when `prefers-reduced-motion` is active. --- # Light Leak > Simulated lens flare and light leak overlay with drifting animation. - id: `light-leak` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/light-leak - markdown: https://glinui.com/md/light-leak.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add light-leak ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/light-leak.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { LightLeak } from "@glinui/ui" ``` ## Usage ```tsx import { LightLeak, Badge, Button, Heading, Text } from "@glinui/ui" export function Hero() { return (
Film presets Every frame keeps its warmth Twelve presets tuned on real film scans. Apply once, batch export a whole shoot and keep the original files untouched.
Works with
    {/* Your partner or customer logos go here */}
  • Vercel
  • GitHub
  • Cloudflare
  • Astro
) } ``` ```tsx import { LightLeak } from "@glinui/ui" export function Variants() { return (
Default
Cool
Three leaks
) } ``` ```tsx import { LightLeak, Button, Heading, Text } from "@glinui/ui" const stats = [ ["Requests", "2.41M", "+8.2%"], ["p95 latency", "184 ms", "-12 ms"], ["Error rate", "0.03%", "-0.01%"] ] export function UsageHeader() { return (
Production, last 24 hours API overview
{stats.map(([label, value, delta]) => (
{label}
{value}
{delta} vs yesterday
))}
) } ``` ## Props ### LightLeakProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `blur?` | `number` | `60` | Blur amount in px | | `colors?` | `string[]` | `["var(--tone-warning)", "var(--tone-d...` | Colors for the light leaks. Defaults come from theme tokens. | | `count?` | `number` | `3` | Number of light leak layers | | `duration?` | `number` | `6` | Animation duration in seconds | | `intensity?` | `number` | `0.3` | Intensity/opacity (0-1) | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders with `aria-hidden`, invisible to assistive technologies. - Purely decorative. - Reduced motion: Animations are paused via `motion-reduce:[animation:none]`. --- # Ripple > Concentric expanding rings radiating from center for decorative backgrounds. - id: `ripple` - type: signature - category: Backgrounds - tags: signature - docs: https://glinui.com/docs/components/ripple - markdown: https://glinui.com/md/ripple.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add ripple ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/ripple.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Ripple } from "@glinui/ui" ``` ## Usage ```tsx import { Ripple } from "@glinui/ui" export function RippleDemo() { return (
Ripple
) } ``` ```tsx import { Ripple } from "@glinui/ui" export function RippleGlassDemo() { return (
Glass Ripple
) } ``` ```tsx import { Ripple } from "@glinui/ui" export function RippleAccentDemo() { return (
Accent
) } ``` ## Props ### RippleProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `count?` | `number` | `3` | | | `delay?` | `number` | `0.4` | | | `duration?` | `number` | `2` | | | `variant?` | `"default" \| "glass" \| "accent"` | `"default"` | Variant option from rippleVariants. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `glass`, `accent`. ## Accessibility - Ripple is purely decorative with `pointer-events-none`. - No interactive or focusable elements. - Reduced motion: Ring animations use `motion-safe:animate-[...]` / `motion-reduce:hidden`. Under `prefers-reduced-motion`, rings are hidden entirely. --- # Animated Beam > A gradient beam that travels between two elements. - id: `animated-beam` - type: primitive - category: Backgrounds - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/animated-beam - markdown: https://glinui.com/md/animated-beam.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add animated-beam ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/animated-beam.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { AnimatedBeam, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Animated Beam by Magic UI (MIT). Glin UI measures the SVG path and travels a gradient dash along it with the Web Animations API instead of the motion library, observes the container and both anchors with ResizeObserver (the original only watched the container), coalesces updates with requestAnimationFrame, mirrors x offsets in RTL, uses collision-free gradient ids, and falls back to a static line. The container must be positioned (relative) and contain both anchors. Render the beam after the anchors, with the same refs. The beam draws in the container coordinate space, so avoid transforms on the container. The three demos use only Phosphor icons, never brand logos. Engines: the `engine` prop is not applicable. SVG path gradient measured from layout; path driven, engines do not apply. Link two anchors with a curved beam. ```tsx import { BrandIcon } from "@/components/brand/brand-icon" import { useRef } from "react" import { Lightning } from "@phosphor-icons/react" import { AnimatedBeam } from "@glinui/ui" export function Demo() { const containerRef = useRef(null) const githubRef = useRef(null) const vercelRef = useRef(null) const cloudflareRef = useRef(null) const hubRef = useRef(null) const node = "grid size-12 place-items-center rounded-full border border-[var(--color-border)] bg-[var(--surface-1)]" return (
) } ``` ### Reverse Travel from the right anchor to the left. ```tsx ``` ### Integration hub Several beams share one container, staggered with delay. ```tsx ``` ## Props ### AnimatedBeamProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `beamLength?` | `number` | `0.35` | Length of the travelling segment as a share of the path, 0.05 to 1. | | `containerRef` | `React.RefObject` | | Positioned (relative) element that contains both anchors. The beam is drawn in it. | | `curvature?` | `number` | `0` | Upward bend of the curve in px. Negative bends downward. | | `delay?` | `number` | `0` | Seconds before the first pass. | | `duration?` | `number` | `4` | Seconds for one pass. | | `endXOffset?` | `number` | `0` | | | `endYOffset?` | `number` | `0` | | | `fromRef` | `React.RefObject` | | | | `gradientStartColor?` | `string` | `"var(--color-accent)"` | | | `gradientStopColor?` | `string` | `"color-mix(in oklab, var(--color-acce...` | | | `pathColor?` | `string` | `"var(--line-soft, var(--color-border))"` | Track color. Defaults to the soft line token. | | `pathOpacity?` | `number` | `1` | | | `pathWidth?` | `number` | `2` | | | `repeatDelay?` | `number` | `0` | Seconds to rest between passes. | | `reverse?` | `boolean` | `false` | Travel from `toRef` to `fromRef`. | | `startXOffset?` | `number` | `0` | | | `startYOffset?` | `number` | `0` | | | `toRef` | `React.RefObject` | | | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Decorative connector: aria-hidden, not focusable, pointer-events none. - If the connection carries meaning, state it in text next to the anchors. - The track keeps its contrast with the line token and never overlaps text. ARIA: - `aria-hidden="true"` on the svg - Reduced motion: At motion level full a gradient segment travels the path. With prefers-reduced-motion or level none or subtle, the beam is a static gradient line. It also pauses offscreen and in background tabs. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/animated-beam. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Card > Flexible surface container for grouped content. - id: `card` - type: primitive - category: Cards and borders - tags: primitive - docs: https://glinui.com/docs/components/radix/card - markdown: https://glinui.com/md/card.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add card ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/card.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { LIFT_SURFACE, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, SURFACE_VARIANTS } from "@glinui/ui" ``` ## Usage Omit `variant` and the card follows the ambient style: the glinr lift look (gradient hairline ring, tonal face) with no extra props. ```tsx import { Button, Badge, Card } from "@glinui/ui" export function Demo() { return ( ) } ``` ### Variants The full vocabulary across tones in both theme scopes. glinr is the default, plain is the flat shadcn card, solid is a neutral tonal face, glass is opt-in. ```tsx import { Card } from "@glinui/ui" ``` ### Glass on a backdrop Four surfaces over a vivid backdrop. Glass needs a backdrop to read as glass. ```tsx import { Card } from "@glinui/ui" ``` ## Props ### CardContentProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `inset?` | `boolean` | | Recessed well with the concentric inner radius, for code, lists and inputs. | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Variant option from cardSectionVariants. | ### CardDescriptionProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className?` | `string` | | Additional class names for description text. | ### CardFooterProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Variant option from cardSectionVariants. | ### CardHeaderProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Variant option from cardSectionVariants. | | `variant?` | `"default" \| "strip"` | `"default"` | `strip` renders a raised header band that bleeds to the card edges (glinr and solid cards). | ### CardProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `elevation?` | `unknown` | | Variant option from cardVariants. | | `face?` | `unknown` | | Variant option from cardVariants. | | `inset?` | `boolean` | | Render a recessed well instead of a raised surface. | | `interactive?` | `boolean` | | Adds hover lift and a pointer cursor. Keyboard behavior stays with the consumer. | | `ring?` | `"default" \| "hot" \| "brand"` | | Variant option from cardVariants. | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Variant option from cardVariants. | | `tone?` | `SurfaceTone` | `"neutral"` | Tone for soft, outline, ghost, gradient and glass. | | `variant?` | `CardVariant \| null` | `"default"` | Surface look. Omitted (or `default`) follows the ambient design style: glinr, plain or glass. `glinr` lift shell, `plain` flat shadcn car... | ### CardSectionProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Variant option from cardSectionVariants. | ### CardTitleProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `className?` | `string` | | Additional class names for title text. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `strip`. ## Accessibility - Semantic `
` containers. - Use `CardTitle` for heading hierarchy. - Add landmark roles if card represents a section. - Card uses semantic section content you provide. - Prefer heading levels that match page hierarchy. ARIA: - Semantic divs - Heading hierarchy via CardTitle - Reduced motion: No animation dependencies. Card supports reduced-motion fallback for transition-heavy states. --- # Glass Card > Frosted card with depth-aware blur, refraction edge highlights, and elevation transitions. - id: `glass-card` - type: signature - category: Cards and borders - tags: signature - docs: https://glinui.com/docs/components/glass-card - markdown: https://glinui.com/md/glass-card.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add glass-card ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/glass-card.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { GlassCard, GlassCardHeader, GlassCardContent, GlassCardFooter } from "@glinui/ui" ``` ## Usage ```tsx import { GlassCard } from "@glinui/ui" export function GlassCardDemo() { return ( ) } ``` ```tsx import { GlassCard } from "@glinui/ui" // Omit variant to follow the ambient style (glinr by default). export function GlassCardVariants() { return ( <> ... ... ... ... ) } ``` ```tsx import { GlassCard } from "@glinui/ui" export function GlassCardTones() { return ( ... ) } ``` ## Props ### GlassCardProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `hoverLift?` | `boolean` | `true` | Lift on hover. Default true. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - GlassCard renders a ``, add semantic structure inside (headings, paragraphs). - Ensure text contrast meets WCAG AA 4.5:1 on glass surfaces. - Reduced motion: Hover elevation transitions respect `prefers-reduced-motion` and disable `transform` changes. --- # Depth Card > Parallax tilt card with layered glass planes and glare effect on hover. - id: `depth-card` - type: signature - category: Cards and borders - tags: signature - docs: https://glinui.com/docs/components/depth-card - markdown: https://glinui.com/md/depth-card.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add depth-card ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/depth-card.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { DepthLayer, DepthCard, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage ```tsx import { DepthCard, DepthLayer } from "@glinui/ui" export function DepthCardDemo() { return ( {/* floats highest */} {/* floats lower */} ) } ``` ```tsx import { DepthCard, DepthLayer } from "@glinui/ui" // Omit variant to follow the ambient style (glinr by default). export function DepthCardVariants() { return ( <> ... ... ... ... ) } ``` ```tsx import { DepthCard, DepthLayer } from "@glinui/ui" export function DepthCardTones() { return ( ... ) } ``` ## Props ### DepthCardProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `autoPlay?` | `boolean` | `false` | Runs a slow looping synthetic pointer so the tilt, glare and layer parallax are visible without hovering (demos, screenshots, touch). Nee... | | `glare?` | `boolean` | `true` | Glare effect | | `glareOpacity?` | `number` | `0.35` | Glare max opacity | | `hoverScale?` | `number` | `1.02` | Scale on hover | | `maxTilt?` | `number` | `15` | Maximum tilt angle in degrees | | `perspective?` | `number` | `800` | Perspective distance in px | ### DepthLayerProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `depth?` | `keyof typeof LAYER_DEPTH` | `2` | How far the layer floats above the card face (1 closest, 4 highest). | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The glare overlay is `aria-hidden="true"`, invisible to assistive technologies. - The card itself is a standard `div` with no implicit role; add `role` and keyboard handlers as needed. - Content inside the card remains fully accessible. - Reduced motion: When `prefers-reduced-motion: reduce` is active, the tilt transform is disabled via `motion-reduce:transform-none` and the glare layer is hidden via `motion-reduce:hidden`. --- # Spotlight Card > Card with cursor-tracked radial spotlight effect on hover. - id: `spotlight-card` - type: signature - category: Cards and borders - tags: signature - docs: https://glinui.com/docs/components/spotlight-card - markdown: https://glinui.com/md/spotlight-card.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add spotlight-card ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/spotlight-card.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { SpotlightCard, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage ```tsx import { SpotlightCard } from "@glinui/ui" export function SpotlightCardDemo() { return ( ) } ``` ```tsx import { SpotlightCard } from "@glinui/ui" // Omit variant to follow the ambient style (glinr by default). export function SpotlightCardVariants() { return ( <> ... ... ... ... ) } ``` ```tsx import { SpotlightCard } from "@glinui/ui" export function SpotlightCardTones() { return ( ... ) } ``` ## Props ### SpotlightCardProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `autoPlay?` | `boolean` | `false` | Runs a slow looping synthetic pointer so the spotlight is visible without hovering (demos, screenshots, touch). Off at reduced motion. A ... | | `spotlightClassName?` | `string` | | | | `spotlightSize?` | `number` | `300` | Spotlight radius in pixels. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The spotlight overlay carries `aria-hidden="true"` and `pointer-events-none` so it is invisible to assistive technology and cannot intercept interactions. - All content inside the card remains fully keyboard-accessible and semantically structured. - `SpotlightCard` does not modify focus behavior, interactive children (buttons, links) work as expected. - Reduced motion: The spotlight overlay is hidden entirely when `prefers-reduced-motion: reduce` is set via `motion-reduce:hidden`. The underlying `Card` hover transition (`transform`, `box-shadow`) is also disabled via `motion-reduce:transition-none` and `motion-reduce:hover:translate-y-0`, ensuring zero motion for users who prefer it. --- # Magic Card > Card whose border and surface light up under the pointer or keyboard focus. - id: `magic-card` - type: primitive - category: Cards and borders - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/magic-card - markdown: https://glinui.com/md/magic-card.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add magic-card ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/magic-card.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { MagicCard, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Magic Card by Magic UI (MIT). Modified: motion and next-themes removed, pointer tracking writes CSS variables from a rAF (zero React renders per move), colors come from tokens so dark mode follows the theme, keyboard focus lights the card, and a glass variant was added. Overlap verdict versus SpotlightCard: about 40 percent. SpotlightCard is a glass-only soft spotlight. MagicCard also lights the border, works on the solid token surface and activates on keyboard focus, so both stay. Use SpotlightCard for a pure glass glow and MagicCard for border-follow grids. The pointer effect only runs on fine pointers `(hover: hover) and (pointer: fine)`. Touch and coarse pointers get a static card. The border and surface light up under the pointer. `autoPlay` loops a synthetic pointer so you can see it without hovering. ```tsx import { MagicCard } from "@glinui/ui" export function Demo() { return ( ) } ``` ### Variants glinr is the default, plain is flat shadcn, solid is a neutral tonal face, glass is opt-in and needs a backdrop. ```tsx import { MagicCard } from "@glinui/ui" // Omit `variant` to follow the ambient style (glinr by default). export function MagicCardVariants() { return ( <> ... ... ... ... ) } ``` ### Colors `gradientFrom`, `gradientTo` and `gradientColor` take any token. ```tsx import { MagicCard } from "@glinui/ui" export function MagicCardTones() { return ( ... ) } ``` ## Props ### MagicCardProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `autoPlay?` | `boolean` | `false` | Runs a slow looping synthetic pointer so the highlight is visible without hovering (demos, screenshots, touch). Needs motion level full. ... | | `gradientColor?` | `string` | | Spotlight fill. Defaults to a soft tint of the accent token. | | `gradientFrom?` | `string` | | Border highlight start color. Defaults to the accent token. | | `gradientSize?` | `number` | `280` | Radius in pixels of the spotlight and border highlight. | | `gradientTo?` | `string` | | Border highlight end color. Defaults to the signal token. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Decorative layers are aria-hidden and pointer-events-none, so nested links and buttons stay clickable. - Content sits above the layers in DOM and paint order. Reading order is untouched. - Keyboard focus inside the card lights it from the center, so the effect is not pointer only. ARIA: - `data-active` mirrors the lit state for styling - Decorative spans use `aria-hidden="true"` - Reduced motion: With motion level none, subtle or prefers-reduced-motion the card is fully static: no tracking, no highlight layers shown. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/magic-card. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Neon Gradient Card > Card with an animated neon gradient ring and soft glow. - id: `neon-gradient-card` - type: primitive - category: Cards and borders - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/neon-gradient-card - markdown: https://glinui.com/md/neon-gradient-card.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add neon-gradient-card ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/neon-gradient-card.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { NeonGradientCard, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS, SURFACE_VARIANT_ALIASES } from "@glinui/ui" ``` ## Usage Adapted from Neon Gradient Card by Magic UI (MIT). Modified: the ResizeObserver and width variables are gone (the ring is plain padding so it follows content), colors default to the accent and signal tokens, the gradient is animated through the Web Animations API only at motion level full, and a glass variant was added. Improvements: one blur layer (smaller on phones), a static ring instead of the glow when motion is none, forced-colors fallback border, and an inner surface on the background token so text keeps contrast. An animated neon ring and soft glow around a pricing card. ```tsx import { NeonGradientCard } from "@glinui/ui" export function Demo() { return ( ) } ``` ### Variants glinr is the default, plain is flat shadcn, solid is a neutral tonal face, glass is opt-in and needs a backdrop. ```tsx import { NeonGradientCard } from "@glinui/ui" // Omit `variant` to follow the ambient style (glinr by default). export function NeonGradientCardVariants() { return ( <> ... ... ... ... ) } ``` ### Colors `neonColors` takes any two tokens or colors. ```tsx import { NeonGradientCard } from "@glinui/ui" export function NeonGradientCardTones() { return ( ... ) } ``` ## Props ### NeonGradientCardProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `borderRadius?` | `number` | `20` | Outer corner radius in pixels. | | `borderSize?` | `number` | `2` | Ring thickness in pixels. | | `contentClassName?` | `string` | | Class for the inner content face. | | `duration?` | `number` | `6` | Seconds per gradient cycle. | | `neonColors?` | `Partial` | | Gradient colors. Default to the accent and signal tokens. | | `variant?` | `NeonVariant \| null` | | Face under the neon ring. Omitted follows the ambient style (glinr by default). `glass` is opt-in. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Ring and glow are aria-hidden decorations. Text lives on the background token face for reliable contrast. - Under forced-colors the layers are hidden and a CanvasText border is used. - Nothing depends on the animation. ARIA: - Decorative layers use `aria-hidden="true"` - `data-animated` reflects the running state - Reduced motion: At motion level none, subtle or with prefers-reduced-motion the gradient stops, and the blurred glow is removed leaving a static ring. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/neon-gradient-card. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Glow Border > Rotating conic-gradient glow effect around container border. - id: `glow-border` - type: signature - category: Cards and borders - tags: signature - docs: https://glinui.com/docs/components/glow-border - markdown: https://glinui.com/md/glow-border.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add glow-border ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/glow-border.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { GlowBorder, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS, SURFACE_VARIANT_ALIASES, STYLE_DEFAULT_VARIANT, GlinProvider, GLIN_MOTIONS } from "@glinui/ui" ``` ## Usage ```tsx import { GlowBorder } from "@glinui/ui" export function GlowBorderDemo() { return (
) } ``` ```tsx import { GlowBorder } from "@glinui/ui" // Omit variant to follow the ambient style (glinr by default). export function GlowBorderVariants() { return ( <> ... ... ... ... ) } ``` ```tsx import { GlowBorder } from "@glinui/ui" export function GlowBorderTones() { return ( ... ) } ``` ## Props ### GlowBorderProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `borderRadius?` | `string` | `"var(--radius-lg)"` | Border radius | | `duration?` | `number` | `4` | Rotation duration in seconds | | `glowColor?` | `string` | `"var(--color-accent)"` | Glow color | | `glowSize?` | `number` | `2` | Glow spread in px | | `variant?` | `SurfaceVariant \| "default" \| null` | | Face inside the glow. Omitted follows the ambient style (glinr by default). `glass` is opt-in. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`. ## Accessibility - The glow pseudo-element is purely decorative and carries `aria-hidden` semantics, it does not affect the accessibility tree. - `GlowBorder` does not alter the focusability or tab order of its children. - Keyboard navigation passes through to child content unchanged. - Reduced motion: When `prefers-reduced-motion: reduce` is active, the rotating glow animation is hidden entirely so that users sensitive to motion are not affected. --- # Border Beam > Light beam that travels along the border of its container via CSS offset-path. - id: `border-beam` - type: signature - category: Cards and borders - tags: signature - docs: https://glinui.com/docs/components/border-beam - markdown: https://glinui.com/md/border-beam.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add border-beam ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/border-beam.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { BorderBeam } from "@glinui/ui" ``` ## Usage ```tsx import { BorderBeam, Card } from "@glinui/ui" // Omit variant to follow the ambient style (glinr by default). export function BorderBeamVariants() { return ( <> ... ... ... ... ) } ``` ```tsx import { BorderBeam, Card } from "@glinui/ui" export function BorderBeamTones() { return ( ... ) } ``` ```tsx // Beam cards as metric tiles in a dashboard row. import { BorderBeam, Card } from "@glinui/ui" export function BorderBeamLayout() { return (
...
) } ``` ## Props ### BorderBeamProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `borderRadius?` | `string` | | | | `colorFrom?` | `string` | `"var(--color-accent)"` | | | `colorTo?` | `string` | `"transparent"` | | | `delay?` | `number` | `0` | | | `duration?` | `number` | `6` | | | `size?` | `number` | `100` | | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - `BorderBeam` is purely decorative and does not receive focus. - No interactive elements, safe for screen readers. - Reduced motion: The beam animation uses `motion-reduce:hidden`. Under `prefers-reduced-motion`, the beam is hidden entirely. --- # Border Trail > Glowing comet that travels along the border of a rounded container. - id: `border-trail` - type: primitive - category: Cards and borders - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/border-trail - markdown: https://glinui.com/md/border-trail.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add border-trail ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/border-trail.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { BorderTrail, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Border Trail by Motion Primitives (MIT). Modified: motion/react removed (the comet follows `offset-path: rect()` driven by the Web Animations API), token colors with a soft radial head, the path radius defaults to the parent's border radius, and a rotating conic ring is used where `offset-path: rect()` is unsupported. The parent must be `relative` with a border radius, and should clip overflow. Distinct from BorderBeam (a dot) and ShineBorder (a drifting gradient): a short comet on a thin track. Improvement over the original: no hardcoded zinc, offscreen and hidden tab pause, static corner glow at motion none, hidden under forced-colors. A comet circles the card edge. ```tsx import { BorderTrail, Card } from "@glinui/ui" ... ``` ### Variants Color sources per style. ```tsx ``` ### States Custom color, length, radius and speed. ```tsx ``` ## Props ### BorderTrailProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `borderWidth?` | `number` | `1` | Border thickness in pixels. | | `color?` | `string` | | Trail color. Defaults to the variant token. | | `duration?` | `number` | `5` | Seconds per lap. | | `radius?` | `number` | | Corner radius of the path in pixels. Defaults to the parent border radius. | | `size?` | `number` | `60` | Length of the glowing segment in pixels. | | `variant?` | `"default" \| "plain" \| "glass"` | `"default"` | Variant option from borderTrailVariants. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `plain`, `glass`. ## Accessibility - Purely decorative: aria-hidden, pointer-events-none, never focusable. - Hidden under forced-colors so the real border shows. - Pauses offscreen and while the tab is hidden. ARIA: - `aria-hidden="true"` on the layer - `data-mode` reports `path` or `conic`, `data-animated` reports motion - Reduced motion: The comet only travels at motion level full. Under motion none, subtle or prefers-reduced-motion it rests as a static glow at the top start corner. ## Provenance Adapted from Motion Primitives (MIT, Copyright (c) 2024 ibelick). Upstream: https://motion-primitives.com/docs/border-trail. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Prism Border > Animated rainbow refraction border using a shifting linear gradient. - id: `prism-border` - type: signature - category: Cards and borders - tags: signature - docs: https://glinui.com/docs/components/prism-border - markdown: https://glinui.com/md/prism-border.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add prism-border ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/prism-border.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { PrismBorder } from "@glinui/ui" ``` ## Usage ```tsx import { PrismBorder, Card } from "@glinui/ui" export function PrismBorderDemo() { return ( ) } ``` ```tsx import { PrismBorder, Card } from "@glinui/ui" // Omit variant to follow the ambient style (glinr by default). export function PrismBorderVariants() { return ( <> ... ... ... ... ) } ``` ```tsx import { PrismBorder, Card } from "@glinui/ui" export function PrismBorderTones() { return ( ... ) } ``` ## Props ### PrismBorderProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `borderRadius?` | `string` | `"0.75rem"` | Border radius | | `borderWidth?` | `number` | `2` | Border width in px | | `colors?` | `string[]` | `["#f43f5e", "#f97316", "#eab308", "#2...` | Custom gradient colors | | `duration?` | `number` | `3` | Animation duration in seconds | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - The animated border element is `aria-hidden="true"`, invisible to assistive technologies. - Content inside the border wrapper remains fully accessible. - Reduced motion: The gradient animation is paused via `motion-reduce:[animation:none]`. A static gradient border remains visible. --- # Shine Border > Animated gradient edge that wraps any rounded container. - id: `shine-border` - type: primitive - category: Cards and borders - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/shine-border - markdown: https://glinui.com/md/shine-border.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add shine-border ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/shine-border.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { ShineBorder, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider } from "@glinui/ui" ``` ## Usage Adapted from Shine Border by Magic UI (MIT). Modified: colors default to the accent token, the sweep runs through the Web Animations API only at motion level full, the gradient is mirrored in RTL and a glass variant was added. ShineBorder differs from BorderBeam: the beam is a single travelling dot, the shine is a soft gradient that drifts around the whole edge. The parent must be `relative` and have a border radius, which the layer inherits. Improvement over the original: no inline style object, no hardcoded black default, and the animation is removed from the DOM when motion is none or reduced. Engines: the `engine` prop is not applicable. Looping css conic-gradient animation; not a reveal, so engines do not apply. A soft gradient drifts around the edge of a login card. ```tsx import { Button, Card, Input, ShineBorder } from "@glinui/ui" export function Demo() { return (
e.preventDefault()}>

Sign in

) } ``` ### Variants glinr is the default, plain is flat shadcn, solid is a neutral tonal face, glass is opt-in and needs a backdrop. ```tsx import { ShineBorder, Card } from "@glinui/ui" // Omit `variant` to follow the ambient style (glinr by default). export function ShineBorderVariants() { return ( <> ... ... ... ... ) } ``` ### Colors `shineColor` takes one color or a list of tokens. ```tsx import { ShineBorder, Card } from "@glinui/ui" export function ShineBorderTones() { return ( ... ) } ``` ## Props ### ShineBorderProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `borderWidth?` | `number` | `1` | Border thickness in pixels. | | `duration?` | `number` | `14` | Seconds for one full sweep cycle. | | `shineColor?` | `string \| string[]` | | One color or a list of colors. Defaults to the accent token. | | `variant?` | `"default" \| "plain" \| "glass"` | `"default"` | Variant option from shineBorderVariants. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `plain`, `glass`. ## Accessibility - Purely decorative: aria-hidden and pointer-events-none, never receives focus or intercepts clicks. - Hidden under forced-colors so the parent keeps its real border. - No information is conveyed by the animation. ARIA: - `aria-hidden="true"` on the layer - `data-animated` reflects whether the sweep is running - Reduced motion: The sweep only runs when the Glin motion level is full and prefers-reduced-motion is off. Otherwise the border renders as a static gradient frame. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/shine-border. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Bento Grid > Responsive bento layout of linked feature tiles. - id: `bento-grid` - type: primitive - category: Cards and borders - tags: primitive, adapted - docs: https://glinui.com/docs/components/radix/bento-grid - markdown: https://glinui.com/md/bento-grid.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add bento-grid ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/bento-grid.json ``` Package: ```bash npm install @glinui/ui @glinui/motion @glinui/tokens ``` ## Import ```tsx import { BentoGrid, BentoCard, DEFAULT_MOTION_ENGINE_CONFIG, MotionEngineContext, MotionEngineProvider, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS } from "@glinui/ui" ``` ## Usage Adapted from Bento Grid by Magic UI (MIT). Modified: a responsive 1, 2 and 3 column grid, the whole card is one real anchor when href is set, the CTA is keyboard reachable and always visible on touch, Phosphor arrow with RTL flip, lift and glass surfaces from the Card tokens. The original nested a link button inside a div and revealed it on hover only, which keyboard users could not reach. Here the CTA is a styled span inside the single anchor, shown on hover, focus-visible and always on coarse pointers. Engines: this component drives its main animation through the pluggable motion engine. Pass `engine` (css, motion or gsap), wrap a subtree in `MotionEngineProvider`, or set `data-glin-engine` on ``. The css engine is built in and dependency free; motion and gsap are opt-in via `@glinui/motion/register/*`. `motion="none"` renders the final state and `subtle` is opacity only. Five tiles of mixed size with real content. ```tsx import { CheckCircle, Cube, Lightning, ShieldCheck } from "@phosphor-icons/react" import { BentoCard, BentoGrid } from "@glinui/ui" export function Demo() { return ( ) } ``` ### Variants glinr is the default, plain is flat shadcn, solid is a neutral tonal face, glass is opt-in and needs a backdrop. ```tsx import { BentoCard, BentoGrid } from "@glinui/ui" // Omit `variant` to follow the ambient style (glinr by default). export function BentoGridVariants() { return ( <> ... ... ... ... ) } ``` ### Colors Tile washes follow the tone tokens. ```tsx import { BentoCard, BentoGrid } from "@glinui/ui" export function BentoGridTones() { return ( } /> ... ) } ``` ## Props ### BentoCardProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `background?` | `React.ReactNode` | | Decorative background layer (pattern, gradient, illustration). Hidden from assistive tech. | | `cta?` | `string` | | Call to action label, shown with an arrow when `href` is set. | | `description` | `string` | | | | `headingLevel?` | `2 \| 3 \| 4` | `3` | Heading level for the card name. | | `href?` | `string` | | When set the whole card is a single anchor. | | `Icon?` | `React.ElementType<{ className?: string; "aria-hidden"?: boolean }>` | | Icon component (Phosphor icons work). Rendered decoratively. | | `name` | `string` | | Card title, rendered as a heading. | | `rel?` | `string` | | | | `target?` | `React.HTMLAttributeAnchorTarget` | | | | `variant?` | `SurfaceVariant \| "default" \| null` | | Surface look. Omitted follows the ambient style (glinr by default). `glass` is opt-in and needs a backdrop. | ### BentoGridProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `duration?` | `number` | | Per-card duration in ms. | | `engine?` | `EngineName` | | Engine override: `css` (default), `motion`, `gsap` or a registered custom engine. | | `entrance?` | `boolean` | `false` | Reveal the cards in sequence when the grid enters the viewport. Off by default. | | `immediate?` | `boolean` | `false` | Play on mount instead of waiting for the viewport. | | `motion?` | `MotionLevel` | | Motion override. `none` renders the static final state, `subtle` is opacity only. | | `order?` | `StaggerDirection` | `"forward"` | Order the cards appear in. Default `forward`. | | `step?` | `number` | `70` | Delay between cards in ms. Default 70. | | `threshold?` | `number` | | Visible fraction required to trigger. Default 0.15. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`. ## Accessibility - Cards with href are single anchors, so one tab stop per card, with a visible focus ring. - Decorative backgrounds and icons are aria-hidden. - CTA is available without hover: focus reveals it on fine pointers, touch always shows it. Keyboard: | Key | Action | | --- | --- | | Tab | Moves between linked cards. | | Enter | Follows the focused card link. | ARIA: - Card name is a real heading - Icon and background are `aria-hidden` - Reduced motion: The hover lift, icon scale and CTA slide are removed with prefers-reduced-motion or motion level none. At level none the CTA is always visible. ## Provenance Adapted from Magic UI (MIT, Copyright (c) Magic UI). Upstream: https://magicui.design/docs/components/bento-grid. Restyled to Glin tokens with accessibility and reduced motion review. Keep the attribution when you copy this component. --- # Icon Frame > Consistent framed surface for icon glyphs and short initials. - id: `icon-frame` - type: primitive - category: Cards and borders - tags: primitive - docs: https://glinui.com/docs/components/radix/icon-frame - markdown: https://glinui.com/md/icon-frame.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add icon-frame ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/icon-frame.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { IconFrame, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS, SURFACE_VARIANT_ALIASES, STYLE_DEFAULT_VARIANT, GlinProvider, GLIN_MOTIONS } from "@glinui/ui" ``` ## Usage Feature cards led by tinted icon frames. ```tsx import { Bug, ChartLineUp, Lightning, ShieldCheck } from "@phosphor-icons/react" import { Card, IconFrame } from "@glinui/ui" export function Demo() { const features = [ { icon: Lightning, tone: "accent" as const, title: "Fast builds", text: "Incremental builds finish in under 8 seconds." }, { icon: ShieldCheck, tone: "success" as const, title: "Secure by default", text: "Secrets are encrypted and rotated automatically." }, { icon: ChartLineUp, tone: "info" as const, title: "Live metrics", text: "Latency and error rates update every minute." }, { icon: Bug, tone: "danger" as const, title: "Error tracking", text: "Group crashes by release and assign an owner." } ] return (
{features.map((feature) => (

{feature.title}

{feature.text}

))}
) } ``` ### Variants The shared vocabulary. Omit `variant` for the ambient style (glinr). ```tsx import { IconFrame } from "@glinui/ui" ``` ### Tones Soft frames in every tone. ```tsx import { IconFrame } from "@glinui/ui" ``` ## Props ### IconFrameProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Variant option from iconFrameVariants. | | `tone?` | `SurfaceTone` | `"neutral"` | Tone for the icon color and tinted looks. | | `variant?` | `IconFrameVariant \| null` | | Omitted follows the ambient style (glinr by default). `glass` is opt-in and needs a backdrop. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Use `aria-hidden` when decorative. - Add screen-reader text for meaningful icons. - `IconFrame` is a decorative container. Icons inside it should have `aria-hidden="true"` when accompanied by visible text labels. - When used as a standalone icon button (e.g., wrapped in a `
) } ``` ### Inline panels Pass viewport={false} to render each panel under its own trigger instead of a shared viewport. ```tsx "use client" import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle } from "@glinui/ui" export function NavInlineExample() { return (
Learn
  • QuickstartShip a first page in 5 minutes.
  • ThemingTokens, modes and variants.
Components Examples
) } ``` ### Glass (opt-in) Glass is opt-in and needs a colourful or photographic backdrop. Pick one in the stage header. ```tsx import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle } from "@glinui/ui" export function Demo() { return ( Products
Analytics Automation
Docs
) } ``` ## Props ### NavigationMenuProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant?` | `NavigationMenuVariant` | | Surface look of the viewport panel and trigger pills. Omit for the ambient design style (glinr by default). | | `viewport?` | `boolean` | `true` | Render content in a shared animated viewport (default) or inline per item. | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Rendered as a nav landmark; give it an aria-label. - Triggers announce expanded state and control their content. - Full roving keyboard support from Radix. Keyboard: | Key | Action | | --- | --- | | Tab | Move to the next trigger or link. | | Enter / Space | Open the focused trigger. | | ArrowLeft / ArrowRight | Move between top level items. | | ArrowDown | Enter open content. | | Escape | Close content and return focus to trigger. | ARIA: - `aria-expanded` on triggers - `aria-controls` links trigger to content - `aria-current="page"` on active link - Reduced motion: Panels fade and scale from 95% on open using transform and opacity only. With prefers-reduced-motion the animation is removed. --- # Menubar > Desktop-style horizontal menu bar with nested menus, checkbox and radio items. - id: `menubar` - type: primitive - category: Navigation - tags: primitive - docs: https://glinui.com/docs/components/radix/menubar - markdown: https://glinui.com/md/menubar.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add menubar ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/menubar.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Menubar, MenubarMenu, MenubarGroup, MenubarPortal, MenubarSub, MenubarRadioGroup, MenubarTrigger, MenubarContent } from "@glinui/ui" ``` ## Usage A code editor window with File open. Shortcuts sit at the end of each row and submenus nest with MenubarSub. ```tsx "use client" import * as React from "react" import { Menubar, MenubarContent, MenubarItem, MenubarMenu, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "@glinui/ui" function EditorWindow({ open, children }: { open: "file" | "view"; children: React.ReactNode }) { return (
{children}

export function Header() {"{"}

return {"

) } export function MenubarEditorHero() { return ( File New file Ctrl N Open folder Ctrl O Open recent lumen-web billing-service Save Ctrl S Save all Ctrl Shift S Close editor Ctrl W Edit Undo Ctrl Z Redo Ctrl Y View Command palette Ctrl K ) } ``` ### View toggles Checkbox and radio items for editor settings. Press the arrow keys to move between menus. ```tsx "use client" import * as React from "react" import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarTrigger } from "@glinui/ui" function EditorWindow({ open, children }: { open: "file" | "view"; children: React.ReactNode }) { return (
{children}

export function Header() {"{"}

return {"

) } export function MenubarViewExample() { const [minimap, setMinimap] = React.useState(true) const [wrap, setWrap] = React.useState(false) const [theme, setTheme] = React.useState("dark") return ( File New file View Editor Minimap Word wrap Alt Z Color theme Light Dark ) } ``` ### Glass (opt-in) Glass is opt-in and needs a colourful or photographic backdrop. Pick one in the stage header. ```tsx import { Menubar, MenubarContent, MenubarItem, MenubarMenu, MenubarSeparator, MenubarShortcut, MenubarTrigger } from "@glinui/ui" export function Demo() { return ( File New tab Cmd T New window Print Edit Undo Redo ) } ``` ## Props ### MenubarContentProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant?` | `MenubarVariant` | | Surface look. Defaults to the bar's variant, then the ambient design style. | ### MenubarProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant?` | `MenubarVariant` | | Surface look of the bar and its menus. Omit for the ambient design style (glinr by default). | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Uses the WAI-ARIA menubar pattern with roving focus. - Check and radio items expose their checked state. - Panels render in a portal and restore focus on close. Keyboard: | Key | Action | | --- | --- | | ArrowLeft / ArrowRight | Move between menu triggers. | | ArrowDown | Open the menu and focus the first item. | | ArrowUp / ArrowDown | Move between items. | | Enter / Space | Select the focused item. | | Escape | Close the menu. | ARIA: - `role="menubar"`, `menu`, `menuitem` - `aria-checked` on checkbox and radio items - `aria-haspopup` and `aria-expanded` on triggers - Reduced motion: Panels fade and scale from 95% on open using transform and opacity only. With prefers-reduced-motion the animation is removed. --- # Glass Navbar > Translucent navigation bar that responds to scroll with blur intensity. - id: `glass-navbar` - type: signature - category: Navigation - tags: signature - docs: https://glinui.com/docs/components/glass-navbar - markdown: https://glinui.com/md/glass-navbar.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add glass-navbar ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/glass-navbar.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { GlassNavbar, PANEL_ITEM, PANEL_ITEM_SELECTABLE, PANEL_SEPARATOR, PANEL_MOTION, GLIN_MOTIONS, GLIN_ENGINES, GLIN_SURFACES } from "@glinui/ui" ``` ## Usage ```tsx import { GlassNavbar } from "@glinui/ui" const variants = ["glinr", "plain", "solid", "soft", "outline", "ghost", "gradient", "glass"] as const export function GlassNavbarVariantsDemo() { return (
{variants.map((variant) => (
{variant} Docs Components Changelog
))}
) } ``` ```tsx import { GlassNavbar } from "@glinui/ui" export function GlassNavbarSizesDemo() { return (
Small
Medium (default)
Large
) } ``` ```tsx import { GlassNavbar } from "@glinui/ui" export function GlassNavbarScrolledDemo() { return (
Glin UI Scrolled elevation (forced)
) } ``` ## Props ### GlassNavbarProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `disableScrollTracking?` | `boolean` | `false` | | | `elevation?` | `VariantProps["elevation"]` | | | | `scrollThreshold?` | `number` | `8` | | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Variant option from glassNavbarVariants. | | `variant?` | `PanelVariantProp` | | Surface look. The navbar is glass by default (its identity, with readable opacity floors so it stays legible on any backdrop). Pass `glin... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders as a semantic `` element, add `aria-label` (e.g. `"Main navigation"`) to distinguish multiple navbars on the page. - Child links and buttons retain native keyboard navigation with no custom focus management applied. - Reduced motion: The blur and opacity transition between `base` and `scrolled` elevation states is disabled when `prefers-reduced-motion` is active. --- # Glass Dock > macOS-style dock with proximity magnification and frosted glass surface. - id: `glass-dock` - type: signature - category: Navigation - tags: signature - docs: https://glinui.com/docs/components/glass-dock - markdown: https://glinui.com/md/glass-dock.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add glass-dock ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/glass-dock.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { GlassDock, PANEL_ITEM, PANEL_ITEM_SELECTABLE, PANEL_SEPARATOR, PANEL_MOTION, SURFACE_VARIANTS, SURFACE_TONES, SURFACE_ELEVATIONS } from "@glinui/ui" ``` ## Usage ```tsx "use client" import { GlassDock } from "@glinui/ui" import { House, Gear, User } from "@phosphor-icons/react" const variants = ["glinr", "plain", "solid", "soft", "outline", "ghost", "gradient", "glass"] as const export function GlassDockVariantsDemo() { const items = [ { id: "home", icon: , label: "Home" }, { id: "settings", icon: , label: "Settings" }, { id: "profile", icon: , label: "Profile" } ] return (
{variants.map((variant) => ( ))}
) } ``` ```tsx "use client" import { GlassDock } from "@glinui/ui" import { FolderOpen, Camera, MusicNote, FilmStrip, Globe, ChatCircle } from "@phosphor-icons/react" export function GlassDockMagDemo() { return (
, label: "Files" }, { id: "photos", icon: , label: "Photos" }, { id: "music", icon: , label: "Music" }, { id: "video", icon: , label: "Video" }, { id: "web", icon: , label: "Browser" }, { id: "messages", icon: , label: "Messages" } ]} />
) } ``` ## Props ### GlassDockProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `distance?` | `number` | `120` | Distance in px at which magnification starts | | `iconSize?` | `number` | `48` | Base icon size in px | | `items` | `GlassDockItem[]` | | Dock items | | `magnification?` | `number` | `1.6` | Maximum magnification scale | | `position?` | `"bottom" \| "top" \| "left" \| "right"` | `"bottom"` | Position | | `variant?` | `PanelVariantProp` | | Surface look. Glass by default (its identity, with a readable opacity floor). Pass `glinr`, `plain`, `solid`, `soft`, `outline`, `ghost` ... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders with `role="toolbar"` and `aria-label="Dock"`. - Each item is a `` with `aria-label` set to the item label. - Item tooltips appear on hover using the `title` attribute. - Reduced motion: When `prefers-reduced-motion: reduce` is active, the magnification effect is disabled, all items remain at their base size. --- # Tabs > Tabbed interface for switching between grouped content panels. - id: `tabs` - type: primitive - category: Navigation - tags: primitive - docs: https://glinui.com/docs/components/radix/tabs - markdown: https://glinui.com/md/tabs.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add tabs ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/tabs.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Tabs, TabsList, TabsTrigger, TabsContent, CONTROL_LEGACY_VARIANTS, CONTROL_SIZE_CLASSES, GlinProvider, GLIN_MOTIONS } from "@glinui/ui" ``` ## Usage Tabs above a real panel: the active tab swaps the content, and arrow keys move focus between triggers. ```tsx "use client" import { Avatar, Badge, Heading, Tabs, TabsContent, TabsList, TabsTrigger, Text } from "@glinui/ui" const ACTIVITY = [ { who: "AK", text: "Ava Kim merged release 2.4 into main", when: "12 min ago" }, { who: "JR", text: "Jon Reyes commented on the pricing page", when: "1 h ago" }, { who: "SP", text: "Sara Patel invited two teammates", when: "Yesterday" } ] export function TabsProjectHero() { return (
Lumen web app Production, deployed 12 minutes ago
Live
Overview Activity Billing 48.2k visits this week, up 12% on last week.
    {ACTIVITY.map((row) => (
  • {row.text} {row.when}
  • ))}
Team plan, renews on 1 November. Next invoice: $240.00.
) } ``` ### Underline with icons The underline look with icons, a count badge and a disabled tab. ```tsx "use client" import { Receipt, ShieldCheck, UsersThree } from "@phosphor-icons/react" import { Badge, Tabs, TabsContent, TabsList, TabsTrigger, Text } from "@glinui/ui" export function TabsUnderlineExample() { return (
Audit log 12 members across 3 teams. Owner, admin, editor and viewer roles. 3 invoices are waiting for payment.
) } ``` ### Variants Set variant once on Tabs and the list, triggers and panels inherit it. glinr is the raised pill track, underline slides an accent bar with transform only. ```tsx import { Tabs, TabsList, TabsTrigger } from "@glinui/ui" export function Demo() { return (
glinr Two Three solid Two Three plain Two Three soft Two Three outline Two Three underline Two Three
) } ``` ## Props ### TabsContentProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `TabsSize` | | | | `variant?` | `TabsVariant` | | | ### TabsListProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `TabsSize` | | | | `variant?` | `TabsVariant` | | | ### TabsProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `TabsSize` | | Default size for every part inside. | | `variant?` | `TabsVariant` | | Default look for every list, trigger and panel inside. Each part can still set its own. | ### TabsTriggerProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `size?` | `TabsSize` | | | | `variant?` | `TabsVariant` | | | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Built on Radix Tabs with full WAI-ARIA. - Content is associated via `aria-controls`. - Use clear trigger labels for each panel. Keyboard: | Key | Action | | --- | --- | | Arrow Left / Right | Navigate between tab triggers. | | Enter / Space | Select the focused tab. | ARIA: - `role="tablist"` on list - `role="tab"` on triggers - `role="tabpanel"` on content - `aria-selected` - `aria-controls` - Reduced motion: Active indicator transitions respect `prefers-reduced-motion`. Tabs do not require motion for state communication. --- # Morphing Tabs > Tab component with a smoothly sliding indicator that morphs between items. - id: `morphing-tabs` - type: signature - category: Navigation - tags: signature - docs: https://glinui.com/docs/components/morphing-tabs - markdown: https://glinui.com/md/morphing-tabs.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add morphing-tabs ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/morphing-tabs.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { MorphingTabs, CONTROL_LEGACY_VARIANTS, CONTROL_SIZE_CLASSES, GlinProvider, GLIN_MOTIONS, GLIN_ENGINES, GLIN_SURFACES, GLIN_STYLES } from "@glinui/ui" ``` ## Usage ```tsx "use client" import { MorphingTabs } from "@glinui/ui" export function MorphingTabsUnderlineDemo() { return (
) } ``` ```tsx "use client" import { MorphingTabs } from "@glinui/ui" export function MorphingTabsSolidDemo() { return (
) } ``` ```tsx "use client" import { MorphingTabs } from "@glinui/ui" export function MorphingTabsVariantsDemo() { return (
) } ``` ## Props ### MorphingTabsProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `activeId?` | `string` | | Active tab id | | `defaultActiveId?` | `string` | | Default active tab id | | `items` | `MorphingTabItem[]` | | Tab items | | `onTabChange?` | `(id: string) => void` | | Callback when active tab changes | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Size | | `variant?` | `ControlVariantProp` | | Look. Omit to follow the ambient design style (glinr = raised pill track with a sliding key). Also: solid, plain, soft, outline, ghost, u... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders with `role="tablist"` on the container and `role="tab"` on each button. - `aria-selected` is set on the active tab. - Disabled tabs receive `disabled` attribute and are visually marked. - Reduced motion: When `prefers-reduced-motion: reduce` is active, the indicator transition duration is set to `0` for instant position changes. --- # Breadcrumb > Navigation trail with separators, collapsed ellipsis and variant-capable links. - id: `breadcrumb` - type: primitive - category: Navigation - tags: primitive - docs: https://glinui.com/docs/components/radix/breadcrumb - markdown: https://glinui.com/md/breadcrumb.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add breadcrumb ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/breadcrumb.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, LIFT_RING } from "@glinui/ui" ``` ## Usage A trail with a home icon, a collapsed middle segment and the current page, above the page title and action. ```tsx "use client" import { House } from "@phosphor-icons/react" import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Heading, Text } from "@glinui/ui" export function BreadcrumbHeaderHero() { return (
Projects Lumen web Deployments
Deployments Every build of Lumen web, newest first.
) } ``` ### Separators Pass any node as the separator, and keep the current page as plain text with BreadcrumbPage. ```tsx "use client" import { FileText } from "@phosphor-icons/react" import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "@glinui/ui" export function BreadcrumbFilesExample() { return (
Documents / Contracts / Settings Billing
) } ``` ### Glass (opt-in) Glass is opt-in and needs a colourful or photographic backdrop to read as frosted. Pick one in the stage header. ```tsx import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "@glinui/ui" export function Demo() { return ( Home Settings ) } ``` ## Props ### BreadcrumbLinkProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `asChild?` | `boolean` | | | ### BreadcrumbProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant?` | `PanelVariantProp` | | Surface look. Omit for the ambient design style (glinr by default): a bare trail whose current page is a raised pill. `solid`, `soft`, `o... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Rendered as a nav landmark labelled breadcrumb with an ordered list. - The current page is marked with aria-current=page. - Separators are hidden from assistive tech; the ellipsis exposes a screen reader label. Keyboard: | Key | Action | | --- | --- | | Tab | Move through breadcrumb links in order. | ARIA: - `aria-label="breadcrumb"` on nav - `aria-current="page"` on BreadcrumbPage - `aria-hidden` on separators - Reduced motion: Only color transitions are used, and they are disabled with prefers-reduced-motion. --- # Glass Breadcrumb > Pill-style breadcrumb with glass indicators and collapsible items. - id: `glass-breadcrumb` - type: signature - category: Navigation - tags: signature - docs: https://glinui.com/docs/components/glass-breadcrumb - markdown: https://glinui.com/md/glass-breadcrumb.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add glass-breadcrumb ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/glass-breadcrumb.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { GlassBreadcrumb, PANEL_ITEM, PANEL_ITEM_SELECTABLE, PANEL_SEPARATOR, PANEL_MOTION, GLIN_MOTIONS, GLIN_ENGINES, GLIN_SURFACES } from "@glinui/ui" ``` ## Usage ```tsx import { GlassBreadcrumb } from "@glinui/ui" const variants = ["glinr", "plain", "solid", "soft", "outline", "ghost", "gradient", "glass"] as const export function GlassBreadcrumbVariantsDemo() { const items = [ { id: "home", label: "Home", href: "/" }, { id: "docs", label: "Docs", href: "/docs" }, { id: "breadcrumb", label: "Breadcrumb" } ] return (
{variants.map((variant) => ( ))}
) } ``` ```tsx import { GlassBreadcrumb } from "@glinui/ui" export function GlassBreadcrumbCollapsedDemo() { return (
) } ``` ## Props ### GlassBreadcrumbProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `items` | `GlassBreadcrumbItem[]` | | Breadcrumb items | | `maxItems?` | `number` | | Max items to show (rest collapsed) | | `separator?` | `React.ReactNode` | `"/"` | Separator character | | `variant?` | `PanelVariantProp` | | Surface look. Glass by default (its identity, with a readable opacity floor). Pass `glinr`, `plain`, `solid`, `soft`, `outline`, `ghost` ... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. ## Accessibility - Renders as `` with an `` list. - The current page has `aria-current="page"`. - Separators are `aria-hidden`. - Reduced motion: No animations, the component is fully static. --- # Sidebar > Collapsible app sidebar with icon rail, mobile sheet, Ctrl/Cmd+B shortcut, and persisted state. - id: `sidebar` - type: primitive - category: Navigation - tags: primitive - docs: https://glinui.com/docs/components/radix/sidebar - markdown: https://glinui.com/md/sidebar.md ## Install Glin CLI (copies the source into your project): ```bash pnpm dlx @glinui/cli@latest add sidebar ``` shadcn CLI: ```bash npx shadcn@latest add https://glinui.com/r/sidebar.json ``` Package: ```bash npm install @glinui/ui @glinui/tokens ``` ## Import ```tsx import { Sidebar, SidebarTrigger, SidebarRail, SidebarInset, SidebarHeader, SidebarFooter, SidebarSeparator, SidebarContent } from "@glinui/ui" ``` ## Usage The sidebar animates its width when it collapses. Width is a documented exception to the transform and opacity only motion rule, because the content column must reflow with it. The transition is disabled under prefers-reduced-motion. Use containerClassName to control the docking element, for example static h-full when the sidebar lives inside a bounded frame instead of the viewport. Every look of the shared vocabulary. glinr (the default) is a lifted rail with hairline separators and a raised pill for the active item; plain is flat and shadcn-like. Collapsed icon mode keeps the same pill as a circle. ```tsx import { Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider } from "@glinui/ui" const variants = ["glinr", "plain", "solid", "soft", "outline", "ghost", "gradient", "glass"] as const export function Demo() { return variants.map((variant) => ( {variant} Platform Home Inbox )) } ``` ### Glass (opt-in) Glass is opt-in and needs a colourful or photographic backdrop behind the rail. The frame supplies one here. ```tsx import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarRail, SidebarTrigger } from "@glinui/ui" import { House, Gear } from "@phosphor-icons/react" export function Layout({ children }: { children: React.ReactNode }) { return ( Glin Studio Platform Home Settings Footer {children} ) } ``` ### Off-canvas Collapses fully; reopen with the trigger. ```tsx import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarProvider, SidebarRail, SidebarTrigger } from "@glinui/ui" import { House, Gear } from "@phosphor-icons/react" export function Layout({ children }: { children: React.ReactNode }) { return ( Glin Studio Platform Home Settings Footer {children} ) } ``` ## Props ### SidebarGroupProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `collapsible?` | `boolean` | `false` | Let users collapse this group by activating its label. | | `defaultOpen?` | `boolean` | `true` | Initial open state for a collapsible group. | ### SidebarMenuButtonProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `asChild?` | `boolean` | `false` | | | `isActive?` | `boolean` | `false` | Marks the current page. Sets aria-current="page". | | `size?` | `"sm" \| "md" \| "lg"` | `"md"` | Variant option from menuButtonVariants. | | `tooltip?` | `string` | | Tooltip shown only while the sidebar is collapsed to icons. | | `variant?` | `"default" \| "outline"` | `"default"` | Variant option from menuButtonVariants. | ### SidebarProps | Prop | Type | Default | Description | | --- | --- | --- | --- | | `collapsible?` | `"offcanvas" \| "icon" \| "none"` | `false` | How the sidebar collapses on desktop. | | `containerClassName?` | `string` | | Class names for the outer docking element (height, position). Defaults to sticky full viewport height. | | `label?` | `string` | `"Sidebar"` | Accessible name for the navigation landmark. | | `side?` | `"start" \| "end"` | `"start"` | Which inline edge the sidebar docks to. | | `variant?` | `PanelVariantProp` | | Surface look. Omit for the ambient design style (glinr by default): a lifted rail with hairline separators and a raised pill for the acti... | ## Tokens and variants - Style with CSS variables from `@glinui/tokens` (for example `var(--color-border)`, `var(--color-accent)`, `var(--surface-1)`). Do not hardcode colors. - Use Tailwind utility classes only. No inline style attributes. - Use Phosphor icons (`@phosphor-icons/react`) for any icon. - GLINUI variant vocabulary: solid, soft, outline, ghost, gradient, glass. - Variants available on this component: `default`, `outline`. ## Accessibility - The panel is a `nav` landmark with an accessible name. - The current page uses `aria-current="page"`; collapsible group labels expose `aria-expanded` and `aria-controls`. - On small screens the sidebar becomes a Sheet dialog with focus trap and Escape to close. - In icon mode, labels stay in the accessibility tree (visually hidden) and tooltips reveal them. Keyboard: | Key | Action | | --- | --- | | Ctrl/Cmd + B | Toggle the sidebar. | | Tab / Shift + Tab | Move through menu buttons. | | Enter / Space | Activate a button or toggle a group. | | Escape | Close the mobile sheet. | ARIA: - `