Requirements
Recast requires React 17 or later and works with any CSS framework or styling solution.
Install the package
Choose your preferred package manager:Basic usage
Import Recast and start creating styled components:Global configuration (optional)
For advanced use cases, you can configure Recast globally:Configuration options
Custom function for merging class names. Popular options include
clsx, classnames, or tailwind-merge.Enable performance monitoring in development mode. Logs cache hit rates and computation times.
Maximum number of entries in the LRU cache. Increase for better performance with many style variations.