base-ui
Skill0 starsChanged 13 days agoMITView on GitHub
The estate's conventions for React UI built on Base UI (@base-ui/react, pinned at 1.9.0) and styled with Tailwind 4, as 17 numbered rules, each with its reason and what enforces it (the house-style check-base-ui script, or review). Copy-ready Tailwind wrappers for dialogs, menus, popovers, selects, tabs, toasts, forms and the rest, the Light / Dark / System theme switch, the one stylesheet and its token names, and the method for moving an app from plain CSS to Tailwind.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- DobroslavRadosavljevic/cabrakantheir own version, first seen Nov 29, 2026
- Jbmanllr/agent-skillstheir own version, first seen Nov 29, 2026
- fedeya/wisp-aitheir own version, first seen Nov 29, 2026
- alainkaiser/skillstheir own version, first seen Aug 4, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- fedeya/wisp-ai★ 8same name
- alainkaiser/skills★ 2same name
- Jbmanllr/agent-skills★ 2same name
- DobroslavRadosavljevic/cabrakan★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- corpus/CLAUDE.mdCLAUDE.md
- architectSkill
- bootstrap-vps-deploySkill
- codegraphSkill
- code-structureSkill
- corpus-docs-siteSkill
- corpus-flowSkill
- design-md-librarySkill
- design-pipelineSkill
- design-taste-frontendSkill
- diagnoseSkill
- diagram-designSkill
- grill-meSkill
- hallmarkSkill
- high-end-visual-designSkill
- house-styleSkill
- impeccableSkill
- improveSkill
- industrial-brutalist-uiSkill
- minimalist-uiSkill
- no-commentsSkill
- orchestrateSkill
- plan-split-dispatchSkill
- poteto-modeSkill
- readme-docsSkill
- security-auditSkill
- stocktakeSkill
- thermo-nuclear-reviewSkill
- ui-test-plansSkill
- unslopSkill
- web-design-guidelinesSkill
- web-platformSkill
- whySkill
- writing-guidelinesSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Every web app in the estate builds its interactive parts on Base UI (@base-ui/react), pinned at 1.9.0, and styles the whole app with …
- Very specific: line 107
Rule 6: No literal radius, shadow or z value (rounded-[6px], z-[999]) where a token exists.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Base UI with Tailwind
Every web app in the estate builds its interactive parts on Base UI
(@base-ui/react), pinned at 1.9.0, and styles the whole app with
Tailwind 4. There is no shared component library: each app keeps its own
look on purpose (many carry a DESIGN.md), and the one shared kit that
exists, imbatranimOS's, shows what lockstep costs. What repeats from app to
app is behaviour and its traps: an Esc that closes the wrong layer, a
button nested in a button, a select showing a raw id, a native confirm().
This skill writes those down once, as numbered rules and as wrappers each
app copies and restyles with its own tokens.
The verdict and the alternatives it beat are in the library's corpus/wiki/decisions.md ("Base UI conventions as a skill, not a shared library"). The owner's calls of 2026-11-10 that shaped the rules are on grilling-2026-11-10.md and grilling-2026-11-10-technical-calls.md; their Q numbers appear below.
How the rules are checked
The checker ships in the library's house-style/ folder and reaches each
repo with the rest of house-style, by npm run house-style:sync. Nobody
copies it by hand.
node vendor/house-style/bin/check-base-ui.mjs [--warn-only] [--version 1.9.0] [repo-root]check:conventionsruns it, with--warn-onlyfrom the repo's harness brief until its own Base UI brief is done.- What it counts: errors are rules 1, 2, 3, 5, 6 (arbitrary colours only) and
11; warnings are 9 and 10. Rules 4 and 7, inline
styleunder 5, and radius, shadow and z literals under 6 are review only. A repo brief's "record the counts for rules 4-7" means counts found in review, not checker output. - Each finding is one line,
file:line rule-N error|warning: message. Exit 0 when no error is left, 1 when one is, 2 when it can't check (a bad flag, a malformedconventions.json). Warnings never fail the run. - The repo's
conventions.json(root,scripts/ortools/) names the web roots as source folders (web/src,apps/*/src,ui/app). Inside each root,uilists where Base UI may be imported (default**/components/uiand**/features/*/ui), andstylesheetnames the one stylesheet (defaultstyles/index.css). - A finding the repo accepts is an exception there: the check, the rule
number, the path, an optional
match, and areason. An exception without a reason is an error. An exception may also record a review-only rule's case (Ward's dark-only console under rule 14), so a reviewer finds it. - Tests (
*.test.*,*.spec.*, files undertest,tests,__tests__,testingore2e) are exempt from rules 3, 6, 9, 10 and 11. uiandstylesheetare per web root, one value each. A kit package whose components folder isn'tcomponents/ui(imbatranimOS: 18 findings), a token sheet shared by several roots, a lazy route's vendor sheet and a public-pages sheet (ward-auth, churchix's three token sheets) each take an exception with a reason. A repo whose one stylesheet stays atsrc/index.csssets"stylesheet": "index.css"(comercial-website) instead of an exception.- Rule 9 skips an icon child inside a trigger (postern's
ComposeFormandSearchBoxwarned on lucide icons until house-style 1.3.0): a name imported from an icon package, or one namedIconor…Icon. Another icon component still warns; it is a warning and stays one, don't except it.
The house-style package README has the full format.
The rules
| # | Rule | Why | Enforced by |
| 1 | Pin exactly: "@base-ui/react": "1.9.0", never ^ or ~ | The estate moves together; a later bump is a brief of its own, like the library's brief 04 | check-base-ui rule 1, in every package.json from a web root up to the repo root |
| 2 | Import a part's subpath, @base-ui/react/dialog, never the package root | One module per part keeps the dev server and tests small, and a grep for a part finds every use | rule 2 |
| 3 | Base UI is imported only under a ui/ folder: one wrapper per primitive at components/ui/<Name>.tsx, or a composite only one feature uses in features/<name>/ui/ (Q15, Q59). Feature code imports the wrapper | The look and the behaviour rules live in one file per primitive, and a Base UI change touches one folder | rule 3, against the ui globs; tests exempt |
| 4 | Style each part with Tailwind on its className: state through data-* variants (data-checked:, data-[side=top]:), positioner variables through origin-(--transform-origin) and the like, merged with cn() from src/lib/cn.ts. No CSS selector aimed at a part, no query into Base UI's DOM | The state is on the element; Base UI's inner markup is not an API and changes in minor releases | review |
| 5 | One stylesheet, src/styles/index.css: @import "tailwindcss", the @theme tokens, @custom-variant dark, fonts, third-party CSS in layer(vendor), a small @layer base. No other .css, no CSS modules, no inline style except computed geometry | Cascade layers decide what wins only when every rule sits in one ordered stack | rule 5: other stylesheets, CSS modules, and the one without @import "tailwindcss". Inline style is review |
| 6 | Colours, radii, shadows and z-indexes come from @theme tokens named for a role (bg-surface, text-ink, rounded-control, z-popup; Q17, Q61). No arbitrary colour | A token restyles the app at once, and dark mode is a token's second value | rule 6: an arbitrary colour anywhere in code (bg-[#…], rgb(, hsl(, oklch(, color-mix(, in cn() and cva too). Radius, shadow and z literals are review |
| 7 | Motion keys on data-starting-style and data-ending-style, under motion-safe:; keyframes are --animate-* in @theme | Base UI keeps a popup mounted until its transition ends, and reduced motion is honoured in one place | review |
| 8 | Every popup goes through its Portal, and its z-index comes from the token scale | A popup inside overflow or a transform gets clipped; literal z values put a Select under a Dialog in imbatranimOS | review |
| 9 | A trigger that wraps a component uses render: <Tooltip.Trigger render={<Button … />} />, for every trigger. A render function returns the element itself, not a span around it | A trigger is a <button>; a Button inside it nests a button in a button, invalid and click-swallowing | rule 9, a warning. It can't see a part re-exported under a new name; an icon child (from an icon package, or named …Icon) is skipped since house-style 1.3.0 |
| 10 | A Select whose values differ from their labels passes items to Select.Root | Without them the trigger shows the raw value | rule 10, a warning on every Select.Root without items. Blind to a re-exported root |
| 11 | No window.confirm, alert or prompt. Ask with ConfirmAction, useConfirm() or an inline Yes / No (Q58) | A native dialog blocks every script on the page, can't be styled, and some browsers suppress it | rule 11: bare, window., globalThis. and self. calls; a name the file binds itself is skipped |
| 12 | Dialogs: controlled open and onOpenChange with the Escape guard; initial focus on [data-autofocus], else the first field, else the footer's first button; disablePointerDismissal on a dialog that holds a form (Q58); a Title on every dialog; an aria-label on every icon-only control | Each was found by hand in three or more apps | review |
| 13 | Prefer Base UI over a hand-built or third-party widget: a menu, dialog, popover, select, switch, checkbox, tabs, toast or slider starts from Base UI (sonner moves behind a wrapper with its call shape). Native stays for text, date and time inputs, and for a <select> on phones where an app decided so (Q16) | One accessible behaviour per widget, one look per app | review |
| 14 | Every app has a Light / Dark / System choice; a first visit shows light; the choice is kept on the device under the app's own key, <app>.theme, never the bare theme (one localStorage serves every app on the domain); dark: keys off data-theme on <html> through @custom-variant, never prefers-color-scheme alone; the theme-color meta follows it (Q18) | The owner's call: a switch everywhere, light first. The attribute lets the choice override the system | check-base-ui for the key; the rest by review. The apps that bend it record a conventions.json exception |
| 15 | A phone navigation panel is a Drawer, closed by a swipe, a tap outside, the X or Esc, and it has a Drawer.Title (Q40) | A swipe is how a phone closes a side panel; the title names it for a screen reader | review |
| 16 | One of several. A filter that always has one chosen, and a setting kept only on the device (theme, language, a view mode), is a RadioGroup (Tabs with activateOnFocus when it switches panels). A picker that saves to the server on each choice is a ToggleGroup with the guard. A filter that can be empty, where a second press clears it, is a ToggleGroup without the guard (Q41, Q57) | Arrow keys may try out a filter or a device setting, which cost nothing; they must never write to the server. A radio can't be cleared | review |
| 17 | jsdom tests only for wrappers that hold logic; flows in Playwright. Tests select by role and name, with data-testid only where no role fits (Q60, Q62) | A test of a thin wrapper tests Base UI; a role query tests what a user and a screen reader get | review |
check-base-ui reports rules 1, 2, 3, 5, 6, 11 and 14 (the key only) as errors and 9 and 10
as warnings. The rest, and the parts of 5 and 6 the script can't see, are
review's.
What review covers
A reviewer works through these, skipping what the checker already reports:
- Rule 4. Class names on the parts, never a stylesheet selector such as
.dialog__titleor[data-highlighted] .label; noquerySelectorinto a Base UI part. - Rule 5. Inline
styleholds only computed geometry or data. - Rule 6. No literal radius, shadow or z value (
rounded-[6px],z-[999]) where a token exists; token names say a role. - Rules 7 and 8. Transitions under
motion-safe:; every popup portalled and on the z scale. Rule 7 is where the checker is blind and the repos were too: imbatranimOS had 63transitionandanimate-uses and none undermotion-safe:, imbatranim-apps 20 and none. Grep for them (transition|animate-|data-starting-style) and count the ones that aren't undermotion-safe:. - Rules 9 and 10 through aliases. A repo's own
DialogTriggerorSelectre-export hides its call sites from the checker. Look at each caller. - Rule 12. Each dialog: controlled, guarded, focus lands on the field, a title, a labelled X, and a form dialog that ignores outside presses.
- Rules 13 to 17. A hand-built widget, a missing theme switch, a phone menu that isn't a Drawer, an arrow key that saves, a test selected by class.
The references
Each page has a wrapper ready to copy, written fresh against the owner's
code, compiled with tsc --noEmit against 1.9.0, and a note on what to
adapt to the app's tokens. The class names use the small-tools family's
token names (surface, raised, ink, line, accent, danger);
substitute the app's own.
- tailwind.md: the one stylesheet in full, the
layer order, token naming, the attribute-to-variant table, the positioner
variables,
cn()withextendTailwindMerge,Buttonand the shared looks. Read it first: every other page imports from it. - theme.md: rule 14, the Light / Dark / System switch, the boot script and the store.
- dialog.md: rule 12 as a wrapper: the Escape
guard, initial focus, three sizes, full screen below
md, a form dialog. - confirm.md:
ConfirmActionwith a pending state,useConfirm(), and when an inline Yes / No is right. - menu.md: the menu and its items, opening a dialog
from an item,
modal, and an item that moves focus. - popover.md: the popover, and an info button that works on touch.
- tooltip.md:
render, the provider, and what replaces a tooltip on touch. - select.md:
items, the label, and native selects on phones. - combobox.md: a filtered long list that stores
ids, with
Combobox.createItems. - switch-checkbox.md: both, with labels, the indeterminate state, and the value the server takes.
- tabs-toggle-group.md: rule 16:
RadioGroup,Tabsand the guardedToggleGroup, and which is which. - toast.md: one manager,
notify(), the host, and leavingsonner. - field.md:
Field, a text field, validation, and a form that shows the server's errors. - drawer.md: rule 15, the phone navigation drawer.
- toolbar.md: a toolbar with toggles, a menu and a
tooltip, and the order of
render. - migrating-from-plain-css.md: the method every app's Tailwind brief follows.
- conversion-traps.md: where Tailwind 4
differs from the CSS being converted (what Preflight removes, state order,
translate,grid-cols,color-mix, class hooks in code), and what the ten moves measured. - Platform features beyond Base UI (browser support, time zones, sanitizing, view transitions) are in the web-platform skill.
The package ships its own docs, one Markdown file per component with the
full API tables, at node_modules/@base-ui/react/docs/react/. Check a prop
or an attribute there, never from memory.
In a repo
A repo meets this skill through two briefs of its own, in the owner's order (Q20):
- Before its Tailwind brief, a repo not yet on Tailwind writes the
wrappers with plain classes and state through
[data-*]selectors in its one stylesheet:cn()and the tokens don't exist yet. Its Tailwind brief then converts them. - Its Tailwind brief follows migrating-from-plain-css.md step by step. A repo already on Tailwind (ro-housing) skips to the token and stylesheet checks.
- Its Base UI brief moves every Base UI import under
ui/(rule 3), replaces hand-built widgets and native dialogs (rules 11, 13), audits each dialog against rule 12, adds the theme switch and the phone drawer (14, 15), sorts its choice controls (16), and drops--warn-onlyfromcheck:conventionswhencheck-base-uipasses.
What the 2026-11 builds settled (every repo's Base UI and Tailwind briefs):
- The skill beats a repo brief's wording where they differ, and the
outcome note lists it. It happened for the theme picker (a
RadioGroupin six repos where the brief saidToggleGroup: ro-housing, sports-app, Shelfmark, public-resource-map, SocialEvents, 3D-sandbox), for dark tokens (light-dark()pairs withcolor-schemefromdata-theme, where the brief said a block under[data-theme="dark"]) and for the error toast (it stays until dismissed,timeout: 0, where a brief said about 5 s). - An error toast stays at every call site, not only in the wrapper.
Almanac added
type: "error"and left its six callers on the old default; Postern's 17 failure toasts neededduration: nullone by one. Grep every failure toast after changing the default. - A
Buttonwrapper for a repeated look is in scope for a Tailwind brief (lantern), besidelooks.tsfor the repeated class strings. - Before and after screenshots decide parity. Two throwaway clones,
pixelmatch, a pinned clock, seeded data. It found Satchel's lost bubble looks, Lantern's changed grid widths and Almanac's utilities that generated no CSS. migrating-from-plain-css.md has the recipe.
The repo's .claude/rules/web.md carries a short copy of the rules that
apply to it, scoped to its web roots, so they load even where this skill
doesn't. The house-style skill describes that file.
Upgrading Base UI
A new Base UI version is its own brief: read the release notes in
node_modules/@base-ui/react/docs/react/overview/releases/, bump every
repo together, and raise check-base-ui's default --version in a
house-style minor version. 1.4 to 1.9 had two breaking renames:
OTPFieldPreview became OTPField, and sanitizeValue() became
normalizeValue().
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

