• Docs
  • Blog
    • 0.25.1

    • light

      dark

      system

      Switch mode
    • Cerberus

      Acheron

      Elysium

    Get Started
    Components
    Styling
    Theming

    Concepts

    OverviewCompositionTesting

    Layout

    Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrap

    Components

    AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsNumber InputPin InputProgressPrompt ModalRadioRatingSelectSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

    Utilities

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

    Bleed

    Used to break an element from the boundaries of its container

    • Panda
    import { Bleed } from 'styled-system/jsx'

    Usage

    The Bleed pattern is used to create a full width element by negating the padding applied to its parent container.

    Bleed

    Some Heading

    This is some descriptive content of the heading.

    Copy
    import { Bleed, Box, VStack } from 'styled-system/jsx'
    import { Text } from '@cerberus/react'
    import { DecorativeBox } from '@/app/components/decorative-box'
    
    export function BasicDemo() {
      return (
        <Box padding="10" rounded="sm" borderWidth="1px">
          <Bleed inline="10">
            <DecorativeBox height="20">Bleed</DecorativeBox>
          </Bleed>
    
          <VStack mt="6">
            <Text as="h1" size="md">
              Some Heading
            </Text>
            <Text>This is some descriptive content of the heading.</Text>
          </VStack>
        </Box>
      )
    }
    

    Vertical

    Use the block prop to make the element bleed vertically.

    Bleed
    Copy
    import { DecorativeBox } from '@/app/components/decorative-box'
    import { Bleed, Box } from 'styled-system/jsx'
    
    export function VerticalDemo() {
      return (
        <Box padding="10" rounded="sm" borderWidth="1px">
          <Bleed block="10">
            <DecorativeBox height="20">Bleed</DecorativeBox>
          </Bleed>
        </Box>
      )
    }
    

    Specific Direction

    Use the inline and block props to make the element bleed in a specific direction.

    inline
    block
    Copy
    import { DecorativeBox } from '@/app/components/decorative-box'
    import { Bleed, Box, VStack } from 'styled-system/jsx'
    
    export function DirectionDemo() {
      return (
        <VStack gap="8">
          <Box padding="8" rounded="sm" borderWidth="1px">
            <Bleed inline="8">
              <DecorativeBox height="8">inline</DecorativeBox>
            </Bleed>
          </Box>
    
          <Box padding="8" rounded="sm" borderWidth="1px">
            <Bleed block="8">
              <DecorativeBox height="8">block</DecorativeBox>
            </Bleed>
          </Box>
        </VStack>
      )
    }
    

    Props

    PropTypeDescription
    inlineSystemStyleObject['marginInline']The negative margin on the x-axis.
    blockSystemStyleObject['marginBlock']The negative margin on the y-axis.

    On this page

    • Edit this page on Github
    Cerberus Design System | Docs