Skip to main content
Version: 1.0.3

Box

Box is a flexible layout component for wrapping content with customizable width, height, padding, background, border radius, and shadow. Use it for cards, containers, wrappers, and more.

Box Component Demo

width: normal, height: auto, padding: normal, background: default, rounded: md, shadow: subtle

Installation

ignix add component box

Usage

Import the component:

import { Box } from '@ignix-ui/box';

Basic Usage

function BasicBox() {
return (
<Box
width="full"
padding="normal"
background="default"
rounded="md"
shadow="subtle"
>
<h2>Box Component</h2>
<p>This is a general-purpose content box.</p>
</Box>
);
}

Props

PropTypeDefaultDescription
widthstring"normal"Width: "auto", "small", "normal", "large", "full", or custom
heightstring"auto"Height: "auto", "small", "normal", "large", "screen", or custom
paddingstring"normal"Padding: "none", "sm", "normal", "lg"
backgroundstring"white"Background color (from theme or custom)
roundedstring"md"Border radius: "none", "sm", "md", "lg", "full"
shadowstring"subtle"Box shadow: "none", "subtle", "medium", "strong"
classNamestringnullAdditional CSS classes
childrennodenullContent inside the box