Installation
Check the React and Node requirements, then add Margo UI to your project.
Requirements
| requirement | |
|---|---|
react | ^19.0.0 |
react-dom | ^19.0.0 |
node | >=18 |
Install
npm install margo-uiStylesheet
Import the kit once, in your entry stylesheet. It brings in a few base styles, the colour, border and radius tokens, and the styles of every component. The components don't import any CSS themselves, so this import is required.
/* your entry stylesheet */
@import "margo-ui/css";With Tailwind
The kit doesn't need Tailwind, but works next to it. Import it after tailwindcss, so Tailwind's reset comes first; its utilities still win over the kit's styles:
@import "tailwindcss";
@import "margo-ui/css";Fonts and type
The kit sets no typeface and no type scale. Components inherit the font of the page, and the sizes they need are written in their own CSS, so your classes can change them.
Server Components
Every component works from a Server Component, compound parts like Button.Label included. The ones that need the browser are client components inside the kit, so you don't have to wrap them in your own.