Homecomponentsstructural

Inset

A container to add surrounding space in all or specific directions.


Overview

Creates a container that can space things on all or specific directions. Here's an example of an image inside a Card with an inset.

Horizontal and Vertical Inset

Inset also provides two properties horizontal and vertical for spacing only in the respective directions.

Here's an example of horizontal inset.

Here's an example of vertical inset.

Individual Side Inset

Use top, right, bottom and left properties to set insets in respective directions.

API

children
Required
The content to inset.
ReactNode

as
The element used for the root node.
ElementType<any>

spacing
The amount of inset to apply.

vertical
The amount of inset to apply to the horizontally.

horizontal
The amount of inset to add vertically.

top
The amount of inset to apply to the top.

bottom
The amount of inset to apply to the bottom.

left
The amount of inset to apply to the left.

right
The amount of inset to apply to the right.