Application
Content Divider
A rule with an optional centered label (e.g. an “or” separator).
Motionnone
Install
Install Kineto and follow the theme setup once in your app.
bash
npm install kinetotsx
import { ContentDivider } from "kineto/content-divider";Preview
or
tsx
import * as React from "react";
import { cn } from "@/lib/cn";
export type ContentDividerProps = React.HTMLAttributes<HTMLDivElement>;
/** A horizontal rule, optionally with a centered label (e.g. "OR"). */
const ContentDivider = React.forwardRef<HTMLDivElement, ContentDividerProps>(
({ className, children, ...props }, ref) => (
<div
ref={ref}
role="separator"
className={cn("flex items-center gap-3", className)}
{...props}
>
<span className="h-px flex-1 bg-border" />
{children ? (
<>
<span className="text-xs font-medium uppercase tracking-wide text-muted-foreground">
{children}
</span>
<span className="h-px flex-1 bg-border" />
</>
) : null}
</div>
)
);
ContentDivider.displayName = "ContentDivider";
export { ContentDivider };src/components/ui/content-divider.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Optional centered label. |