API Reference
@gridland/ui
UI component library API reference
Individual components can be installed via the shadcn CLI. See Manual Installation → Install components for details.
bunx create-gridland add <component-name>Or, if you'd rather call shadcn directly:
bunx shadcn@latest add @gridland/<component-name>Components
| Component | Description | Docs |
|---|---|---|
GridlandProvider | Root provider supplying theme and an implicit <FocusProvider selectable> | — |
Ascii | ASCII art text with multiple font styles | Ascii |
ChainOfThought | Expandable reasoning blocks with step status | ChainOfThought |
Gradient | Color gradients across text characters | Gradient |
Link | Clickable hyperlink with configurable underline | Link |
Message | Chat message with role-based styling and streaming | Message |
Modal | Overlay dialog with border styles | Modal |
MultiSelect | Multi-selection input with groups and validation | MultiSelect |
PromptInput | Chat input with slash commands and AI SDK integration | PromptInput |
SelectInput | Single-selection dropdown with groups | SelectInput |
SideNav | Sidebar navigation with keyboard-driven focus | SideNav |
Spinner | Animated loading indicators | Spinner |
StatusBar | Horizontal bar displaying keybinding hints | StatusBar |
Table | Data table with compound sub-components | Table |
Tabs | Tabbed content with keyboard navigation | Tabs |
TerminalWindow | macOS-style terminal window chrome | TerminalWindow |
TextInput | Single-line text input with validation | TextInput |
Utility Functions
import { generateGradient, hexToRgb, rgbToHex } from "@/components/ui/gradient"| Function | Signature | Description |
|---|---|---|
generateGradient | (colors: string[], steps: number) => string[] | Generate an array of interpolated hex colors |
hexToRgb | (hex: string) => { r, g, b } | Convert hex to RGB |
rgbToHex | (rgb: { r, g, b }) => string | Convert RGB to hex |