Overview of tss-react
maintss-react is a dynamic CSS-in-TS solution built on top of Emotion. It provides a type-safe equivalent to the JSS API, making it a modern replacement for @material-ui v4 makeStyles and react-jss.
Key features include:
- Type-safety: Full TypeScript support for styles.
- Dynamic Styles: Generate styles based on component props and internal state.
- MUI Integration: Seamlessly works with Material UI.
- Next.js Support: Compatible with both App and Page Router (note: dynamic style generation currently prevents support for React Server Components/RSC).
- CSS Control: Ability to increase rule specificity to avoid priority conflicts.
- Low Overhead: Minimal impact on bundle size (~5kB minzipped alongside MUI).
- JSS Syntax: Provides a type-safe equivalent of the JSS
$syntax for nested selectors.