# Box

> Cherry Box component - extends Container with additional visual styling for tiles and card layouts.

Source: https://cherry.al/code/box

> For the complete documentation index, see [llms.txt](https://cherry.al/llms.txt).

# Box

<iframe className="light-only" src="https://demo.cherry.al/preview/box?theme=light" title="Box" loading="lazy" style={{ width: "100%", height: "340px", border: "1px solid var(--color-grayLight)", borderRadius: "12px" }} />
<iframe className="dark-only" src="https://demo.cherry.al/preview/box?theme=dark" title="Box" loading="lazy" style={{ width: "100%", height: "340px", border: "1px solid var(--color-grayLight)", borderRadius: "12px" }} />

The Box component is a styled variant of the Container component. It accepts exactly the same props and adds no new ones; the only difference is visual styling: a `theme.colors.light` background, rounded corners from `theme.spacing.radius.lg` (12px by default), and a 1px `theme.colors.grayLight` border. Use it to create visually appealing boxes, tiles, or containers within your applications.

```jsx
import React from "react";
import { Box } from "cherry-styled-components";

export default function Page() {
  return <Box>Boxing things around!</Box>;
}
```

## Properties

<Field value="children" type="React.ReactNode">
  Box content.
</Field>

<Field value="className" type="string">
  Additional CSS class for the box.
</Field>

<Field value="$fluid" type="boolean">
  Makes the box full-width without max-width constraints.
</Field>

<Field value="$textAlign" type='"right" | "left" | "center"'>
  Text alignment within the box.
</Field>

<Field value="$padding" type='number | "none"'>
  Base padding value.
</Field>

<Field value="$xsPadding" type='number | "none"'>
  Padding at `xs` breakpoint.
</Field>

<Field value="$smPadding" type='number | "none"'>
  Padding at `sm` breakpoint.
</Field>

<Field value="$mdPadding" type='number | "none"'>
  Padding at `md` breakpoint.
</Field>

<Field value="$lgPadding" type='number | "none"'>
  Padding at `lg` breakpoint.
</Field>

<Field value="$xlPadding" type='number | "none"'>
  Padding at `xl` breakpoint.
</Field>

<Field value="$xxlPadding" type='number | "none"'>
  Padding at `xxl` breakpoint.
</Field>

<Field value="$xxxlPadding" type='number | "none"'>
  Padding at `xxxl` breakpoint.
</Field>

<Button href="https://github.com/cherry-design-system/styled-components/blob/main/src/lib/box.tsx" icon="code" iconPosition="left">
  View Source
</Button>
