Skip to main content

Box

The Box component is a versatile container that provides a neumorphic design element with customizable styles and sizes.

Basic Usage

import { Box, ThemeProvider } from "@carton-org/react-neumorphism";

const MyComponent = () => {
return <Box size="md">Content goes here</Box>;
};

Live Example

This is a basic box

Props

NameTypeDescriptionRequiredDefault Value
insetbooleanWhether to use inset style for the boxNofalse
size"xs" | "sm" | "md" | "lg" | "xl"Size of the boxNo'sm'
childrenReact.ReactNodeContent to be displayed inside the boxNo-
boxStyleReact.CSSPropertiesCustom CSS styles for the boxNo-

Examples

Different Sizes

Small Size

Small Box

Medium Size

Medium Box

Large Size

Large Box

Inset Style

Default Style

Default Box

Inset Style

Inset Box