API and Development
Contents from @prepared911/ui/contents.
| Prop | Type | Meaning |
|---|---|---|
children | ReactNode | Content laid out by the nearest box-generating ancestor. |
ref | Ref<HTMLDivElement> | The rendered element. It generates no box, so measure or observe its children. |
data-* | string | Forwarded to the element, such as data-test-id or data-tracking-label. A name reserved for design-system state is dropped. |
className, style, regionClass, as, every Box layout prop, role, every ARIA attribute, id, tabIndex, hidden, inert and every event handler are declared never in ContentsForbiddenProps. TypeScript skips excess-property checks for undeclared hyphenated attributes and for spread objects, so declaring them is what makes aria-label or {...props} a type error. At runtime only children, ref and data-* reach the element, even when other props are cast past the types.
The element is always a div whose stylesheet declares display: contents and nothing else.