You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a company-internal UI component library to be used by various apps within the company, but I'm still fairly new to the world of Tailwind (I was previously deep in the world of CSS-in-JS). Is there any sort of guide or template for creating a component library that uses @headlessui/react & Tailwind as a base? The one assumption is that the consuming app will also be using Tailwind. Ideally, dev should be able to just import a component (import { Button } from 'our-library';), and it should be already styled with TW classes. But I'm not sure how it should be bundled, nor what steps would be needed to use this library in an app. Like, would I have to modify tailwind.config.js or import a base CSS file?
Ideally, I want to have a peek at a relatively simple library that I can build off of for my own component library. Does any such example exist?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to create a company-internal UI component library to be used by various apps within the company, but I'm still fairly new to the world of Tailwind (I was previously deep in the world of CSS-in-JS). Is there any sort of guide or template for creating a component library that uses @headlessui/react & Tailwind as a base? The one assumption is that the consuming app will also be using Tailwind. Ideally, dev should be able to just import a component (
import { Button } from 'our-library';
), and it should be already styled with TW classes. But I'm not sure how it should be bundled, nor what steps would be needed to use this library in an app. Like, would I have to modifytailwind.config.js
or import a base CSS file?Ideally, I want to have a peek at a relatively simple library that I can build off of for my own component library. Does any such example exist?
Beta Was this translation helpful? Give feedback.
All reactions