Theme UI builds consistent React interfaces using theme tokens, the sx prop, and Emotion-backed styles. It follows the System UI Theme Specification for colors, typography, and layout.
Overview
Theme UI is a library for themeable user interfaces based on constraint-based design principles. It targets custom component libraries, design systems, web applications, and Gatsby themes with a flexible theming API.
Themes follow the System UI Theme Specification so colors, typography, fonts, and layout scales stay consistent. The ThemeUIProvider supplies a theme object, and the sx prop references theme values similarly to Emotion's css prop with extra theme awareness.
Features called out include mobile-first responsive styles, dark mode support, primitive layout components, MDX styling helpers, compatibility with other component libraries and existing Styled System components, and a Gatsby plugin.
A smaller @theme-ui/core package is available when color modes and bundled components are not needed.
Key features
- Theme object via ThemeUIProvider
- sx prop for theme-aware CSS
- System UI Theme Specification
- Emotion-backed scoped styles
- Built-in primitive components
- MDX content styling API
- Dark mode support
- Gatsby plugin integration
Use cases
- Building consistent React design systems
- Styling MDX documentation sites
- Theming Gatsby sites and themes
- Sharing tokens across component libraries