Box
Box is a layout component. It is a simple div element that can be used to create a layout.
import { Box } from "rizzui";
Default
The style of Box component.
import { Box } from "rizzui";
export default function App() {
return <Box className="border border-muted rounded-md size-24 shadow" />;
}
API Reference
Box Props
Here is the API documentation of the Box component. And the rest of the props are the same as the original html element. You can use props like id, title, onClick etc.
Props | Type | Description | Default |
---|---|---|---|
as | div or any html element | Render as | "div" |
children | React.ReactNode | Accepts everything React can render | __ |
className | string | Add custom classes to the component | __ |