interaction-dynamics / design-system-hub

A zero config alternative to Storybook with automatic synchronization with Figma, visual tests and more.
https://design-system-hub.com
MIT License
13 stars 1 forks source link

feat: load tokens #17

Open friedrith opened 4 months ago

friedrith commented 4 months ago

We need a solution to extract the styles from Figma and load them in the code.

A lot of solutions already exists:

The goal is to have a solution directly integrated into DesignSystemHub.

Details

All the solutions use the intermediate system of tokens. There is currently a W3C draft to standardize these tokens. So we should follow this approach.

It will be also useful to use style-dictionary to convert the token into CSS variables and tailwind config.

TODOs

We have the concept of Style in the code.

A follow up ticket will be #62 in order to load the styles from the variables and not only the styles.

friedrith commented 3 months ago

For the endpoint, we need to serve the JSON file following the mime-type application/design-tokens+json

https://second-editors-draft.tr.designtokens.org/format/#media-type-mime-type