Edge Label
Inline edge label for relationship semantics such as streams, handoffs, or policies. Install Edge Label from the VLLNT UI registry with the shadcn CLI.
Inline edge label for relationship semantics such as streams, handoffs, or policies. Part of the overlay family in VLLNT UI, it ships as a machine-readable registry entry — copy the source directly into your app with the shadcn CLI and own it, no runtime dependency on a component library.
Preview
Switch between light and dark to inspect the embedded Storybook preview.
Installation
Add Edge Label to your project with the shadcn CLI. The source lands in your codebase, ready to adapt:
pnpm dlx shadcn@latest add https://ui.vllnt.ai/r/edge-label.jsonSource
import { cn } from "../../lib/utils";
export type EdgeLabelProps = React.ComponentPropsWithoutRef<"span"> & {
emphasis?: "active" | "subtle";
};
const emphasisClasses: Record<
NonNullable<EdgeLabelProps["emphasis"]>,
string
> = {
active: "border-sky-500/30 bg-sky-500/10 text-sky-700 dark:text-sky-300",
subtle: "border-border/60 bg-background/90 text-muted-foreground",
};
const EdgeLabel = ({
className,
emphasis = "subtle",
ref,
...props
}: EdgeLabelProps & { ref?: React.Ref<HTMLSpanElement> }) => (
<span
className={cn(
"inline-flex items-center rounded-full border px-2.5 py-1 text-[11px] font-medium uppercase tracking-[0.18em] shadow-sm",
emphasisClasses[emphasis],
className,
)}
data-emphasis={emphasis}
ref={ref}
{...props}
/>
);
EdgeLabel.displayName = "EdgeLabel";
export { EdgeLabel };
Stories
Explore every variant and state in the interactive Storybook:
Preview
Switch between light and dark to inspect the embedded Storybook preview.