Componentnavigation0.38 KB gzipZero dependencies

Divider With Text

Centered label over dashed separator lines with a line-grow scaleX animation on mount.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add divider-with-text

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { DividerWithText } from "@/components/ui/divider-with-text"; <DividerWithText align="center">OR</DividerWithText>

Source code

divider-with-text.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxdivider-with-text.tsx45 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type DividerWithTextProps = {  children: React.ReactNode;  align?: "left" | "center" | "right";  className?: string;}; const DividerWithText = React.forwardRef<HTMLDivElement, DividerWithTextProps>(  ({ children, align = "center", className }, ref) => {    return (      <div        ref={ref}        role="separator"        className={cn("flex w-full items-center gap-3", className)}

Props

Interactive Prop Playground

Tweak parsed AST props below to generate ready-to-paste JSX.

tsx3 lines
import { DividerWithText } from "@/components/ui/divider-with-text"; <DividerWithText />
PropTypeDescription
childrenReact.ReactNodeDivider label.
align"left" | "center" | "right"Label alignment.
classNamestringOptional Tailwind or custom CSS classes merged with component styles.