Command palette

@yasinsensoy/web

Web · Components

Separator

Thin line separating content.

2 exports

Live example

Preview

@yasinsensoy/web

React component library.

Subsection

Code

import { Separator } from "@yasinsensoy/web";

<Separator />

Events

  1. Events appear here when you interact with the preview.

Import

import { Separator } from "@yasinsensoy/web";

Separator

componentServer component

Thin line separating content.

Separator({ orientation, decorative, label, className, ...props }: SeparatorProps): JSX.Element

Examples

<Separator />
<Separator label="or" />
<div className="flex h-5 items-center gap-4">
  Profile <Separator orientation="vertical" /> Settings
</div>

Props of the Separator component.

Extends: ComponentProps<"div">

NameTypeDefaultDescription
orientation?"horizontal" | "vertical""horizontal"
decorative?booleantrueIf true it is purely visual and hidden from screen readers. Pass false if it semantically divides content into sections.
label?ReactNodeText shown in the middle of the line (e.g. "or"). Horizontal only.