Design System
UI Components
Four composable building blocks used throughout this site. Each component is built with class-variance-authority for variant management and CSS custom properties for automatic light/dark mode support.
How and why this system was designed: Design System Architecture →
Badge
A pill-shaped label for status indicators and metadata tags. Uses the same semantic color tokens as Callout, keeping the palette consistent across the system.
Variants
Sizes
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'default' | 'success' | 'warning' | 'muted' | 'default' | Color theme of the badge. |
| size | 'sm' | 'md' | 'lg' | 'md' | Controls padding and font size. |
| ...rest | HTMLAttributes<HTMLSpanElement> | - | All native span attributes are forwarded. |
Callout
A bordered box for surfacing important information inline with content. The optional title renders in a variant-matched color. Omit it for body-only callouts.
Info
Success
Warning
Note
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'info' | 'success' | 'warning' | 'note' | 'info' | Color theme applied to border, background, and title. |
| title | string | undefined | Optional heading rendered above the body content. |
| children | ReactNode | - | Body content displayed below the title. |
| ...rest | HTMLAttributes<HTMLDivElement> | - | All native div attributes are forwarded. |
InlineCode
A minimal <code> wrapper for short snippets inline with prose. Uses --inline-code-bg so it adapts to the active theme automatically.
Use useState for local component state and useReducer when logic grows complex.
Install the package: npm install @render-px/ui
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | - | Code content to display. |
| className | string | '' | Additional CSS classes merged into the element. |
| ...rest | HTMLAttributes<HTMLElement> | - | All native code element attributes are forwarded. |