Skip to content

Instantly share code, notes, and snippets.

@sseagull
sseagull / Storybook with Stitches.md
Last active May 17, 2023 11:40
Stitches + Storybook `css` prop type definition clash fix

Using Stitches with Storybook

The setup for storybook is the same as their docs. Once you're repo is set up (Im using Typescript) and you have Stitches imported and set up (as per the stitches docs), the next step is to install Storybook.

I went with their npx setup: npx sb init (note: since my project was already set up with React/TS this command detected everything it needed to know, so there was no interactive prompt for me)

When using a styled stitches component everything will work as expected:

export const Button = styled('button', {