Marigold
Getting StartedFoundationsComponentsPatternsRecipesReleases
Discover new Tutorials!

Components

Overview

Application

MarigoldProvider
updated
RouterProvider
updated

Layout

Aside
Aspect
Breakout
Center
Columns
Container
Grid
Inline
Inset
Scrollable
Split
Stack
updated
Tiles

Form

Autocomplete
Button
updated
Calendar
Checkbox
ComboBox
DateField
DatePicker
Form
Multiselect
new
NumberField
Radio
SearchField
Select
Slider
Switch
TextArea
TextField
TimeField
new

Collection

SelectList
updated
Table
updated
Tag

Navigation

Accordion
Breadcrumbs
beta
Pagination
Tabs

Overlay

ContextualHelp
new
Dialog
Menu
Toast
beta
Tooltip
updated

Content

Badge
Body
Card
Divider
updated
Footer
Header
Headline
updated
Icon
updated
Image
Link
updated
List
updated
SectionMessage
SVG
updated
Text
updated
VisuallyHidden
updated
XLoader

Formatters

DateFormat
NumericFormat

Hooks and Utils

cn
cva
extendTheme
useAsyncListData
useListData
useResponsiveValue
useTheme

Inline

Display children horizontally in a row.

The <Inline> component is a responsive layout component based on CSS Flexbox. It aligns its content horizontally in a row and automatically wraps to a new line when there isn't enough space on the screen.

Use the inline component in combination with other layout components to easily create customized layouts.

Usage

If you have more than two elements you can use the <Inline> component to arrange elements horizontally according to the space required. For adding the space between the elements you need to use the space property and set it to a supported space value.

Preview
Code

Together with a <Split> you can use the <Inline> to create as much space as given between two elements while staying in the inline layout.

Different alignment

The child elements can be positioned differently on their x and y axis. Items of various height can be vertically aligned using the alignY prop. In the following example you can see it.

Preview
Code
Top

Center

Bottom

For horizontally alignment you can use the alignX prop.

Preview
Code
Left

Center

Right

Form Input Alignment

When aligning form inputs with buttons or elements, use alignY="center" to mantain vertically alignment with the input field rectangle. This automatically adjusts when descriptions or error messages appear.

Preview
Code

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 Inline stories
alignX?
"left" | "center" | "right";
Horizontal alignment of the items inside the element.
alignY?
"center" | "top" | "bottom";
Vertical alignment of the items inside the element.
aria-describedby?
string;
Identifies the element (or elements) that describes the object.
aria-details?
string;
Identifies the element (or elements) that provide a detailed, extended description for the object.
aria-label?
string;
Defines a string value that labels the current element.
aria-labelledby?
string;
Identifies the element (or elements) that labels the current element.
aria-live?
"off" | "polite" | "assertive";
Indicates the level of importance for updates in the live region.
  • 'off': Updates are not announced unless focused.
  • 'polite': Updates are announced when the user is idle.
  • 'assertive': Updates are announced immediately, interrupting other announcements.
children?
ReactNode;
The children of the component.
id?
string;
The element's unique identifier. See MDN.
role?
"region" | (string & {});
Identifies the element a significant section of content for easier navigation. When region is used as a role, an aria-label or aria-labelledby must be provided. See MDN.
space?
GapSpaceProp;
The space between the children. You can see allowed tokens here.
Defaults to:
0

Alternative components

  • Columns: Because of the flex layout the <Inline> will wrap its content when there is no more space given to display it in smaller screen sizes, if you still want to have the items in one row, please use our columns component with the fixed column to get this layout.

  • Stack: If you need to display content vertically you should use our stack component.

Related

Building layouts
Learn how to build layouts.
Split
Adds space between two elments in a flex layout.
Last update: a month ago
Build with 🥵, 🧡 and
v14.1.1