Import @pixxl-tools/components/styles.css once in the host root or framework layout.
Do not import source CSS files or rely on the Pixxl documentation site’s cascade.
When using canvas chrome, import @pixxl-tools/canvas/styles.css separately.
React primitives and browser hooks are client-side modules.
Import metadata and token objects from /metadata and /tokens in server components or build scripts.
Keep useMediaQuery, useClipboard, usePersistentTheme, and interactive primitives below a client boundary.
Pass the changed value back after onValueChange or onOpenChange; callbacks request state changes but do not mutate host state.
Use defaultValue/defaultOpen instead when the host does not need ownership.
Do not pass value without its change handler unless the component should be read-only.
Do not switch controlled ownership after mount.
Use native button, link, input, select, and dialog semantics before adding roles to generic elements.
Provide a visible label or aria-label for icon-only controls.
Keep triggers mounted while an overlay is open so focus can return reliably.
Verify nested layers do not handle the same Escape event twice.
Check grid/flex children for min-width containment before adding fixed widths.
Use Stack, Inline, Wrap, ResponsiveGrid, and documented responsive composites before custom media queries.
Test real long labels, code, tables, images, navigation, and translated copy at a narrow mobile width.
Keep breakpoint-specific product decisions in host CSS when static component props cannot express them.
Use a stable initial theme from the host’s server-readable preference when SSR must match first paint.
Apply PixxlProvider theme/direction/locale consistently around the rendered subtree.
Use usePersistentTheme only in the browser and keep its storage key stable.
Export a new primitive from the intended public entrypoint and add matching metadata, docs, props, examples, and accessibility notes.
Do not expose components through internal source paths to bypass the public contract.
Keep component, metadata, icon, token, and CSS entrypoints React/server-safe according to their documented boundary.