Primitives
The Solid SDK provides primitive components that can be used to build custom UIs while maintaining consistent styling with Fanfare widgets.Available Primitives
| Component | Description |
|---|---|
Button | Styled button with variants |
Card | Card container with sections |
Input | Form input component |
Badge | Status badge component |
Spinner | Loading spinner animation |
Countdown | Countdown timer display |
Progress | Progress bar component |
Skeleton | Loading placeholder |
Transition | Animated transitions |
Button
Button Props
| Prop | Type | Default |
|---|---|---|
variant | "default" | "primary" | "secondary" | "destructive" | "outline" | "ghost" | "default" |
size | "sm" | "md" | "lg" | "md" |
disabled | boolean | false |
loading | boolean | false |
Card
Card Components
| Component | Description |
|---|---|
Card | Card container |
CardHeader | Header section |
CardTitle | Title text |
CardDescription | Subtitle/description text |
CardContent | Main content area |
CardFooter | Footer with actions |
Input
Input Props
| Prop | Type | Default |
|---|---|---|
type | "text" | "email" | "number" | "tel" | "text" |
placeholder | string | - |
value | string | - |
disabled | boolean | false |
error | boolean | false |
Badge
Badge Props
| Prop | Type | Default |
|---|---|---|
variant | "default" | "success" | "warning" | "destructive" | "outline" | "default" |
Spinner
Spinner Props
| Prop | Type | Default |
|---|---|---|
size | "sm" | "md" | "lg" | "md" |
Countdown
Countdown Props
| Prop | Type | Required | Description |
|---|---|---|---|
targetDate | Date | Yes | Target date/time |
class | string | No | Additional CSS classes |
onComplete | () => void | No | Callback when timer ends |
Countdown Display Format
The countdown displays time in the format:1d 2h 30m 15s- When days remain2h 30m 15s- When only hours remain30m 15s- When only minutes remain15s- When only seconds remain
Progress
Progress Props
| Prop | Type | Default |
|---|---|---|
value | number | Required |
max | number | 100 |
variant | "default" | "success" | "warning" | "default" |
showLabel | boolean | false |
labelFormat | (value, max) => string | - |
Skeleton
Skeleton Props
| Prop | Type | Description |
|---|---|---|
class | string | Width/height classes |
Transition
Transition Props
| Prop | Type | Description |
|---|---|---|
transitionKey | string | Key to trigger animation |
children | JSX.Element | Content to animate |
Combining Primitives
Build custom widget UIs using primitives:Theming Primitives
Primitives use CSS custom properties for styling:Related
- Overview - Solid SDK overview
- Components - Widget components
- Theming - Theme customization