styled-components

Community-led documentation about using styled-components with Vike.

💚
This page may contain outdated information, PR welcome to update or improve this page.

If you are using vike-react, you can install vike-react-styled-components for automatic integration.

The vike-react-styled-components extension requires vike-react.

Manual integration

When using styled-components, you need to collect the page's styles upon SSR:

You can follow along on this tutorial (vite-plugin-ssr was the previous name of Vike) on how to add styled-components to your Vike app.

If you use vike-react, you can manually integrate styled-components by using:

Examples:

See also