sigilUI

Diagram Label

Label a diagram element with consistent typography.

@sigil-ui/componentsReact

Preview

Annotation variants Interactive

Import

import { DiagramLabel } from "@sigil-ui/components";

Usage

<div className="flex flex-wrap items-center justify-center gap-[var(--s-space-8)] py-[var(--s-space-6)]">
    <DiagramLabel text="Input" variant="default" showDot />
    <DiagramLabel text="Compiled" variant="accent" showDot showLine lineLength={36} />
    <DiagramLabel text="Conflict" variant="warn" showDot />
  </div>

Props

PropTypeDefaultDescription
text (required)string—Text configuration.
variant"default" | "accent" | "warn"—Selects a supported visual treatment.
showDotboolean—Show Dot configuration.
showLineboolean—Show Line configuration.
lineLengthnumber—Line Length configuration.
position"top" | "bottom" | "left" | "right"—Position configuration.

Token integration

CSS VariablePurpose
--s-text-mutedText muted
--s-primaryPrimary
--s-errorError
--s-radius-fullRadius full
--s-font-monoFont mono