Getting started
Installation
loseta copies CSS files into your project. You need Node 20+ and a CSS entrypoint.
1. Initialize
The CLI detects a CSS entrypoint and creates the foundation files. Choose a visual style with --style; the default is nova.
pnpm dlx loseta initnpx loseta initTo start with the classic shadcn/ui geometry:
pnpm dlx loseta init --style veganpx loseta init --style vegaIf you prefer to answer every question explicitly, omit --yes. The CLI asks for the CSS directory, the style and the entrypoint.
index.css is regenerated. Component files stay on disk but are no longer tracked; run loseta add all to restore stable components. Experimental components must be re-added by name with --experimental.2. Add components
Components install their structural CSS, the selected style file and any primitive dependency.
pnpm dlx loseta add button card field dialognpx loseta add button card field dialogTo install every stable component:
pnpm dlx loseta add allnpx loseta add all--experimental flag and the Nova-only rule remain for future items; they require a Nova project, andloseta style refuses to switch away while one is installed.3. Import the generated entrypoint
init creates loseta/index.css and can add a single import to your CSS entrypoint. If you skipped that step, add it manually:
@import "./styles/loseta/index.css";Project files
loseta.json # cssDir, entrypoint and style
.loseta/manifest.json # installed items and file hashes
src/styles/loseta/
tokens.css # design tokens
reset.css # minimal reset
base.css # element defaults
utilities.css # sr-only
index.css # generated @layer order + imports
primitives/ # shared popover/dialog shells
components/ # structural CSS per component
styles/nova/ # visual CSS for the selected styleCommands
The CLI works with pnpm and npm. The examples use pnpm.
pnpm dlx loseta init # set up the project
pnpm dlx loseta init --style vega # start with the Vega style
pnpm dlx loseta add button card # add components
pnpm dlx loseta add all # add every stable component
pnpm dlx loseta list --experimental # experimental items, when present
pnpm dlx loseta style vega # switch an installed project
pnpm dlx loseta list # list components
pnpm dlx loseta list --all # include experimental, primitives and foundation
pnpm dlx loseta add button --html # print the example markupCoexistence
loseta is a native CSS design system. It uses unprefixed classes such as.btn and unprefixed tokens such as --background. If your project already uses shadcn/ui or Tailwind, choose one token contract instead of loading both.
@layer,:has(), color-mix(), @starting-style and field-sizing. Target Chrome/Edge 125+, Safari 26+ and Firefox 147+ for full fidelity.