First
Second
Third
'use client'
import { Stack, Text } from '@chakra-ui/react'
import { Separator } from '@saas-ui/react'
export const SeparatorBasic = () => {
  return (
    <Stack>
      <Text>First</Text>
      <Separator />
      <Text>Second</Text>
      <Separator />
      <Text>Third</Text>
    </Stack>
  )
}
import { Separator } from '@saas-ui/react/separator'<Separator />Use the variant prop to change the appearance of the separator.
'use client'
import { Stack } from '@chakra-ui/react'
import { Separator } from '@saas-ui/react'
export const SeparatorWithVariants = () => {
  return (
    <Stack>
      <Separator variant="solid" />
      <Separator variant="dashed" />
      <Separator variant="dotted" />
    </Stack>
  )
}
Use the size prop to change the size of the separator.
'use client'
import { Stack } from '@chakra-ui/react'
import { Separator } from '@saas-ui/react'
export const SeparatorWithSizes = () => {
  return (
    <Stack gap="4">
      <Separator size="xs" />
      <Separator size="sm" />
      <Separator size="md" />
      <Separator size="lg" />
    </Stack>
  )
}
Compose the Separator with HStack to add a label.
Label (start)
Label (end)
Label (center)
'use client'
import { HStack, Stack, Text } from '@chakra-ui/react'
import { Separator } from '@saas-ui/react'
export const SeparatorWithLabel = () => {
  return (
    <Stack>
      <HStack>
        <Text flexShrink="0">Label (start)</Text>
        <Separator flex="1" />
      </HStack>
      <HStack>
        <Separator flex="1" />
        <Text flexShrink="0">Label (end)</Text>
      </HStack>
      <HStack>
        <Separator />
        <Text flexShrink="0">Label (center)</Text>
        <Separator />
      </HStack>
    </Stack>
  )
}
Use the orientation prop to change the orientation of the separator.
First
Second
'use client'
import { HStack, Text } from '@chakra-ui/react'
import { Separator } from '@saas-ui/react'
export const SeparatorVertical = () => {
  return (
    <HStack gap="4">
      <Text>First</Text>
      <Separator orientation="vertical" height="4" />
      <Text>Second</Text>
    </HStack>
  )
}
| Prop | Default | Type | 
|---|---|---|
| colorPalette  | 'gray' | 'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink' | 'accent'The color palette of the component | 
| variant  | 'solid' | 'solid' | 'dashed' | 'dotted'The variant of the component | 
| orientation  | 'horizontal' | 'vertical' | 'horizontal'The orientation of the component | 
| size  | 'sm' | 'xs' | 'sm' | 'md' | 'lg'The size of the component |