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

Aside

Component to seperate content from the main content.

The <Aside> component is a responsive layout element designed for displaying side content next to main content. It ensures the side content has a fixed width while the main content dynamically adjusts to fill the remaining space.

Usage

Use the <Aside> for building layouts were you need to have one dynamic main content with a fixed side content. On smaller screens, e.g. on mobile devices, the content is automatically shifted one below the other when 50% of the width is reached. You can also adjust this by setting the wrap property to a percentage value.

Important

The <Aside> must have exactly two children, where none is a <Fragment>.

The example shows a simple <Aside> component. If you have a look on the code tab you get to know how to set the side, sideWidth and space prop.

Through space you can define the gap between the contents. With sideWidth you define the width for the side content and with side you define the side on which the side content will 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 Aside stories
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
[
  ReactElement<any, string | JSXElementConstructor<any>>,
  ReactElement<any, string | JSXElementConstructor<any>>,
];
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.
side?
"left" | "right";
The side of the aside content.
Defaults to:
"left"
sideWidth?
string;
The width of the side content.
space?
GapSpaceProp;
The space between the children. You can see allowed tokens here.
Defaults to:
0
wrap?
NonZeroPercentage;
At what percentage of the content's width should the other content wrap beneath it
Defaults to:
50%

Alternative components

  • Grid: When things get more complex the <Grid> component is the right choice. It allows you to create complex layouts with multiple columns and rows.

  • Columns: You can position your content in one row with the <Columns> component. The component is used to create structured and flexible layouts that organize content efficiently.

Related

Building layouts
Learn how to build layouts.
Last update: 6 months ago
Build with 🥵, 🧡 and
v14.1.1