@k8ordo/ui

Get Started

Install @k8ordo/ui and put a first component on screen.

On this page

Install

bash
npm install @k8ordo/ui @k8ordo/i18n

It runs with:

  • React 19.3 or later
  • TypeScript 7 or later, when you write TypeScript

The guide for AI agents ships at node_modules/@k8ordo/ui/docs/GUIDE.md. Point your AGENTS.md or the like at that path.

The packages for generative UI and AI chat are needed only for those features. Each feature’s page, linked from AI, says how to add them.

Stylesheet

main.tsx
import '@k8ordo/ui/styles.css';

Import the stylesheet with the tokens and the reset once, at the application’s entry point. Each component loads its own CSS. No Tailwind CSS is needed.

app.css
@import 'tailwindcss';
@import '@k8ordo/ui/tailwind.css';

A project on Tailwind CSS 4 imports tailwind.css after tailwindcss instead. The design tokens then become Tailwind classes such as bg-bg-base, usable in your own markup too. tailwind.css works on top of your project’s own Tailwind, so @k8ordo/ui does not depend on it.

See the dark mode section of Theming for switching to dark mode.

Information

Note

Either stylesheet applies base styles to the whole document. It resets the margins of headings and lists and unsets bold on b and strong. Adding it to an existing app restyles more than the library’s components.

Wrap rendered Markdown in Prose to restore its heading and bold styles.

Provider

main.tsx
import { UIProvider } from '@k8ordo/ui';

export function Root() {
  return (
    <UIProvider>
      <App />
    </UIProvider>
  );
}

Wrap the application root in UIProvider, once. Toasts need it in order to show.

Built-in wording such as “Close” follows the current locale of @k8ordo/i18n. i18n covers how the locale is chosen.

Components

subscribe-form.tsx
import { Button, FormControl, TextField } from '@k8ordo/ui';

export function SubscribeForm() {
  return (
    <form>
      <FormControl
        label="Email"
        renderInput={(props) => <TextField {...props} type="email" />}
      />
      <Button type="submit" variant="solid">
        Subscribe
      </Button>
    </form>
  );
}

Import the components you need and place them.

No component takes className or style. Choose the look with props such as variant and size. When that is not enough, replace the element through a render prop such as Button’s renderItem.

k8ordo

React libraries that use Baseline features without holding back.