Marigold
v18.0.0-beta.4
Marigold
v18.0.0-beta.4

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
ErrorStatebeta
Headline
Keyboardbeta
List
Loader
SectionMessage
SVG
Text
TextValuealpha
Titlealpha

Formatters

DateFormat
NumericFormat

Hooks and Utils

cn
cva
extendTheme
parseFormData
useAsyncListData
useLandmark
useListData
useTheme
VisuallyHidden
Components

Divider

Component to separate content.

A <Divider> is a visual separator between two groups of content, either horizontally between page sections or vertically within an inline group such as a toolbar.

Anatomy

The <Divider> component contains a single element that can be used to create a horizontal or vertical line to separate content.

HorizontalContent AContent BSeparator lineVerticalABSeparator line

Appearance

The appearance of a component can be customized using the variant and size props. These props adjust the visual style and dimensions of the component, available values are based on the active theme.

The selected theme does not has any options for"size".

PropertyTypeDescription
variantdefault | boldThe available variants of this component.
size-The available sizes of this component.

The Divider component supports variants to control the visual weight of the separator.

VariantDescriptionWhen to use
defaultThin, subtle separator line. This is the default variant.Separating content sections with minimal visual weight.
boldThicker separator line with more visual emphasis.Separating top-level page sections where a stronger break is needed.

Usage

You should use <Divider> to visually separate related content, such as sections in a settings page, items in a list, or actions in a toolbar. They help improve clarity and organization without adding semantic meaning. However, dividers should be used sparingly, only when spacing alone doesn't provide enough separation. Avoid them if they create visual clutter or when semantic elements like headings or sections are more appropriate.

Account Information
Update your name, email address, and password.

Notification Settings
Choose how you want to receive updates and alerts.
import { Divider, Stack, Text } from '@marigold/components';export default () => (  <Stack space={4}>    <Stack space={2}>      <Text weight="bold">Account Information</Text>      <Text>Update your name, email address, and password.</Text>    </Stack>    <Divider />    <Stack space={2}>      <Text weight="bold">Notification Settings</Text>      <Text> Choose how you want to receive updates and alerts.</Text>    </Stack>  </Stack>);

Orientation

Set orientation="vertical" to render a vertical divider. This is useful for separating items in a horizontal layout such as toolbars or inline groups. A vertical <Divider> expects a parent that establishes a height (e.g. <Inline>). It falls back to a minimum height so it remains visible when the parent has none.

import { Divider, IconButton, Inline } from '@marigold/components';import { Bold, Delete, Italic, Underline } from '@marigold/icons';export default () => (  <Inline space={2} alignY="center">    <IconButton aria-label="Bold">      <Bold />    </IconButton>    <IconButton aria-label="Italic">      <Italic />    </IconButton>    <IconButton aria-label="Underline">      <Underline />    </IconButton>    <Divider orientation="vertical" />    <IconButton aria-label="Delete">      <Delete />    </IconButton>  </Inline>);

Accessibility

The <Divider> uses the ARIA role separator to indicate that it visually separates and distinguishes sections of content or groups of menu items.

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 Divider stories

Divider

Prop

Type

Accessibility props (4)

Prop

Type

DOM event handlers (64)

Prop

Type

Alternative components

  • Stack: If you need to create space between elements, consider using the <Stack> component instead of a divider. It provides spacing without the visual line.
  • Inline / Split: Pair with a vertical <Divider> to group related actions in a toolbar-style horizontal layout.
Last update: 2 months ago

Description

Help text or supporting content paired with a title or label.

EmptyState

Inform users when there is no content to display.

On this page

AnatomyAppearanceUsageOrientationAccessibilityPropsDividerAlternative components