Install
One command installs the files and packages this item needs.
npx shadcn@latest add https://dsui.vercel.app/r/toolbar-divider.json
Files
components/arc/toolbar-divider/toolbar-divider.module.csscomponents/arc/toolbar-divider/toolbar-divider.tsx
Registry items it pulls in
.divider { flex: none; background: var(--border); border-radius: var(--radius-pill); }
.vertical { width: 1px; }
.horizontal { height: 1px; }
.vertical.sm { height: var(--space-4); }
.vertical.md { height: var(--space-6); }
.vertical.lg { height: var(--space-8); }
.horizontal.sm { width: var(--space-4); }
.horizontal.md { width: var(--space-6); }
.horizontal.lg { width: var(--space-8); }
import type { HTMLAttributes } from "react";
import styles from "./toolbar-divider.module.css";
export type ToolbarDividerSize = "sm" | "md" | "lg";
export interface ToolbarDividerProps extends HTMLAttributes<HTMLSpanElement> {
size?: ToolbarDividerSize;
orientation?: "vertical" | "horizontal";
}
export function ToolbarDivider({ className, size = "md", orientation = "vertical", ...props }: ToolbarDividerProps) {
const classes = [styles.divider, styles[size], styles[orientation], className].filter(Boolean).join(" ");
return <span aria-hidden="true" className={classes} {...props} />;
}
ToolbarDivider.displayName = "ToolbarDivider";
export default ToolbarDivider;