Features
Create truly reusable component primitives that can be styled differently across projects without code duplication.Type-Safe Styling
Full TypeScript support with intelligent autocomplete for variants and modifiers
Performance Optimized
Built-in memoization and LRU caching for fast re-renders
Framework Agnostic
Works with any CSS framework - Tailwind, CSS Modules, styled-components
Zero Runtime
Minimal bundle size with tree-shaking support
Get started
Create your first styled component
Follow our quickstart guide to build your first component with Recast
Why Recast?
True Component Reusability
Traditional component libraries force you to choose between reusability and customization. With Recast, your component primitives are completely theme-agnostic. Write a button once, style it differently in every project.
Developer Experience
Full TypeScript integration means you get autocomplete for every variant and modifier. No more guessing what props are available or accidentally using invalid combinations.
Performance by Default
Recast includes intelligent caching and memoization strategies that prevent unnecessary re-computations. Your components stay fast even with complex styling logic.
Design System Friendly
Whether you’re using Tailwind CSS, CSS Modules, or any other styling solution, Recast adapts to your workflow. No vendor lock-in, no predefined design tokens.
Nested & Complex Component Styling
Unlike other similar libraries, Recast lets you style deeply nested, multi-part components with ease. Further enabling true design system flexibility for complex UIs.
Core concepts
Styles
Learn how to create reusable style definitions
Variants
Create mutually exclusive styling options
Modifiers
Add boolean-based conditional styling
Composition
Combine multiple style objects together
Conditionals
Apply styles based on specific combinations
Nested Styles
Style complex components with multiple parts
Community and support
GitHub Repository
View source code, report issues, and contribute
NPM Package
View package details and download statistics
Recast is inspired by amazing projects like CVA, Stitches, and Tailwind Variants. We’re grateful for their contributions to the component styling ecosystem.