Installation
Install the tokens and Core components, then import the CSS.
Install
Install the tokens and the Core components from npm.
npm i @aloxe/react @aloxe/tokensImport the CSS
Import the tokens once, after Tailwind, in your global stylesheet.
@import "tailwindcss";
@import "@aloxe/tokens/aloxe.css";
@import "@aloxe/tokens/tailwind.css";
@source "../node_modules/@aloxe/react/dist";The @source line makes Tailwind generate the classes used by the Core components. Its path is relative to the stylesheet, so point it at node_modules/@aloxe/react/dist from where your stylesheet lives. The path above fits a stylesheet one level below the project root, such as src/globals.css. For src/app/globals.css, use ../../node_modules/@aloxe/react/dist.
Set a theme
Set the theme and brand on the root element. Dark mode follows data-theme.
<html data-theme="light" data-brand="cobalt">Use a component
import { Button } from "@aloxe/react";
export function Save() {
return <Button variant="primary">Save</Button>;
}