Twigs Logo

Separator

A visual divider that separates content sections both horizontally and vertically. Perfect for organizing layouts, navigation menus, and content sections with clean visual separation.

Import

import { Separator } from "@sparrowengg/twigs-react";

Usage

const SeparatorExample = () => {
  return (
    <Flex css={{ alignItems: "center", height: "40px", gap: "$4" }}>
        <Text css={{ fontSize: "$sm" }}>Home</Text>
        <Separator orientation="vertical" />
        <Text css={{ fontSize: "$sm" }}>About</Text>
        <Separator orientation="vertical" />
        <Text css={{ fontSize: "$sm" }}>Contact</Text>
    </Flex>
  );
};

Props

Separator

PropTypeDefault
orientation?
'horizontal' | 'vertical'
'horizontal'
decorative?
boolean
false
asChild?
boolean
false
css?
object
-

Data Attributes

These props are used for the conditional rendering of the components

PropTypeDefault
[data-orientation]?
'horizontal' | 'vertical'
-