Box
Standard surface container for cards, panels, and linked boxes.
Demo
Default box
Box provides the standard surface, border, radius, and clipping.
Usage
import { Box } from 'regen-ui'
export function ActionCard() {
return (
<>
<Box className="text-left" onClick={() => console.log('clicked')}>
Open
</Box>
<Box className="text-left" disabled onClick={() => console.log('clicked')}>
Disabled
</Box>
</>
)
}API Reference
Box.Props
| Name | Type | Default | Description |
|---|---|---|---|
disabled | boolean | None | Disable interaction when Box renders as an interactive element. |
padding | number | 16 | Padding in px. |
render | ReactElement | None | Element to render as instead of `<div>` or `<button>`. |
Inherits HTMLAttributes<HTMLElement>. | |||
disabledType
booleanDefaultNone
Disable interaction when Box renders as an interactive element.paddingType
numberDefault
Padding in px.16renderType
ReactElementDefaultNone
Element to render as instead of `<div>` or `<button>`.Inherits
HTMLAttributes<HTMLElement>.