Try it live at Stackblitz or Codesandbox.
This example uses renderToString to generate server-side rendered styles. For an example with React v18 and renderToPipeableStream take a look at with-remix_react-v18.
- a modified app/entry.client to enable dynamic styling in the browser
- a modified app/entry.server to enable server-side rendering (SSR) of styles
- (optional) a dedicated twind file to ensure the
@twind/core
tw
function is defined - (optional) a dedicated twind.config