BoxItem Component Usage
ℹ️
This component is used to display a box item and the BoxItem
children
prop
is used to display the content of the box item.
Example Usage
ℹ️
Here is an example
of how to use the BoxItem
component:
import { BoxItem } from "@/ui";
export const MyComponent = () => (
<BoxItem>
<div>Box Item Content</div>
</BoxItem>
);
Props
ℹ️
Here is a list of all the props that can be passed to the BoxItem
component:
Name | Type | Default | Description |
---|---|---|---|
variant | string | base | The variant of the box item. Valid values are primary , secondary , accent , neutral , success , warning , danger , info , base , custom |
className | string | null | The class name of the box item |
rounded | string | none | The border radius of the box item. Valid values are none , sm , md , lg , xl , full |
border | string | 1 | The border width of the box item. Valid values are none , 1 , 2 |
borderColor | string | base | The border color of the box item. Valid values are primary , secondary , accent , neutral , success , warning , danger , info , base |
children | node | null | The content of the box item |
Variants
ℹ️
Here is a list of all the variants that can be passed to the variant
prop:
Name | Description |
---|---|
primary | The primary variant of the box item. |
secondary | The secondary variant of the box item. |
accent | The accent variant of the box item. |
neutral | The neutral variant of the box item. |
success | The success variant of the box item. |
warning | The warning variant of the box item. |
danger | The danger variant of the box item. |
info | The info variant of the box item. |
base | The base variant of the box item. |
custom | The custom variant of the box item. |
Rounded
ℹ️
Here is a list of all the values that can be passed to the rounded
prop:
Name | Description |
---|---|
none | The box item will not have rounded corners. |
sm | The box item will have small rounded corners. |
md | The box item will have medium rounded corners. |
lg | The box item will have large rounded corners. |
xl | The box item will have extra large rounded corners. |
full | The box item will have full rounded corners. |
Border
ℹ️
Here is a list of all the values that can be passed to the border
prop:
Name | Description |
---|---|
none | The box item will not have a border. |
1 | The box item will have a border with a width of 1px. |
2 | The box item will have a border with a width of 2px. |
Border Color
ℹ️
Here is a list of all the variants that can be passed to the borderColor
prop:
Name | Description |
---|---|
primary | The primary variant of the box item border. |
secondary | The secondary variant of the box item border. |
accent | The accent variant of the box item border. |
neutral | The neutral variant of the box item border. |
success | The success variant of the box item border. |
warning | The warning variant of the box item border. |
danger | The danger variant of the box item border. |
info | The info variant of the box item border. |
base | The base variant of the box item border. |
Customization Example
ℹ️
Here is an example of how to use the custom
variant:
import { BoxItem } from "@/ui";
export const MyComponent = () => (
<BoxItem
variant="custom"
className={"bg-gradient-to-b from-base-content/5 to-base-content/0"}
borderColor="primary"
rounded="md"
border="2"
>
<div>Box Item Content</div>
</BoxItem>
);