API Reference
@gridland/ui
UI component library API reference
Individual components can be installed via the shadcn CLI. See the Installing Components guide for details.
bunx shadcn@latest add @gridland/<component-name>Gradient
Renders color gradients across text or backgrounds.
import { Gradient } from "@/components/ui/gradient"See Gradient component docs for usage examples.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
colors | string[] | required | Hex color stops |
direction | "horizontal" | "vertical" | "horizontal" | Gradient direction |
mode | "foreground" | "background" | "foreground" | Where to apply colors |
children | ReactNode | required | Content to render |
interpolateColor(color1, color2, t)
Interpolate between two hex colors.
color1- Start color (hex string)color2- End color (hex string)t- Interpolation factor (0 to 1)- Returns: Hex color string
generateGradient(colors, steps)
Generate an array of interpolated colors.
colors- Array of hex color stopssteps- Number of output colors- Returns: Array of hex color strings
Table
Renders structured data in a table layout.
import { Table } from "@/components/ui/table"See Table component docs for usage examples.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
columns | Column[] | required | Column definitions |
data | Record<string, any>[] | required | Row data |
borderStyle | string | "single" | Table border style |
headerColor | string | "#ffffff" | Header text color |
Column
| Property | Type | Default | Description |
|---|---|---|---|
header | string | required | Display header |
key | string | required | Data key |
width | number | auto | Column width |
align | "left" | "center" | "right" | "left" | Alignment |
color | string | inherited | Cell text color |