Styling Cratis Components
Cratis Components 4 owns its markup and its styling contract. There is no
third-party theme engine, preset or provider underneath it: what a Cratis
application looks like is decided by three Cratis-owned stylesheet entries and
the --cratis-* custom properties they read. Getting the setup wrong shows up as
components rendering completely unstyled, which is the single most common
first-run problem — start by checking the CSS entry.
Verified product sources
| Package |
Verified from |
@cratis/components |
its package manifest (exports, no vendor UI dependency or peer), Source/tokens.css, Source/MIGRATION.md, Documentation/Styling/*, Documentation/Common/cratis-components-provider.md, Documentation/renderers/* |
Components declares no PrimeReact, PrimeIcons or PrimeUI dependency or peer.
React Aria supplies focus, overlay, collection and date behavior internally —
you never import it, never style its class names, and it never appears in an
application's manifest. Remove any leftover Prime packages that only Components
used to need (Source/MIGRATION.md lists them); keep one only if the application
itself still imports it directly, and then that island's provider, theme and
license are the application's.
Step 1 — What an app must do
Two things, or the components render unstyled:
Import the stylesheets, in this order, in index.css; the entry point
imports that file with import './index.css':
@import '@cratis/components/tokens';
@import '@cratis/components/styles';
@import '@cratis/components/theme'; /* optional baseline */
Direct CSS subpath imports from TypeScript need ambient declarations on
TypeScript 6, otherwise TS2882. To avoid the roughly 32 KiB gzip aggregate,
replace styles with styles/base and the needed <subpath>/styles entries
(for example Dialogs/styles, DataTables/styles). Area order does not matter.
tokens first — styles and theme both read it. styles also carries the
split-pane CSS the DataPage details pane needs; use the aggregate or the
corresponding area sheets even in a fully custom-styled app. styles contains no Tailwind Preflight, no
global reset and no copy of the token values.
Mount CratisComponentsProvider (from the package root,
@cratis/components) above every Cratis component. It carries locale and
the Components-owned messages, and mounts the toast region with toaster;
it carries no theme. toaster accepts boolean | ToasterProps: without
it or a standalone <Toaster />, no toast appears; mount one, never both.
Message groups are paginator, datePicker, dropdown, dialog, stepper,
notifications, dataTable, filter, columnFilter, toolbar. locales
is deprecated. value.icons replaces close, remove, expand,
sortAscending, sortDescending, previous, next, clear; a component
prop wins over the provider, then the built-in glyph (null draws none).
useCratisIcon() resolves that vocabulary. Provider props also include
overlayEnvironment, rendererSetup (non-secret booleans), experimental
libraryMode (strict / degrade) and rendererFallback (core / throw).
The Components 3 renderer keys — license, theme,
defaults, global pt, ptOptions, ripple, unstyled, z-index — are a
type error on purpose, so a migrated app cannot compile a provider whose
visual configuration silently does nothing.
import { CratisComponentsProvider } from '@cratis/components';
<CratisComponentsProvider value={{ locale: 'en-US' }} toaster>
<App />
</CratisComponentsProvider>
Step 2 — Pick one of three setups
| Setup |
Imports |
You own |
| Baseline theme |
tokens + styles + theme |
choosing cratis-dark / cratis-light / system preference; overriding only the brand values you mean to |
| Product theme |
tokens + styles + your CSS, imported after them |
mapping your complete palette onto --cratis-*; typography, spacing, motion, contrast; component treatment through parts |
| Fully owned |
tokens + styles + your CSS |
the same, plus every --cratis-* value — omit theme entirely |
A theme is CSS. No JavaScript preset, provider option or wrapper class is
required for the normal whole-application setup. The product's CSS is written
outside a cascade layer, so it wins over all three Components layers
(cratis-theme, cratis-components, cratis-utilities) without specificity
tricks for structural rules. Tokens and theme are unlayered: their overrides
still need the correct specificity. If the product uses layers, name the
cratis-* layers in its first layer-order statement, before any stylesheet
(see Tailwind below).
Baseline theme and dark mode
theme adds document foreground/background, system dark-mode values, the
explicit scheme classes, forced-colors tuning and .cratis-theme subtree
defaults. It stays visually familiar to Components 2/3 — Lara-adjacent blue
actions, neutral surfaces, 6px radii — implemented entirely with Cratis tokens.
document.documentElement.classList.toggle('cratis-dark', darkMode);
- Without a class, the baseline follows
prefers-color-scheme.
cratis-light keeps light values when the OS prefers dark; an explicit light
wins over an ambient root cratis-dark.
- An independently themed island puts
cratis-theme on the subtree and adds
cratis-dark or cratis-light there (on the same element, or on an ancestor).
- A plain
:root override after theme loses to dark selectors such as
:root.cratis-dark, .cratis-theme.cratis-dark, and the system-dark
:root:not(.cratis-light). Match the scheme selectors' specificity and place
overrides after the import, including subtree selectors when using islands.
Or omit theme and use the product-theme setup below.
- Requires Components 4.22.1: it maps Arc's
--color-error / --color-error-bg in both dark
schemes. A product theme omitting theme must define those variables itself;
do not carry forward the old dark-error contrast workaround.
Product theme
:root {
--cratis-primary-color: var(--brand-accent-700);
--cratis-primary-color-text: var(--brand-text-inverse);
--cratis-action-background: var(--brand-action);
--cratis-action-background-hover: var(--brand-action-hover);
--cratis-action-background-active: var(--brand-action-active);
--cratis-action-text: var(--brand-on-action);
--cratis-surface-ground: var(--brand-canvas);
--cratis-surface-card: var(--brand-surface);
--cratis-surface-overlay: var(--brand-surface);
--cratis-surface-border: var(--brand-border);
--cratis-control-background: var(--brand-control);
--cratis-control-border: var(--brand-control-border);
--cratis-text-color: var(--brand-text-primary);
--cratis-text-color-secondary: var(--brand-text-secondary);
--cratis-focus-ring: var(--brand-focus-ring);
}
[data-theme='dark'] {
--brand-canvas: #171717; /* switch schemes by redefining the *product* values under the product's own selector */
}
Nothing sits between the product tokens and the rendered component — no
renderer preset, no internal selector, no commercial theme package.
Step 3 — Colors: use the token seam
Never hard-code a hex or rgb() value for UI chrome — it breaks the moment the
theme changes. Read a --cratis-* custom property instead. The full vocabulary
(from tokens.css):
| Group |
Tokens |
| Accent |
--cratis-primary-color, --cratis-primary-color-text, --cratis-primary-300 … -600, --cratis-primary-600-text |
| Primary action |
--cratis-action-background / -hover / -active, --cratis-action-text |
| Status pairs |
--cratis-info-background / -text, --cratis-success-*, --cratis-warning-*, --cratis-danger-*; single indicators --cratis-green-500, --cratis-orange-500, --cratis-red-500 |
| Surfaces |
--cratis-surface-ground (page), -section, -card, -overlay (dialogs, popovers, toasts), -hover, -border, -0, -100 |
| Controls |
--cratis-control-background, --cratis-control-border, --cratis-control-height / -small / -large |
| Text & highlight |
--cratis-text-color, --cratis-text-color-secondary, --cratis-highlight-bg, --cratis-highlight-text-color |
| Effects |
--cratis-focus-ring, --cratis-maskbg, --cratis-border-radius, --cratis-disabled-opacity, --cratis-shadow-subtle / -overlay / -dialog / -toast |
| Layering |
--cratis-z-index-dialog (1100), -overlay (1200), -filter (1250), -tooltip (1300), -toast (1400) |
Only hard-code a color that is intentionally theme-independent — a brand accent
dot, a traffic-light indicator.
Step 4 — Writing styles
- Put static styles in a co-located
.css file, one per component. A
composition root's CSS carries layout and positioning for its children, not the
children's own styling.
- Use inline
style only for runtime-dynamic values such as computed pixel
positions. A style object full of static token names bypasses theming and
review — move it to a class.
- Name classes with a prefix matching the component.
- Import product CSS after the Components entries so it wins the cascade.
- When a customer supplies brand material, keep their CSS and tokens verbatim in product-owned files, map them onto the
--cratis-* tokens, and use the baseline theme for every decision their material does not cover.
Step 5 — Parts: reaching inside a component
Every meaningful element a component renders carries data-cratis-part, and
most components accept a pt prop typed by their own *Parts type. They
are documented separately because they are not always the same names: for most
components the typed pt key is the camelCase spelling of the kebab-case DOM
value (headerRow ↔ header-row), but the Toolbar family prefixes its DOM
values (ToolbarButtonParts.root ↔ data-cratis-part='button',
ToolbarFolderParts.root ↔ 'toolbar-folder', ToolbarFanOutParts.trigger ↔
'fanout-trigger'). Read the DOM value off the rendered element (or the parts
manifest in @cratis/components/types) before writing a selector. Both spellings
are stable across internal foundation changes; React Aria class names and
undocumented DOM structure are not.
One instance: pt — plain HTML attributes per part.
<Dropdown aria-label='Role' options={roles}
pt={{ trigger: { className: 'product-select-trigger' }, popover: { className: 'product-select-popover' }, option: { className: 'product-select-option' } }} />
Product-wide: a CSS rule on the part and its state attributes.
[data-cratis-part='header-cell'] { text-transform: uppercase; }
[data-cratis-part='row'][data-selected='true'] { background: var(--product-selected-row); }
.product-dialog[data-cratis-part='root'] { border-radius: 1rem; }
The typed part families: ButtonParts/IconButtonParts (root, icon,
label, spinner); DialogParts (backdrop, positioner, root, header,
title, close, content, footer, confirm, cancel); DropdownParts
(root, trigger, value, clear, indicator, popover, listbox, option,
filter, multiple); DataTableParts (root, search, searchInput,
tableContainer, table, head, headerRow, headerCell, body, row,
cell, emptyRow, emptyCell, loadingRow, loadingCell, failureRow,
failureCell); TablePaginatorParts (root, range, info,
first, previous, next, last); StepperParts (root, list, step,
header, number, title, separator, panels, panel);
ToasterPassThrough (region, toast, icon, content, title,
description, action, close); the Toolbar*Parts family; and per-field
parts for every CommandForm field. The Components Styling/pass-through
reference is the exhaustive table.
Named parts where a component wraps two surfaces — the usual cause of a
pt that "does nothing" is applying it to the wrong one:
DataPage: tablePt: DataTableParts, paginatorPt: TablePaginatorParts, menubarPt: ButtonParts.
StepperCommandDialog: pt is the inner stepper, dialogPt the outer dialog.
Column: filterPt: ColumnFilterMenuParts for the filter popup.
State attributes are component-specific: data-active, data-selected,
data-invalid, data-disabled, data-readonly, data-loading, data-position,
data-orientation, data-size, data-severity. Do not assume one exists on
every component — read the component's parts reference.
ptOptions and unstyled are accepted for Components 3 source compatibility and
do nothing: part attributes always merge, and styling is always CSS-owned.
There is no global provider pt.
Renderer adapters — when a vendor look is wanted
The default renderer is built in; omit library on the provider. Reach for an adapter only when the product wants a vendor look on nine primitive controls; mapping tokens is almost always the smaller change. The adapters cover nine primitive slots; the progress bar slot is common.progress, not common.progressBar. Read references/renderer-adapters.md when choosing or installing an adapter.
Where Tailwind fits
Tailwind is one supported way to write the CSS above, not the Cratis default.
It is a fine tool for authoring the token mapping and part rules; it is not a
substitute for them. Components' own internal utilities are prefixed (cratis:*)
and are not public styling hooks. styles ships no Preflight and no reset of its
own. A host with layers must put this order in its first @layer statement,
parsed before any stylesheet (for example an inline <style> in the host):
@layer properties, theme, base, cratis-theme, cratis-components, cratis-utilities, components, utilities;
Components layers belong above the product reset and below product utilities.
Declaring them after the imports cannot reorder layers already established;
otherwise component rules beat product utilities and pt classes lose.
Verify
- No PrimeReact / PrimeIcons / PrimeUI package remains in the manifest unless the
application itself imports it directly — and then it has its own provider.
CratisComponentsProvider (root import) wraps the tree with locale/messages;
exactly one toaster is mounted when notifications are used.
@cratis/components/tokens and @cratis/components/styles are imported once
at the entry point, tokens first; theme is imported or deliberately omitted;
product CSS comes after.
- No hex or
rgb() value is hard-coded for UI chrome; colors read --cratis-*.
- No CSS targets a React Aria class name or undocumented DOM; parts are reached
through
pt or [data-cratis-part=…].
- Inline
style carries only runtime-dynamic values.
- Named parts land on the intended surface (
tablePt vs menubarPt; pt vs
dialogPt).
- Dark mode is toggled with
cratis-dark / cratis-light on the root element
(or a cratis-theme subtree), not through a provider option.
1---2name: cratis-components-styling-23description: Use when setting up Cratis Components styles, fixing unstyled components or changing themes, tokens and component parts. Not for component binding APIs or page composition.4license: MIT5metadata:6 source: https://skillmd.com/skills/cratis/cratis-components-styling-27---89# Styling Cratis Components1011Cratis Components 4 owns its markup and its styling contract. There is no12third-party theme engine, preset or provider underneath it: what a Cratis13application looks like is decided by three Cratis-owned stylesheet entries and14the `--cratis-*` custom properties they read. Getting the setup wrong shows up as15components rendering completely unstyled, which is the single most common16first-run problem — start by checking the CSS entry.1718## Verified product sources1920| Package | Verified from |21| --- | --- |22| `@cratis/components` | its package manifest (`exports`, no vendor UI dependency or peer), `Source/tokens.css`, `Source/MIGRATION.md`, `Documentation/Styling/*`, `Documentation/Common/cratis-components-provider.md`, `Documentation/renderers/*` |2324Components declares **no** PrimeReact, PrimeIcons or PrimeUI dependency or peer.25React Aria supplies focus, overlay, collection and date behavior *internally* —26you never import it, never style its class names, and it never appears in an27application's manifest. Remove any leftover Prime packages that only Components28used to need (`Source/MIGRATION.md` lists them); keep one only if the application29itself still imports it directly, and then that island's provider, theme and30license are the application's.3132## Step 1 — What an app must do3334Two things, or the components render unstyled:35361. **Import the stylesheets, in this order**, in `index.css`; the entry point37 imports that file with `import './index.css'`:3839 ```css40 @import '@cratis/components/tokens';41 @import '@cratis/components/styles';42 @import '@cratis/components/theme'; /* optional baseline */43 ```4445 Direct CSS subpath imports from TypeScript need ambient declarations on46 TypeScript 6, otherwise TS2882. To avoid the roughly 32 KiB gzip aggregate,47 replace `styles` with `styles/base` and the needed `<subpath>/styles` entries48 (for example `Dialogs/styles`, `DataTables/styles`). Area order does not matter.4950 `tokens` first — `styles` and `theme` both read it. `styles` also carries the51 split-pane CSS the `DataPage` details pane needs; use the aggregate or the52 corresponding area sheets even in a fully custom-styled app. `styles` contains **no** Tailwind Preflight, no53 global reset and no copy of the token values.54552. **Mount `CratisComponentsProvider`** (from the package root,56 `@cratis/components`) above every Cratis component. It carries `locale` and57 the Components-owned `messages`, and mounts the toast region with `toaster`;58 it carries **no** theme. `toaster` accepts `boolean | ToasterProps`: without59 it or a standalone `<Toaster />`, no toast appears; mount one, never both.60 Message groups are `paginator`, `datePicker`, `dropdown`, `dialog`, `stepper`,61 `notifications`, `dataTable`, `filter`, `columnFilter`, `toolbar`. `locales`62 is deprecated. `value.icons` replaces `close`, `remove`, `expand`,63 `sortAscending`, `sortDescending`, `previous`, `next`, `clear`; a component64 prop wins over the provider, then the built-in glyph (`null` draws none).65 `useCratisIcon()` resolves that vocabulary. Provider props also include66 `overlayEnvironment`, `rendererSetup` (non-secret booleans), experimental67 `libraryMode` (`strict` / `degrade`) and `rendererFallback` (`core` / `throw`).68 The Components 3 renderer keys — `license`, `theme`,69 `defaults`, global `pt`, `ptOptions`, `ripple`, `unstyled`, z-index — are a70 type error on purpose, so a migrated app cannot compile a provider whose71 visual configuration silently does nothing.7273 ```tsx74 import { CratisComponentsProvider } from '@cratis/components';7576 <CratisComponentsProvider value={{ locale: 'en-US' }} toaster>77 <App />78 </CratisComponentsProvider>79 ```8081## Step 2 — Pick one of three setups8283| Setup | Imports | You own |84| --- | --- | --- |85| **Baseline theme** | `tokens` + `styles` + `theme` | choosing `cratis-dark` / `cratis-light` / system preference; overriding only the brand values you mean to |86| **Product theme** | `tokens` + `styles` + *your* CSS, imported after them | mapping your complete palette onto `--cratis-*`; typography, spacing, motion, contrast; component treatment through parts |87| **Fully owned** | `tokens` + `styles` + your CSS | the same, plus every `--cratis-*` value — omit `theme` entirely |8889A theme is **CSS**. No JavaScript preset, provider option or wrapper class is90required for the normal whole-application setup. The product's CSS is written91*outside* a cascade layer, so it wins over all three Components layers92(`cratis-theme`, `cratis-components`, `cratis-utilities`) without specificity93tricks for structural rules. Tokens and theme are unlayered: their overrides94still need the correct specificity. If the product uses layers, name the95`cratis-*` layers in its **first** layer-order statement, before any stylesheet96(see Tailwind below).9798### Baseline theme and dark mode99100`theme` adds document foreground/background, system dark-mode values, the101explicit scheme classes, forced-colors tuning and `.cratis-theme` subtree102defaults. It stays visually familiar to Components 2/3 — Lara-adjacent blue103actions, neutral surfaces, 6px radii — implemented entirely with Cratis tokens.104105```ts106document.documentElement.classList.toggle('cratis-dark', darkMode);107```108109- Without a class, the baseline follows `prefers-color-scheme`.110- `cratis-light` keeps light values when the OS prefers dark; an explicit light111 wins over an ambient root `cratis-dark`.112- An independently themed island puts `cratis-theme` on the subtree and adds113 `cratis-dark` or `cratis-light` there (on the same element, or on an ancestor).114- A plain `:root` override after `theme` loses to dark selectors such as115 `:root.cratis-dark`, `.cratis-theme.cratis-dark`, and the system-dark116 `:root:not(.cratis-light)`. Match the scheme selectors' specificity and place117 overrides after the import, including subtree selectors when using islands.118 Or omit `theme` and use the product-theme setup below.119- Requires Components 4.22.1: it maps Arc's `--color-error` / `--color-error-bg` in both dark120 schemes. A product theme omitting `theme` must define those variables itself;121 do not carry forward the old dark-error contrast workaround.122123### Product theme124125```css126:root {127 --cratis-primary-color: var(--brand-accent-700);128 --cratis-primary-color-text: var(--brand-text-inverse);129 --cratis-action-background: var(--brand-action);130 --cratis-action-background-hover: var(--brand-action-hover);131 --cratis-action-background-active: var(--brand-action-active);132 --cratis-action-text: var(--brand-on-action);133 --cratis-surface-ground: var(--brand-canvas);134 --cratis-surface-card: var(--brand-surface);135 --cratis-surface-overlay: var(--brand-surface);136 --cratis-surface-border: var(--brand-border);137 --cratis-control-background: var(--brand-control);138 --cratis-control-border: var(--brand-control-border);139 --cratis-text-color: var(--brand-text-primary);140 --cratis-text-color-secondary: var(--brand-text-secondary);141 --cratis-focus-ring: var(--brand-focus-ring);142}143144[data-theme='dark'] {145 --brand-canvas: #171717; /* switch schemes by redefining the *product* values under the product's own selector */146}147```148149Nothing sits between the product tokens and the rendered component — no150renderer preset, no internal selector, no commercial theme package.151152## Step 3 — Colors: use the token seam153154Never hard-code a hex or `rgb()` value for UI chrome — it breaks the moment the155theme changes. Read a `--cratis-*` custom property instead. The full vocabulary156(from `tokens.css`):157158| Group | Tokens |159| --- | --- |160| Accent | `--cratis-primary-color`, `--cratis-primary-color-text`, `--cratis-primary-300` … `-600`, `--cratis-primary-600-text` |161| Primary action | `--cratis-action-background` / `-hover` / `-active`, `--cratis-action-text` |162| Status pairs | `--cratis-info-background` / `-text`, `--cratis-success-*`, `--cratis-warning-*`, `--cratis-danger-*`; single indicators `--cratis-green-500`, `--cratis-orange-500`, `--cratis-red-500` |163| Surfaces | `--cratis-surface-ground` (page), `-section`, `-card`, `-overlay` (dialogs, popovers, toasts), `-hover`, `-border`, `-0`, `-100` |164| Controls | `--cratis-control-background`, `--cratis-control-border`, `--cratis-control-height` / `-small` / `-large` |165| Text & highlight | `--cratis-text-color`, `--cratis-text-color-secondary`, `--cratis-highlight-bg`, `--cratis-highlight-text-color` |166| Effects | `--cratis-focus-ring`, `--cratis-maskbg`, `--cratis-border-radius`, `--cratis-disabled-opacity`, `--cratis-shadow-subtle` / `-overlay` / `-dialog` / `-toast` |167| Layering | `--cratis-z-index-dialog` (1100), `-overlay` (1200), `-filter` (1250), `-tooltip` (1300), `-toast` (1400) |168169Only hard-code a color that is intentionally theme-independent — a brand accent170dot, a traffic-light indicator.171172## Step 4 — Writing styles173174- Put static styles in a **co-located `.css` file**, one per component. A175 composition root's CSS carries layout and positioning for its children, not the176 children's own styling.177- Use inline `style` **only** for runtime-dynamic values such as computed pixel178 positions. A `style` object full of static token names bypasses theming and179 review — move it to a class.180- Name classes with a prefix matching the component.181- Import product CSS *after* the Components entries so it wins the cascade.182- When a customer supplies brand material, keep their CSS and tokens verbatim in product-owned files, map them onto the `--cratis-*` tokens, and use the baseline theme for every decision their material does not cover.183184## Step 5 — Parts: reaching inside a component185186Every meaningful element a component renders carries **`data-cratis-part`**, and187most components accept a **`pt`** prop typed by their own `*Parts` type. They188are documented separately because they are not always the same names: for most189components the typed `pt` key is the camelCase spelling of the kebab-case DOM190value (`headerRow` ↔ `header-row`), but the Toolbar family prefixes its DOM191values (`ToolbarButtonParts.root` ↔ `data-cratis-part='button'`,192`ToolbarFolderParts.root` ↔ `'toolbar-folder'`, `ToolbarFanOutParts.trigger` ↔193`'fanout-trigger'`). Read the DOM value off the rendered element (or the parts194manifest in `@cratis/components/types`) before writing a selector. Both spellings195are stable across internal foundation changes; React Aria class names and196undocumented DOM structure are not.197198- **One instance:** `pt` — plain HTML attributes per part.199200 ```tsx201 <Dropdown aria-label='Role' options={roles}202 pt={{ trigger: { className: 'product-select-trigger' }, popover: { className: 'product-select-popover' }, option: { className: 'product-select-option' } }} />203 ```204205- **Product-wide:** a CSS rule on the part and its state attributes.206207 ```css208 [data-cratis-part='header-cell'] { text-transform: uppercase; }209 [data-cratis-part='row'][data-selected='true'] { background: var(--product-selected-row); }210 .product-dialog[data-cratis-part='root'] { border-radius: 1rem; }211 ```212213The typed part families: `ButtonParts`/`IconButtonParts` (`root`, `icon`,214`label`, `spinner`); `DialogParts` (`backdrop`, `positioner`, `root`, `header`,215`title`, `close`, `content`, `footer`, `confirm`, `cancel`); `DropdownParts`216(`root`, `trigger`, `value`, `clear`, `indicator`, `popover`, `listbox`, `option`,217`filter`, `multiple`); `DataTableParts` (`root`, `search`, `searchInput`,218`tableContainer`, `table`, `head`, `headerRow`, `headerCell`, `body`, `row`,219`cell`, `emptyRow`, `emptyCell`, `loadingRow`, `loadingCell`, `failureRow`,220`failureCell`); `TablePaginatorParts` (`root`, `range`, `info`,221`first`, `previous`, `next`, `last`); `StepperParts` (`root`, `list`, `step`,222`header`, `number`, `title`, `separator`, `panels`, `panel`);223`ToasterPassThrough` (`region`, `toast`, `icon`, `content`, `title`,224`description`, `action`, `close`); the `Toolbar*Parts` family; and per-field225parts for every CommandForm field. The Components `Styling/pass-through`226reference is the exhaustive table.227228**Named parts where a component wraps two surfaces** — the usual cause of a229`pt` that "does nothing" is applying it to the wrong one:230231- `DataPage`: `tablePt: DataTableParts`, `paginatorPt: TablePaginatorParts`, `menubarPt: ButtonParts`.232- `StepperCommandDialog`: `pt` is the inner **stepper**, `dialogPt` the outer **dialog**.233- `Column`: `filterPt: ColumnFilterMenuParts` for the filter popup.234235**State attributes** are component-specific: `data-active`, `data-selected`,236`data-invalid`, `data-disabled`, `data-readonly`, `data-loading`, `data-position`,237`data-orientation`, `data-size`, `data-severity`. Do not assume one exists on238every component — read the component's parts reference.239240`ptOptions` and `unstyled` are accepted for Components 3 source compatibility and241do **nothing**: part attributes always merge, and styling is always CSS-owned.242There is no global provider `pt`.243244## Renderer adapters — when a vendor look is wanted245246The default renderer is built in; omit `library` on the provider. Reach for an adapter only when the product wants a vendor look on nine primitive controls; mapping tokens is almost always the smaller change. The adapters cover nine primitive slots; the progress bar slot is `common.progress`, not `common.progressBar`. Read [references/renderer-adapters.md](references/renderer-adapters.md) when choosing or installing an adapter.247248## Where Tailwind fits249250Tailwind is **one supported way to write the CSS above, not the Cratis default.**251It is a fine tool for authoring the token mapping and part rules; it is not a252substitute for them. Components' own internal utilities are prefixed (`cratis:*`)253and are not public styling hooks. `styles` ships no Preflight and no reset of its254own. A host with layers must put this order in its **first** `@layer` statement,255parsed before any stylesheet (for example an inline `<style>` in the host):256257```css258@layer properties, theme, base, cratis-theme, cratis-components, cratis-utilities, components, utilities;259```260261Components layers belong above the product reset and below product utilities.262Declaring them after the imports cannot reorder layers already established;263otherwise component rules beat product utilities and `pt` classes lose.264265## Verify266267- No PrimeReact / PrimeIcons / PrimeUI package remains in the manifest unless the268 application itself imports it directly — and then it has its own provider.269- `CratisComponentsProvider` (root import) wraps the tree with locale/messages;270 exactly one toaster is mounted when notifications are used.271- `@cratis/components/tokens` and `@cratis/components/styles` are imported once272 at the entry point, tokens first; `theme` is imported or deliberately omitted;273 product CSS comes after.274- No hex or `rgb()` value is hard-coded for UI chrome; colors read `--cratis-*`.275- No CSS targets a React Aria class name or undocumented DOM; parts are reached276 through `pt` or `[data-cratis-part=…]`.277- Inline `style` carries only runtime-dynamic values.278- Named parts land on the intended surface (`tablePt` vs `menubarPt`; `pt` vs279 `dialogPt`).280- Dark mode is toggled with `cratis-dark` / `cratis-light` on the root element281 (or a `cratis-theme` subtree), not through a provider option.