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
Name | Type | Description | Required | Default Value |
---|---|---|---|---|
inset | boolean | Whether to use inset style for the box | No | false |
size | "xs" | "sm" | "md" | "lg" | "xl" | Size of the box | No | 'sm' |
children | React.ReactNode | Content to be displayed inside the box | No | - |
boxStyle | React.CSSProperties | Custom CSS styles for the box | No | - |
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