Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

23 linesCodeBlameRaw
1import { Separator as Primitive } from "radix-ui";
2import type { ComponentProps } from "react";
3
4import { cn } from "../../lib/cn";
5
6// shadcn/ui's separator, styled with g1t's tokens: a hairline in `line`,
7// across or (vertical) up and down. Decorative unless told otherwise, so a
8// screen reader passes over it.
9
10export function Separator({ className, orientation = "horizontal", decorative = true, ...props }: ComponentProps<typeof Primitive.Root>) {
11 return (
12 <Primitive.Root
13 data-slot="separator"
14 decorative={decorative}
15 orientation={orientation}
16 className={cn(
17 "shrink-0 bg-line data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
18 className,
19 )}
20 {...props}
21 />
22 );
23}