Skip to main content
The @theme-ui/components package provides a complete set of primitive UI components that work seamlessly with your theme. All components support the sx prop and can be styled using theme values.

Installation

This package is included in the main theme-ui package, so a separate installation is not required if you’re already using theme-ui.

When to Use

Use @theme-ui/components when you:
  • Need pre-built, theme-aware UI components
  • Want consistent styling across your application
  • Are building with design system constraints
  • Need accessible, well-tested primitives
Use the umbrella theme-ui package if you also need the provider and other utilities.

All Components

Layout Components

Box

The foundational layout component. All other components are built on top of Box.
View Box documentation →

Flex

A Box with display: flex.
View Flex documentation →

Grid

A Box with display: grid.
View Grid documentation →

Container

A centered container with max-width.
View Container documentation →

Typography Components

Text

General purpose text component.
View Text documentation →

Heading

Heading component with automatic variant mapping.
View Heading documentation →

Paragraph

Paragraph component.
View Paragraph documentation → Styled link component.
View Link documentation →

Form Components

Button

Button component with theme variants.
View Button documentation →

Input

Text input field.
View Input documentation →

Textarea

Multi-line text input.
View Textarea documentation →

Select

Dropdown select component.
View Select documentation →

Label

Form label component.
View Label documentation →

Checkbox

Checkbox input.
View Checkbox documentation →

Radio

Radio button input.
View Radio documentation →

Slider

Range slider input.
View Slider documentation →

Switch

Toggle switch component.
View Switch documentation →

Field

Combines Label and Input/Textarea/Select.
View Field documentation →

Interactive Components

IconButton

Button optimized for icons.
View IconButton documentation → Button with menu icon.
View MenuButton documentation →

Close

Close button component.
View Close documentation → Navigation link with active state support.
View NavLink documentation →

Display Components

Card

Card container component.
View Card documentation →

Image

Image component.
View Image documentation →

Avatar

User avatar component.
View Avatar documentation →

Badge

Badge component for labels and counts.
View Badge documentation →

Alert

Alert message component.
View Alert documentation →

Message

Message box component.
View Message documentation →

Divider

Horizontal divider.
View Divider documentation →

Media Components

Embed

Responsive iframe embed.
View Embed documentation →

AspectRatio

Container that maintains aspect ratio.
View AspectRatio documentation →

AspectImage

Image with aspect ratio constraint.
View AspectImage documentation →

Feedback Components

Progress

Progress bar component.
View Progress documentation →

Donut

Circular progress indicator.
View Donut documentation →

Spinner

Loading spinner component.
View Spinner documentation →

Complete Component List

Common Features

All components support:

The sx Prop

Style components with theme-aware values:

Variants

Apply pre-defined style variants from your theme:

Responsive Props

Many components support responsive prop values:

TypeScript Support

All components are fully typed:

Notes

  • All components use the sx prop for styling
  • Components forward refs correctly
  • Fully accessible with ARIA attributes
  • Built with styled-system for consistent API
  • Requires @emotion/react and react as peer dependencies
  • Requires @theme-ui/theme-provider as a peer dependency