Thick separators
Five dividers with real weight instead of a hairline: a rounded bar, a flat darker rule, a two-layer double line, an inset bar and a bar that casts a shadow. The size axis starts one step above the base separator scale, and every color comes from a token.
Installation
The styled layer is free and installs like any other ai2 component.
Run the following command
npx shadcn@latest add @ai2/separator-thickDependencies, the @ai2/tokens theme and the component file are installed together.
Copy the source
components/ui/separator-thick.tsx"use client"
import type * as React from "react"
import { cn } from "@/lib/utils"
/* Thick separator family: 5 decorative HEAVY horizontal separators. The shared idea is thickness: not a hairline but a visible mass. Bar is a solid rod with rounded ends, Rule is flat and sharp, Double is a two-layer double line, Inset is pulled in from the edges, and Shadow is a rod leaving a shadow beneath it. Colour comes ONLY from tokens, alpha via color-mix. size grows the thickness one further step (sm..xl). No motion. */
export type StyledSize = "sm" | "md" | "lg" | "xl"
type Props = React.ComponentProps<"div"> & { size?: StyledSize }
/* Heavy scale: starts one step above the base separator. */
const thickness: Record<StyledSize, string> = {
sm: "h-1",
md: "h-1.5",
lg: "h-2",
xl: "h-3",
}
/* Double: the thickness of each line and the gap between them. */
const line: Record<StyledSize, string> = {
sm: "h-0.5",
md: "h-1",
lg: "h-1",
xl: "h-1.5",
}
const lineGap: Record<StyledSize, string> = {
sm: "gap-1",
md: "gap-1.5",
lg: "gap-2",
xl: "gap-2.5",
}
/* Bar: yuvarlak uclu, dolu token cubuk. */
export function BarSeparator({ className, size = "md", ...props }: Props) {
return (
<div
data-slot="styled-separator"
role="separator"
aria-orientation="horizontal"
className={cn("w-full rounded-full bg-border", thickness[size], className)}
{...props}
/>
)
}
/* Rule: keskin koseli, daha koyu ve duz bir kural cizgisi. */
export function RuleSeparator({ className, size = "md", ...props }: Props) {
return (
<div
data-slot="styled-separator"
role="separator"
aria-orientation="horizontal"
className={cn(
"w-full bg-[color-mix(in_oklab,var(--color-foreground)_30%,transparent)]",
thickness[size],
className
)}
{...props}
/>
)
}
/* Double: a two-layer double line, thick on top and thin below. */
export function DoubleSeparator({ className, size = "md", ...props }: Props) {
return (
<div
data-slot="styled-separator"
role="separator"
aria-orientation="horizontal"
className={cn("flex w-full flex-col", lineGap[size], className)}
{...props}
>
<span className={cn("w-full rounded-full bg-border", line[size])} />
<span
className={cn(
"w-full rounded-full bg-[color-mix(in_oklab,var(--color-border)_60%,transparent)]",
line[size]
)}
/>
</div>
)
}
/* Inset: iki kenardan iceri cekilmis, ortalanmis kalin cubuk. */
export function InsetSeparator({ className, size = "md", ...props }: Props) {
return (
<div
data-slot="styled-separator"
role="separator"
aria-orientation="horizontal"
className={cn("flex w-full justify-center px-8", className)}
{...props}
>
<span
className={cn("w-full rounded-full bg-border", thickness[size])}
/>
</div>
)
}
/* Shadow: a thick bar casting a soft shadow beneath it. */
export function ShadowSeparator({ className, size = "md", ...props }: Props) {
return (
<div
data-slot="styled-separator"
role="separator"
aria-orientation="horizontal"
className={cn(
"w-full rounded-full bg-border shadow-[0_3px_6px_-2px_color-mix(in_oklab,var(--color-foreground)_35%,transparent)]",
thickness[size],
className
)}
{...props}
/>
)
}Manual installs skip the @ai2/tokens theme, so add the token CSS from the theming guide or the tone colors will be missing.
Variations
5 takes on the same idea. Each is its own export, and every one accepts a size prop (sm, md, lg, xl) aligned to the base Button scale.
Bar
A solid token bar with rounded ends.
import { BarSeparator } from "@/components/ui/separator-thick"
<BarSeparator />Rule
A flat, squared-off and darker rule.
import { RuleSeparator } from "@/components/ui/separator-thick"
<RuleSeparator />Double
Two stacked lines with a gap between them.
import { DoubleSeparator } from "@/components/ui/separator-thick"
<DoubleSeparator />Inset
A heavy bar pulled in from both edges.
import { InsetSeparator } from "@/components/ui/separator-thick"
<InsetSeparator />Shadow
A heavy bar that casts a soft shadow below.
import { ShadowSeparator } from "@/components/ui/separator-thick"
<ShadowSeparator />ai2 Thick separators: 5 styled variations on the token system
The ai2 Thick separators are a set of 5 decorative button variations from the styled layer of the @ai2 design system, built around heavy dividers that read as mass rather than a hairline. They are free and MIT licensed, and every color comes from a semantic token, so they theme with the rest of ai2 in light and dark.
Motion runs on framer-motion: none, every variation is static. The styled layer is opt-in, so the dependency only lands if you use it; the base components stay lean. Under reduced motion, nothing changes, there is no motion to reduce.
What is in the ai2 Thick separators?
5 exports in one file: Bar, Rule, Double, Inset and Shadow. Each renders a native button and takes a size prop (sm, md, lg, xl) aligned to the base Button. They are separate from the base Button on purpose: the base keeps its clean variant, tone and size axes, while the styled layer carries the effects.
You own the file. Copy the one category file and you have all 5 variations, with no runtime dependency on ai2 itself.
Why use it
- On-system by construction: Every color resolves to an ai2 semantic token, so the buttons follow your theme in light and dark with no extra work.
- Effect without the sprawl: The decorations live in a dedicated styled file, so the base Button keeps its clean, predictable API.
- Accessible and honest: Each renders a real button element, keeps a visible focus ring, and respects prefers-reduced-motion.
Features
- Token-driven color: No hardcoded hex or oklch; the look recolors with your theme tokens.
- framer-motion: none, every variation is static.
- Reduced-motion aware: Under prefers-reduced-motion, nothing changes, there is no motion to reduce.
- Size aligned to the base: Every variation takes sm, md, lg and xl matching the base Button height scale, so styled and base buttons line up in a row.
Production tips
- Use it for emphasis, not everywhere: Styled buttons draw the eye. Reserve them for the one action you want people to take on a screen, and use the base Button for the rest.
- Keep labels as verbs: The decoration adds weight, so a clear action label keeps the button scannable.
- Pick one variation per surface: The variations share a family; using two different ones in the same view competes for attention.
Works with the rest of ai2
The Thick separators sit alongside the base Button and the rest of the @ai2 registry. They share the same token file, so a styled action next to a base button or a badge stays visually consistent in both modes.