Skip to main content
Version: 1.0.2

Box

Overview

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.

Preview

Box Component

This is a general-purpose content box.

Small Box

Installation

npx @mindfiredigital/ignix-ui add box

Usage

Import the component:

import { Box } from './components/ui';

Basic Usage

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

Variants

Box Component Demo

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

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"
classNamestringAdditional CSS classes
childrennodeContent inside the box

Use Cases

  • Cards
  • Content blocks
  • Wrappers
  • Styled containers