Skip to main content
Theme UI provides a variety of UI components for building complete interfaces.

Button

The Button component is a primitive button with theme-aware variants.

Import

Usage

Props

string
default:"'primary'"
Button variant from theme.buttons
Button accepts all standard HTML button attributes and Box props.

Default Styles

Examples


The Link component is an anchor element with theme integration.

Import

Usage

Props

string
default:"'styles.a'"
Link variant from theme.links
Link accepts all standard HTML anchor attributes and Box props.

Examples


The NavLink component is designed for navigation links with active states.

Import

Usage

Props

string
default:"'nav'"
Link variant from theme.links

Default Styles

Examples


Card

The Card component is a flexible container for content.

Import

Usage

Props

string
default:"'primary'"
Card variant from theme.cards
Card accepts all Box props.

Examples


Badge

The Badge component displays small labels or tags.

Import

Usage

Props

string
default:"'primary'"
Badge variant from theme.badges

Default Styles

Examples


Alert

The Alert component displays messages and notifications.

Import

Usage

Props

string
default:"'primary'"
Alert variant from theme.alerts

Default Styles

Examples


Avatar

The Avatar component displays user profile images.

Import

Usage

Props

number | string
default:"48"
Width and height of the avatar
string
default:"'avatar'"
Image variant from theme.images
Avatar accepts all standard HTML img attributes and Box props.

Default Styles

Examples


Spinner

The Spinner component displays a loading indicator.

Import

Usage

Props

number
default:"48"
Size of the spinner in pixels
number
default:"4"
Width of the spinner stroke
string
default:"'Loading'"
Accessible title for the spinner
number
default:"750"
Duration of the animation in milliseconds

Default Styles

Examples


Progress

The Progress component displays a horizontal progress bar.

Import

Usage

Props

number
Maximum value
number
Current value

Default Styles

Examples


Donut

The Donut component displays a circular progress chart.

Import

Usage

Props

number
required
Current value
number
default:"0"
Minimum value
number
default:"1"
Maximum value
string | number
default:"128"
Size of the donut chart
number
default:"2"
Width of the donut stroke
string
Accessible title for the chart

Default Styles

Examples


IconButton

The IconButton component is a transparent button for SVG icons.

Import

Usage

Props

number | string
default:"32"
Width and height of the button
string
default:"'icon'"
Button variant from theme.buttons

Default Styles

Examples


Close

The Close component is a button with a close (×) icon.

Import

Usage

Props

number
default:"32"
Size of the close button
string
default:"'close'"
Button variant from theme.buttons

Examples


Message

The Message component is a styled box for callouts and inline messages.

Import

Usage

Props

string
Message variant from theme.messages

Default Styles

Examples


Divider

The Divider component creates a horizontal rule.

Import

Usage

Props

Divider accepts all Box props and uses theme.styles.hr by default.

Default Styles

Examples


Image

The Image component is a responsive image element.

Import

Usage

Props

string
Image variant from theme.images
Image accepts all standard HTML img attributes and Box props.

Default Styles

Examples


Embed

The Embed component creates a responsive iframe container.

Import

Usage

Props

string
URL of the embedded content
number
default:"16 / 9"
Aspect ratio of the embed
number
default:"0"
Frame border width
boolean
default:"true"
Allow fullscreen mode

Examples

Complete UI Example