Installation
Install the components package:Importing Components
You can import individual components from the package:Component Categories
The Theme UI component library is organized into several categories:Layout Components
Layout primitives for structuring your UI:- Box - The foundational component with system props for styling
- Flex - Flexbox container
- Grid - CSS Grid layout component
- Container - Centered, max-width container
Typography Components
Text and heading components:- Text - Generic text element
- Heading - Heading component (h1-h6)
- Paragraph - Paragraph element
Form Components
Form controls and inputs:- Input - Text input
- Textarea - Multi-line text input
- Select - Dropdown select
- Label - Form label
- Checkbox - Checkbox input with custom icon
- Radio - Radio input with custom icon
- Switch - Toggle switch
- Slider - Range slider
- Field - Labeled form field wrapper
UI Elements
Interface components:- Button - Button element
- Link - Anchor link
- NavLink - Navigation link
- Card - Container card
- Badge - Inline badge
- Alert - Alert message box
- Avatar - User avatar image
- Spinner - Loading spinner
- Progress - Progress bar
- Donut - Donut chart
- IconButton - Icon button
- Close - Close button
- Message - Message callout
- Divider - Horizontal divider
- Embed - Responsive iframe embed
- Image - Image element
Theme-Aware Styling
All components support thesx prop for adding theme-aware styles:
Component Variants
Most components support variants defined in your theme:System Props
The Box component (and all components built on Box) supports system props for common CSS properties:Accessibility
Theme UI components are built with accessibility in mind:- Semantic HTML elements by default
- Proper ARIA attributes where needed
- Keyboard navigation support
- Screen reader friendly
