Marigold
Getting StartedFoundationsComponentsPatternsReleases
Discover new Tutorials!

Components

Overview

Application

MarigoldProvider
RouterProvider

Layout

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

Actions

Button
Link
LinkButton
beta

Form

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

Collection

SelectList
Table
Tag

Navigation

Accordion
Breadcrumbs
Pagination
Tabs

Overlay

ContextualHelp
Dialog
Drawer
beta
Menu
Toast
beta
Tooltip

Content

Badge
Card
Divider
Headline
Icon
List
SectionMessage
SVG
Text
VisuallyHidden
XLoader

Formatters

DateFormat
NumericFormat

Hooks and Utils

cn
cva
extendTheme
parseFormData
useAsyncListData
useListData
useResponsiveValue
useTheme

Scrollable

Lets the content scroll.

<Scrollable> is a component container for creating scrollable areas in the UI. Scrollbars can be both vertical and horizontal.

Usage

This component is commonly used in applications to manage large amounts of information or data, providing a convenient way for users to explore content without overwhelming the available screen space. The children of the <Scrollable> will scroll inside the container.

By default, the width is set to 100%, you can change the width to get a horizontal scrollbar. Same you can achieve with the height property. By default this takes the available height.

The <Scrollable> component can be used with every other component where content is overflowing the container, e.g. <Card>, <Table>, etc.

Vertical Scrolling

To use the vertical scrollbar you need to set the height prop and the content has to overflow the container.

Preview
Code

Horizontal Scrolling

To use horizontal scrolling, you need to wrap the content in a Flexbox using flex. By default, the width prop is set to 100%. Here too, the content must extend beyond the container for the scroll bar to be displayed.

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 Scrollable 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?
ReactNode;
Children of the layout.
height?
HeightProp;
Specifies the height of the scrollable container.
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.
width?
WidthProp;
Sets the width of the element. You can see allowed tokens here.
Defaults to:
"full"

Related

Building layouts
Learn how to build layouts.
Last update: January 22, 2025
Build with 🥵, 🧡 and
v15.4.3