Typesafe and typehinted theming in a next.js application: https://styled-system-next-demo.now.sh
- Clone the project and run
npm install
- You can alter the shape of your theme to fit your needs in
/lib/styled-components.ts
- You'll define your theme's values in
/lib/theme.ts
- TypeScript provides the most thorough code completion and type hinting experience.
- Styled-components allows for an easily extensible theme to be created and propgated throughout the application
- Styled-system gives the mechanism for crafting reusable components that make the most of this theme.
- We use the path setting of
tsconfig.json
to resolve all imports of styled-components to the our own version of the styled function with our custom theme interface.