npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@choice-ui/separator

v0.0.2

Published

A separator component for visually dividing content sections horizontally or vertically

Downloads

120

Readme

Separator

A visual divider component used to separate content sections. Supports horizontal and vertical orientations, accessible to screen readers, and can display content in the middle.

Import

import { Separator } from "@choice-ui/react"

Features

  • Orientation: Horizontal (default) and vertical directions
  • Content Support: Optional children to display text or elements between lines
  • Accessible: Uses role="separator" with proper ARIA attributes
  • Decorative Mode: Option to hide from screen readers for purely visual separators
  • Variants: Multiple color variants (default, light, dark, reset)
  • Customizable: Easily styled via className

Usage

Basic Usage

<div className="w-80">
  <div className="py-4">Content above</div>
  <Separator />
  <div className="py-4">Content below</div>
</div>

Vertical Separator

<div className="flex h-8 items-center gap-4">
  <a href="#">Home</a>
  <a href="#">Pricing</a>
  <Separator orientation="vertical" />
  <a href="#">Log in</a>
  <a href="#">Sign up</a>
</div>

With Content (Children)

Insert text or elements between the separator lines:

// "OR" divider pattern
<Separator>or</Separator>

// Section title
<Separator>Section Title</Separator>

// Custom styled content
<Separator>
  <span className="text-accent-foreground">New</span>
</Separator>

Decorative Mode

Use decorative prop when the separator is purely visual:

<Separator decorative />

Variants

// Default (uses design system boundary color)
<Separator variant="default" />

// Light
<Separator variant="light" />

// Dark
<Separator variant="dark" />

// Reset (no styling, for custom colors)
<Separator variant="reset" className="bg-accent-background" />

Props

interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
  /**
   * Separator orientation
   * @default "horizontal"
   */
  orientation?: "horizontal" | "vertical"

  /**
   * Whether the separator is purely decorative (hidden from screen readers)
   * @default false
   */
  decorative?: boolean

  /**
   * Color variant
   * @default "default"
   */
  variant?: "default" | "light" | "dark" | "reset"

  /**
   * Content to display between the separator lines
   * When provided, renders two separator lines with content in between
   */
  children?: React.ReactNode
}

Accessibility

  • Semantic: Uses role="separator" for assistive technology
  • Orientation: Includes aria-orientation attribute
  • Decorative: Uses role="none" when decorative={true} to be ignored by screen readers

Examples

Navigation Menu

<nav className="flex h-8 items-center gap-4">
  <a href="#">Home</a>
  <a href="#">Pricing</a>
  <a href="#">Blog</a>
  <Separator orientation="vertical" />
  <a href="#">Log in</a>
  <a href="#">Sign up</a>
</nav>

Card Sections

<div className="rounded-xl border">
  <div className="p-4">
    <h3>Card Title</h3>
  </div>
  <Separator />
  <div className="p-4">
    <p>Card content...</p>
  </div>
  <Separator />
  <div className="p-4">
    <button>Action</button>
  </div>
</div>

Auth Form Divider

<div className="flex flex-col gap-4">
  <button>Continue with Google</button>
  <Separator>or</Separator>
  <button>Continue with Email</button>
</div>

Custom Styling

// Custom color
<Separator className="bg-accent-background" />

// Thicker line
<Separator className="h-0.5" />

// With margin
<Separator className="my-4" />

// Dashed style
<Separator className="h-px bg-[repeating-linear-gradient(90deg,var(--color-default-boundary)_0,var(--color-default-boundary)_4px,transparent_4px,transparent_8px)]" />

Notes

  • When children is provided, the component renders a flex container with two separator lines and the content in between
  • Horizontal separators have height: 1px and width: 100%
  • Vertical separators have width: 1px and height: 100%
  • Uses Tailwind Variants for styling