DocsBlog
  • 1.0.0

  • light

    dark

    system

    Switch mode
  • Cerberus

    Acheron

    Elysium

Get Started
Components
Data Grid
Styling
Theming

Concepts

OverviewCompositionCerberus ContextTesting

Layout

Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridGroupNewLink OverlayScrollableStackWrap

Components

AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsNumber InputPaginationNewPin InputProgressPrompt ModalRadioRatingSelectSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

Utilities

Client OnlyDownload TriggerEnvironmentFeature FlagsFocus TrapForFormat ByteFormat NumberFormat Relative TimeFrameHighlightJSON Tree ViewLocaleLocal StoragePortalPresenceShowsplitPropsTheme

Divider

Used to create visual separation between content.

  • Panda
import { Divider } from "styled-system/jsx";

Usage

Used to visually separate content.

Appearance

To change the appearance of the divider, use the borderStyle prop.

Orientation

Use the orientation prop to change the orientation of the divider.

Thickness

Use the thickness prop to change the thickness of the divider.

Color

Use the color prop to change the color of the divider.

Label

Create visual labels by combining a Divider with other layout components.

Props

The Divider accepts any style prop in addition to the following:

PropTypeDescription
orientationhorizontal,verticalThe orientation of the divider. Defaults to "horizontal".
thicknessstringThe thickness of the divider. Defaults to "1px".
colorstringThe color of the divider. Defaults to "gray.200".

On this page

  • Edit this page on Github
Cerberus Design System | Docs
Copy
import { Text } from '@cerberus/react'
import { Divider, VStack } from 'styled-system/jsx'

export function BasicDemo() {
  return (
    <VStack w="3/4">
      <Text>First</Text>
      <Divider color="page.border.initial" />
      <Text>Second</Text>
      <Divider color="page.border.initial" />
      <Text>Third</Text>
    </VStack>
  )
}
Copy
import { Divider, VStack } from 'styled-system/jsx'

export function ColorDemo() {
  return (
    <VStack gap="lg" w="3/4">
      <Divider color="page.border.initial" />
      <Divider color="info.border.initial" />
      <Divider color="neutral.100" />
    </VStack>
  )
}
Copy
import { Text } from '@cerberus/react'
import { PropsWithChildren } from 'react'
import { Divider, HStack, Stack } from 'styled-system/jsx'

function TextLabel(props: PropsWithChildren<object>) {
  return <Text flexShrink="0" textStyle="label-sm" {...props} />
}

export function LabelDemo() {
  return (
    <Stack w="3/4">
      <HStack>
        <TextLabel>Label (start)</TextLabel>
        <Divider flex="1" />
      </HStack>

      <HStack>
        <Divider flex="1" />
        <TextLabel>Label (end)</TextLabel>
      </HStack>

      <HStack>
        <Divider flex="1" />
        <TextLabel>Label (center)</TextLabel>
        <Divider flex="1" />
      </HStack>
    </Stack>
  )
}
Copy
import { Divider, VStack } from 'styled-system/jsx'

export function ThicknessDemo() {
  return (
    <VStack gap="lg" w="3/4">
      <Divider thickness="1px" />
      <Divider thickness="2px" />
      <Divider thickness="4px" />
    </VStack>
  )
}
Copy
import { Text } from '@cerberus/react'
import { type PropsWithChildren } from 'react'
import { Divider, HStack } from 'styled-system/jsx'

function VertDivider(props: PropsWithChildren<object>) {
  return (
    <Divider color="page.border.initial" orientation="vertical" {...props} />
  )
}

export function OrientationDemo() {
  return (
    <HStack h="2rem" gap="lg" justify="center" pt="md" w="3/4">
      <Text>Text</Text>
      <VertDivider />
      <Text>Text</Text>
      <VertDivider />
      <Text>Text</Text>
    </HStack>
  )
}
Copy
import { Divider, VStack } from 'styled-system/jsx'

export function AppearanceDemo() {
  return (
    <VStack gap="lg" w="3/4">
      <Divider borderStyle="solid" />
      <Divider borderStyle="dashed" />
      <Divider borderStyle="dotted" />
    </VStack>
  )
}

First

Second

Third

Label (start)

Label (end)

Label (center)

Text

Text

Text