Marigold
v18.0.0-beta.3
Marigold
v18.0.0-beta.3

Application

MarigoldProvider
RouterProvider

Layout

AppShellbeta
Aside
Aspect
Center
Columns
Container
Grid
Inline
Inset
Pagebeta
Panelbeta
Scrollable
Split
Stack
Tiles

Actions

Buttonupdated
ButtonGroupbeta
Link
LinkButton
ToggleButtonbeta

Form

Autocomplete
Calendar
Checkbox
ComboBox
DateField
DatePicker
DateRangePickerbeta
FileField
Form
NumberField
Radio
RangeCalendaralpha
SearchField
SegmentedControlbeta
Select
SelectListupdated
Slider
Switchupdated
TagFieldbeta
TextArea
TextField
TimeField

Collection

Cardupdated
Table
Tag
ActionBaralpha

Navigation

Accordion
Breadcrumbs
Pagination
Sidebarbeta
Tabs
TopNavigationbeta

Overlay

ActionMenualpha
ContextualHelp
Dialog
Drawer
Menuupdated
Toastbeta
Tooltip

Content

Badge
Descriptionalpha
Divider
EmptyStatebeta
Headline
Keyboardbeta
List
Loader
SectionMessage
SVG
Text
TextValuealpha
Titlealpha

Formatters

DateFormat
NumericFormat

Hooks and Utils

cn
cva
extendTheme
parseFormData
useAsyncListData
useLandmark
useListData
useResponsiveValueupdated
useTheme
VisuallyHidden
Components

Inset

Adds space around its children.

The <Inset> component is a layout component that acts as a container which adds spacing around its children.

Usage

The component should be used whenever you need to add some whitespace around elements. For example, around a <Form> or inside a <Card>.

Equal spacing

In order to add equal spacing to all sides use the p property with an inset recipe token (square-*, squish-*, stretch-*) or a numeric scale value.

import { Inset } from '@marigold/components';import { Rectangle } from '@/ui/Rectangle';export default () => (  <div className="bg-muted">    <Inset p="square-regular">      <Rectangle height="80px" />    </Inset>  </div>);

Horizontal and vertical spacing

A common use case is to give children of a content component some space, you can do this for example with wrapping an <Inset> around the card content like shown below.

To set only horizontal or vertical spacing, or to define different values for each, use the px property for horizontal spacing and the py property for vertical spacing. These props accept padding spacing tokens (padding-tight, padding-snug, padding-regular, padding-relaxed, padding-loose), as well as numeric scale values.

Main Street Park Amphitheater

Laughville | Outdoor Venue
An open-air amphitheater in the town park with lawn seating and a covered stage, ideal for community performances and summer comedy nights.
import { venueTypes, venues } from '@/lib/data/venues';import { Headline, Inline, Inset, Text } from '@marigold/components';export default () => {  return (    <div className="bg-muted rounded-md">      <Inset px="padding-regular" py="padding-snug">        <Headline level={3}>{venues[0].name}</Headline>        <Inline>          <Text fontStyle="italic">            {venues[0].city} | {venueTypes[venues[0].type]}          </Text>        </Inline>        <Text>{venues[0].description}</Text>      </Inset>    </div>  );};

Props

Did you know? You can explore, test, and customize props live in Marigold's storybook. Watch the effects they have in real-time!
View Inset stories

Inset

Prop

Type

Accessibility props (6)

Prop

Type

Related

Building layouts

Learn how to build layouts.
Last update: 3 months ago

Inline

Display children horizontally in a row.

Page

The main content area of a screen, with its title, description, primary action, and the sections beneath them.

On this page

UsageEqual spacingHorizontal and vertical spacingPropsInsetRelated