Install
Rost's components get copied into your app. You own the copy, under MIT-0: no notice to keep, no credit owed. Nothing to import from a package, nothing to keep in step with a version number.
Rost has its own installer, bin/rost.mjs. It reads the registry on rost.build, where every component that's in code is a file at https://rost.build/r/<id>.json (the list is at /r/registry.json). Run it straight from GitHub, in your app's folder:
npx github:Runceanu/rost add button input
npx github:Runceanu/rost list
Add as many as you like in one go. A component brings what it needs: Input brings IconButton, Tabs brings TabItem.
Run add with no names to bring every component the app already has up to the current version.
Blocks install the same way. A block is a whole screen made only of Rost's components: sidebar, login and dashboard so far (Blocks). npx github:Runceanu/rost add dashboard brings the Dashboard, the Sidebar block it sits in, and every component either uses. It lands in src/rost/dashboard/, next to them, and it's yours to change from there.
Rost isn't on npm yet. When it is, that's npx rost add button.
What lands where
src/rost/<id>/holds the component, its CSS and its icons.src/rost/tokens.cssandsrc/rost/fonts.cssare the tokens, in dark and light, and General Sans.src/rost/brands.cssholds the blue and violet brands, for an app that isn't green (Brands).npx github:Runceanu/rost brand <name> <hex>makes one of your own.src/rost/conform.tsis the check that a copy still matches its contract. The apps run it in their tests.contracts/rost/<id>.contract.yamlis the contract, the same file as in this repo.
Import the two stylesheets once, at the root of the app:
import './rost/fonts.css'
import './rost/tokens.css'
The components are React (19 or later) with plain CSS. No Tailwind, no CSS-in-JS. Each one imports its own stylesheet, so your bundler has to handle a CSS import. Vite, Next and Astro all do.
Changing a component
You can, it's your copy. But the next add puts Rost's version back. If the change is right for Rost, make it in the contract here and every app gets it. If it's only right for one app, write it down as a deviation in that app's contract copy, so the conformance check knows it's on purpose.
What isn't right yet
- The files go into
src/. An app without one gets asrc/folder anyway. I'll add an option when an app needs it. - A file Rost deletes from a component stays in your copy.
bin/add.mjs, the older script for apps that sit next to this repo, replaces the whole folder and doesn't have that problem.