# kanok-ui (@purpurabog/ui 2.3.0) > Carbon Design System components for any web app: Lit web components (``, any framework), React wrappers, unstyled React parts (headless) and React + Tailwind components you copy in with shadcn. Themes white / g10 / g90 / g100, layers, Thai and English. npm package `@purpurabog/ui`; shadcn registry namespace `@kanok-ui`. Rules for writing code with it: use these components instead of raw HTML controls; colour and space with the `--ui-*` tokens (never hard-coded colours); restyle with `::part()` and tokens, not the shadow DOM; nest `` (or React `Layer`) for surfaces on surfaces. Each page below has an Installation section (npm and shadcn commands) and an API section (attributes, properties, events, slots, parts). The design tokens and rules are in [DESIGN.md](https://parntengza.github.io/kanok-ui-docs/DESIGN.md) (also in the package: `node_modules/@purpurabog/ui/DESIGN.md`). Thai versions of every page are under `th/`. ## Get started - [@purpurabog/ui](https://parntengza.github.io/kanok-ui-docs/en/index.md): Components that follow IBM's Carbon Design System, made for forms in Thai and English: fields, lists, dates (Buddhist era), overlays, data tables and the UI shell. This site is built with them. - [Installation](https://parntengza.github.io/kanok-ui-docs/en/installation.md): The package is public on npm. Pick the way that fits your app; you can mix them. - [Migrating to 1.0](https://parntengza.github.io/kanok-ui-docs/en/migration-1-0.md): 1.0 replaces the data-driven web component `` with a family of elements that follow Carbon web components (`cds-table`): ``, ``, ``, ``,… ## Guides - [Themes and layers](https://parntengza.github.io/kanok-ui-docs/en/themes.md): Every color comes from Carbon's four themes, generated from `@carbon/themes` into `tokens.css`. You pick a theme with one attribute, `data-theme`, on the whole page or on any part of it. Inside a theme, `` moves fields and… - [Kanok design](https://parntengza.github.io/kanok-ui-docs/en/kanok.md): Kanok (กนก, after the flame-like Thai motif *lai kanok*) is the library's own style, next to Carbon. It is meant for internal business tools: clean and calm, surfaces set apart by their fill rather than lines, with a Thai-craft identity… - [Customize the look](https://parntengza.github.io/kanok-ui-docs/en/customizing.md): Start from the shallowest layer and go deeper only when it isn't enough: - [Icons](https://parntengza.github.io/kanok-ui-docs/en/icons.md): The components don't ship icons; they take yours in a slot or an `icon` prop and size and color them. Use Carbon's icons, the set this design system is drawn with: browse them in the IBM UI icon library and install the package for your… - [Forms and validation](https://parntengza.github.io/kanok-ui-docs/en/forms.md): Every field is a form-associated custom element: it takes part in a plain `
` the way `` does. You get submit, `FormData`, reset and the browser's constraint validation without any glue code. - [Using it with frameworks](https://parntengza.github.io/kanok-ui-docs/en/frameworks.md): The components are standard custom elements (``, `` …), so any framework that renders HTML can use them. React gets typed wrappers on top. This page covers what changes from one framework to the next: passing… - [Use it with AI coding tools](https://parntengza.github.io/kanok-ui-docs/en/ai.md): Claude, Cursor, Copilot and other AI tools write better code with these components when they can read the docs and the design rules. Give them three things: the docs index, the design file, and a short set of rules in your project. ## Forms and actions - [Button](https://parntengza.github.io/kanok-ui-docs/en/button.md): A button starts an action: save, submit, open a dialog. For going to another page, give it an `href` and it becomes a real link. - [Text input](https://parntengza.github.io/kanok-ui-docs/en/text-input.md): A text input takes one line of text: a name, an email, a password, an ID number. For several lines, use a text area; for amounts, a number input. - [Text area](https://parntengza.github.io/kanok-ui-docs/en/text-area.md): A text area takes text that runs over several lines: notes, a description, a reason. It has the same label, helper text and error line as the text input, plus a character or word counter and a field that can grow with its text. - [Number input](https://parntengza.github.io/kanok-ui-docs/en/number-input.md): A number input takes a number: a quantity, an amount, a percentage. Carbon's − and + buttons sit at the end of the field, and ↑ / ↓ step from the keyboard. - [Search](https://parntengza.github.io/kanok-ui-docs/en/search.md): A search field lets people find or filter content by typing. Carbon hides its label and shows a magnifier instead; a clear button appears once there is text. - [Select](https://parntengza.github.io/kanok-ui-docs/en/select.md): A select picks one option from a list. It wraps the browser's own ``, a button that shows or hides a password, and a mask that formats the value as the user types. - [Headless Text area](https://parntengza.github.io/kanok-ui-docs/en/headless-text-area.md): `TextArea` is the behaviour of the styled Text area as unstyled React parts: a `