@twentyfirstmedia/ui-core
The shared core of the Twentyfirst UI kits: every component, hook, icon and Intl formatter, plus themes.css with both kits.
Website · Halo docs · Pro docs · GitHub · llms.txt
Most apps install a kit instead, @twentyfirstmedia/halo or @twentyfirstmedia/pro, which re-export everything here together with the kit's styles.
Install ui-core directly to load both kits and switch at runtime:
npm install @twentyfirstmedia/ui-core
import "@twentyfirstmedia/ui-core/themes.css";
import { Button, UIProvider } from "@twentyfirstmedia/ui-core";
export function App({ pro }: { pro: boolean }) {
return (
<UIProvider kit={pro ? "pro" : "halo"}>
<Button variant="primary">Save</Button>
</UIProvider>
);
}
Markup, props and state stay the same; only the CSS that applies changes.
Moving from shadcn/ui: @twentyfirstmedia/ui-core/shadcn.css dresses shadcn/ui's primitives (buttons, inputs, cards, dialogs, menus, tables, tabs …) in the active kit by their data-slot attributes, inside [data-kit] only, so an app can move page by page. Guide: Moving from shadcn/ui.
License
MIT © Twentyfirst Media. Fonts under the SIL Open Font License 1.1.