Doc Page
Introduction
Understand nake-ui as an agent-friendly behavioral UI standard library.
What nake-ui Is
nake-ui is a behavioral UI standard library. It defines interaction semantics, state contracts, DOM structure, ARIA relationships, keyboard behavior, and schema-backed validation for UI primitives. It does not define the final visual design of your product.
The core idea is simple: a primitive should be usable by humans, frameworks, tests, and agents because the same behavioral truth is visible in the DOM. State is reflected through ARIA and public data-* attributes, not inferred from private component internals or styling class names.
The current public docs catalog covers five adapter routes:
| Adapter | Package | Primary surface |
|---|---|---|
| React | @nake-ui/adapter-react |
Compound components plus legacy prop mappers |
| Vanilla | @nake-ui/adapter-vanilla |
Explicit bind* functions over DOM elements |
| Vue | @nake-ui/adapter-vue |
Compound components and use* composables |
| Solid | @nake-ui/adapter-solid |
Signal-friendly compound components |
| Svelte | @nake-ui/adapter-svelte |
Svelte compound primitive namespaces |
Sources: shared/en/introduction
Design Principles
- Headless by architecture: behavior and visuals are separate layers.
- Native-first: prefer
button,input,form,focus,keydown,input,change,submit,click, andpointerdownbefore inventing framework-only semantics. - Agent-friendly: public DOM contracts are stable, enumerable, and inspectable.
- Accessible by default: keyboard models, focus rules, labels, roles, and ARIA linkage are part of the contract.
- Adapter parity: framework syntax can differ, but observable behavior should not drift.
This makes the library closer to a contract layer than a visual component kit. It is useful when you want accessible interaction behavior without adopting a branded design system.
Sources: shared/en/introduction
What It Is Not
- It is not a Button/Card visual component library.
- It is not a CSS framework, token system, or Tailwind preset.
- It does not make
classNamethe source of semantic truth. - It does not make React runtime state the core truth.
- It does not require Shadow DOM for ordinary primitives.
Visual styles, animations, layout density, and product branding belong to your application. nake-ui provides the behavior and DOM contract your styling layer can safely target.
Sources: shared/en/introduction
How To Read The Docs
Read the docs in this order when integrating a primitive:
- Start with this introduction and the current adapter quick start.
- Read Primitive Concepts to understand anatomy, state, events, keyboard, ARIA, and validator language.
- Open Components Overview to choose a primitive and inspect its slot/state matrix.
- Read Adapter Integration for your framework surface.
- Copy from the matching adapter examples, then run the validator and contract tests.
The docs intentionally repeat a few constraints. That repetition is useful: the same contract should be visible in specs, generated catalogs, examples, tests, and runtime DOM.
Sources: shared/en/introduction
Public DOM Contract
Public data-* attributes are part of the API:
<button
data-ui="select"
data-slot="trigger"
data-state="open"
aria-haspopup="listbox"
aria-expanded="true"
aria-controls="select-content"
>
Choose fruit
</button>Use these attributes as stable selectors and inspection points:
data-uidata-slotdata-statedata-disableddata-selecteddata-highlighteddata-orientationdata-expandeddata-invalid
Classes can style the primitive, but classes should not be the only place where state exists.
Sources: shared/en/introduction
Current v1 Scope
The canonical v1 primitives visible in the site are:
- Disclosure
- Tabs
- Dialog
- Popover
- Menu
- Listbox
- Select
- Combobox
- Tooltip
These are backed by core controllers, schemas, specs, adapter examples, DOM contract snapshots, and adapter parity tests. React also contains adapter-owned experimental components, but the docs catalog treats those as outside the canonical v1 surface until their contracts are promoted.
Sources: shared/en/introduction
Agent Workflow
When asking an agent to generate or repair UI code, include:
- Adapter and package name.
- Primitive name and required slots.
- Controlled or uncontrolled state mode.
- Required ARIA relationships.
- Keyboard and focus expectations.
- Public
data-*attributes that must remain inspectable. - Validation command or checklist.
Example prompt shape:
Build a Select with @nake-ui/adapter-vue. Use uncontrolled value, include Trigger,
Value, Content, Group, Label, Option, HiddenInput, preserve aria-controls and
aria-selected, and list the DOM contract checks after the code.Sources: shared/en/introduction
Next Reading
- Quick Start: install one adapter and ship a first primitive.
- Installation: choose package versions and peer dependencies.
- Adapter Integration: map framework ergonomics to the same DOM contract.
- Primitive Concepts: learn state, event, focus, ARIA, schema, and validator vocabulary.
- Components Overview: inspect the v1 primitive catalog.
Sources: shared/en/introduction