Container
A padded and centred content column.
Welcome to arene
Build consistent interfaces with components you own.Installation
Needs the arene setup first.
Install the packages it imports:
Set up the token layer. See Installation.
Copy theme/widths.ts from the installation page.
Copy the component into your project.
Change the @/ imports if your project uses different aliases.
Usage
size caps the full-width column in rem using the shared width scale:
narrow (12rem), xs (20rem), sm (24rem), md (28rem), lg (32rem) and xl3 (48rem). Inline padding is space.s6.
Override padding through xstyle. containerStyles exports base and
widths.
Size
Choose a width from the shared scale. Padding stays inside the width cap.
Composition
Pass render to choose a semantic element. Put its props on that element.
API reference
See Base UI's useRender reference for composition props. Native element props are forwarded.
| Prop | Type | Default |
|---|---|---|
size | keyof typeof widths | "xl3" |
render | useRender.RenderProp | Native element |
xstyle | StyleXStyles | None |
className | string | None |
style | CSSProperties | None |
Data attributes
| Attribute | On | Effect |
|---|---|---|
data-slot="container" | root | Identifies the component |
data-size | root | Mirrors size |