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

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: 6 months ago
Build with 🥵, 🧡 and
v14.1.1