Components · Layout
Box
StableSince v0.0.1
Generic container primitive with style token props.
import { Box } from '@nexub/react';Examples
Default
Nested
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| padding | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | — | Padding applied to all sides using design tokens. |
| background | string | — | Background color CSS value or token. |
| radius | string | — | Border radius CSS value or token. |
| asChild | boolean | — | Merges props onto the immediate child element (Radix Slot). |
On iOS & Android
Web only
Box has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.