Box

Renders a box with optional padding and/or borders.

Read more Read less

A box has even padding and borders on each side. If you need padding and borders on only one or some sides then you don’t have a box.

<.box padding="2xs" border="sm">
  I'm the content!
</.box>

A box with a thick border and no padding.

Attribute Type Documentation Default Value
class :any

Additional classes to add to the parent.

[]
primary :boolean

Applies the primary border color, radius and padding

false
secondary :boolean

Applies the secondary border color, radius and padding

false
padding :string "none"
border :string

The border width

rest :global
tag :string "div"
Required inner_block * :slot
<.p>A box with a thick border and no padding.</.p>