A versatile container used to provide layout and styling capabilities.

<Flex gap="4" wrap="wrap" align="center" justify="center" className="w-full">
  <Panel variant="outlined" p="4">
    Outlined Panel
  </Panel>
</Flex>

Anatomy

<Panel />

Examples

Variants

Panel components come with three built in variants, solid, outlined, and muted.

Solid Panel

Outlined Panel

Muted Panel

<Flex gap="4" wrap="wrap" align="center" justify="center" className="w-full">
  {["solid", "outlined", "muted"].map((variant) => (
    <Panel key={variant} variant={variant} p="4">
      <Text>{variant.charAt(0).toUpperCase() + variant.slice(1)} Panel</Text>
    </Panel>
  ))}
</Flex>

Blurring

The blur prop applies a backdrop blur effect to the panel content.

Test Text Test Text Test Text Test Text Test Test Text Test Text Test Text Test Text Test

Blur: 0px

Blur: 2px

Blur: 4px

<Flex gap="4" wrap="wrap" align="center" justify="center" className="w-full">
  <Box className="relative">
    <Box className="absolute">
      <Text px="2" py="2">
        Test Text Test Text Test Text Test Text Test Test Text Test Text Test
        Text Test Text Test
      </Text>
    </Box>

    <Flex gap="3">
      {["0px", "2px", "4px"].map((blur) => (
        <Panel key={blur} blur={blur} p="4" variant="muted">
          <Text>Blur: {blur}</Text>
        </Panel>
      ))}
    </Flex>
  </Box>
</Flex>

Colors

The panel component uses the color prop to allow for predefined and custom colors.

Primary Panel

Secondary Panel

Tertiary Panel

Success Panel

Danger Panel

Warning Panel

Info Panel

<Flex gap="4" wrap="wrap" align="center" justify="center" className="w-full">
  {[
    "primary",
    "secondary",
    "tertiary",
    "success",
    "danger",
    "warning",
    "info",
  ].map((color) => (
    <Panel key={color} color={color} px="4" py="2" variant="muted">
      <Text color={color}>
        {color.charAt(0).toUpperCase() + color.slice(1)} Panel
      </Text>
    </Panel>
  ))}
</Flex>