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

Group

Used to layout its children in an attached or normal group.

import { Group } from '@cerberus/react'

Usage

Used to group and attach elements together.

Attached

Use the layout prop to attach the group of children together.

Grow

Use the grow variant of the layout prop to make the children fill the space.

Orientation

Use the orientation prop to change the direction of the children.

Props

The Group component accepts any style properties along with the following props:

PropTypeDescription
layoutdefault, attached, growThe layout of the children along the cross axis.
orientationhorizontal, verticalThe direction of the children.
asChildbooleanUse the provided child element as the default rendered element, combining their props and behavior.

On this page

  • Edit this page on Github
Cerberus Design System | Docs
Copy
import { DecorativeBox } from '@/app/components/decorative-box'
import { Group } from '@cerberus/react'

export function BasicDemo() {
  return (
    <Group>
      <DecorativeBox h="20" w="40">
        1
      </DecorativeBox>
      <DecorativeBox h="20" w="40">
        2
      </DecorativeBox>
    </Group>
  )
}
Copy
import { Button, Group } from '@cerberus/react'

export function GrowDemo() {
  return (
    <Group layout="grow" w="3/4">
      <Button usage="outlined">First</Button>
      <Button usage="outlined">Second</Button>
      <Button usage="outlined">Third</Button>
    </Group>
  )
}
Copy
import { DecorativeBox } from '@/app/components/decorative-box'
import { Group } from '@cerberus/react'

export function OrientationDemo() {
  return (
    <Group orientation="vertical">
      <DecorativeBox h="20" w="40">
        1
      </DecorativeBox>
      <DecorativeBox h="20" w="40">
        2
      </DecorativeBox>
    </Group>
  )
}
Copy
import { VStack } from 'styled-system/jsx'
import { Button, Group, Tag } from '@cerberus/react'

export function AttachedDemo() {
  return (
    <VStack gap="md" w="3/4">
      <Group layout="attached">
        <Button usage="outlined">Item 1</Button>
        <Button usage="outlined">Item 2</Button>
      </Group>

      <Group layout="attached">
        <Tag usage="filled">Commit status</Tag>
        <Tag usage="filled" palette="success">
          90+
        </Tag>
      </Group>
    </VStack>
  )
}
1
2
1
2
Commit status90+