Komponentenverträge

Button

Beispielvertrag · Demo „buttons“
src/components/ui/button.tsx
Verantwortung

Actions use Button; navigation uses buttonVariants on a native anchor. Pass type="button" for non-submit actions.

Katalogtext auf Englisch, seiner Autorensprache.

Wiederverwendung
Nicht separat festgelegt – die Demo ist der Vertrag
Einstieg
src/components/ui/button.tsx
Grenzen und Regeln
  • Use native semantics and visible keyboard focus.
  • Check 320px, long content and both themes.
Verbraucher im Quellcode

34 direkte Importe · Website-Referenz

  • src/components/case/CaseBlock.astro
  • src/components/case/CaseHero.astro
  • src/components/ContactBlock.astro
  • src/components/CvPreview.astro
  • + 30 weitere

Pfad von einer Website-Route: src/pages/about/index.astro → src/components/ui/button.tsx

Varianten
  • variant: primary | secondary | ghost | link
  • size: sm | md | icon
  • asChild: boolean (React composition only)
Zustände
  • default
  • hover
  • focus-visible
  • disabled
  • aria-busy + disabled (composition)
API (aus der Quelle gelesen)
Button({className, variant, size, asChild = false, ...props}: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {asChild?: boolean})
Vollständige Dokumentation

Live · Gerendert aus der vorhandenen DemoGerendert aus dem KatalogbeispielEin echter Block aus einem Case, über CaseBlockCaseLab

Buttons

Nutzung und Quellvertrag

Actions use Button; navigation uses buttonVariants on a native anchor. Pass type="button" for non-submit actions.

Hauptquelle: src/components/ui/button.tsx

Varianten: variant: primary | secondary | ghost | link · size: sm | md | icon · asChild: boolean (React composition only)

States: default · hover · focus-visible · disabled · aria-busy + disabled (composition)

  • Use native semantics and visible keyboard focus.
  • Check 320px, long content and both themes.
<Button type="button" variant="secondary" size="sm">Save</Button>
<Button type="button" aria-busy="true" disabled>Saving…</Button>

Input

Nutzung und Quellvertrag

Use Input for native text/search fields. Always connect a visible label; errors use aria-invalid and aria-describedby.

Hauptquelle: src/components/ui/input.tsx

Varianten: size: sm | md · native input props except numeric size

States: empty · filled · focus-visible · disabled · readOnly · aria-invalid + aria-describedby

  • Use native semantics and visible keyboard focus.
  • Check 320px, long content and both themes.
<label for="search">Search work</label>
<Input id="search" type="search" size="md" />

Tags

neutral · mdbrand · mdok · mdwarn · mddanger · mdmeta · md
neutral · smbrand · smok · smwarn · smdanger · smmeta · sm
Nutzung und Quellvertrag

Badge communicates a short label, never release status without evidence. State text must remain readable without color.

Hauptquelle: src/components/ui/badge.tsx

Varianten: tone: neutral | brand | ok | warn | danger | meta · size: md | sm · dot: boolean

States: default · keyboard focus where interactive · light / dark · reduced motion

  • Use native semantics and visible keyboard focus.
  • Check 320px, long content and both themes.
<div class="flex flex-wrap gap-2">
    <Badge dot>neutral</Badge><Badge tone="brand" dot>brand</Badge><Badge tone="ok" dot>ok</Badge><Badge tone="warn" dot>warn</Badge><Badge tone="danger" dot>danger</Badge>
  </div>
  <div class="flex flex-wrap gap-2"><Badge size="sm" tone="meta">Chat</Badge><Badge size="sm" tone="brand">Human Gate</Badge><Badge size="sm" tone="ok">Autonom</Badge><Badge size="sm" tone="warn">Ausstehend</Badge></div>

Karte

Eine ruhige Fläche

Karten tragen eine Einheit Inhalt und heben sich mit einer Schattenstufe ab.

Flagship
Nutzung und Quellvertrag

Reuse this composition from its source and demo. Keep its existing semantic structure and locale/data contracts.

Hauptquelle: src/components/ui/card.tsx

src/components/ui/badge.tsx

src/components/ui/separator.tsx

States: default · keyboard focus where interactive · light / dark · reduced motion

  • Use native semantics and visible keyboard focus.
  • Check 320px, long content and both themes.
<Card className="max-w-text">
    <CardHeader><CardTitle>{t(locale, 'ds.cardTitle')}</CardTitle><CardDescription>{t(locale, 'ds.cardBody')}</CardDescription></CardHeader>
    <Separator />
    <div class="flex gap-2"><Badge tone="brand" dot>{t(locale, 'flag.tag')}</Badge></div>
  </Card>

Tabelle

KennzahlWas
0 → 1Ein Einstieg für alle zvoove-Produkte, vom ersten Shell-Prototyp bis zur Auslieferung mit den zvoove One Bundles.
4 → 14Das Designteam von Container xChange als Design Co-Lead mit aufgebaut.
7-stelligOffene Kundenforderungen zurückgeholt, gemeinsame Initiative im Finanzbereich.
seit 2017Eigene Design Systems von car2go über SHARE NOW bis Compass.
Nutzung und Quellvertrag

Reuse this composition from its source and demo. Keep its existing semantic structure and locale/data contracts.

Hauptquelle: src/components/ui/table.tsx

States: default · keyboard focus where interactive · light / dark · reduced motion

  • Use native semantics and visible keyboard focus.
  • Check 320px, long content and both themes.
<div class="overflow-hidden rounded-card bg-panel shadow-lift">
    <Table>
      <TableHeader><TableRow><TableHead>{locale === 'de' ? 'Kennzahl' : 'Figure'}</TableHead><TableHead>{locale === 'de' ? 'Was' : 'What'}</TableHead></TableRow></TableHeader>
      <TableBody>
        {proof.map((n) => <TableRow><TableCell className="text-lg font-medium text-ink tabular-nums">{t(locale, `proof.${n}.v`)}</TableCell><TableCell>{t(locale, `proof.${n}.t`)}</TableCell></TableRow>)}
      </TableBody>
    </Table>
  </div>

Dialog, Menü, Hinweis

Nutzung und Quellvertrag

Use the existing Radix dialog/menu/tooltip wrappers. Dialogs require an accessible title and focus return; tooltips never carry essential content alone.

Hauptquelle: src/components/ds/PrimitiveDemos.astro

src/components/islands/DsDialogDemo.tsx

src/components/islands/DsTooltipDemo.tsx

src/components/islands/PanelMenu.tsx

src/components/islands/PreRead.tsx

States: default · keyboard focus where interactive · light / dark · reduced motion

  • Use native semantics and visible keyboard focus.
  • Check 320px, long content and both themes.
<div class="flex flex-wrap items-center gap-3">
    <DsDialogDemo client:visible open={t(locale, 'ds.dialogOpen')} title={t(locale, 'ds.dialogTitle')} body={t(locale, 'ds.dialogBody')} close={t(locale, 'ds.close')} />
    <PanelMenu client:visible label={t(locale, 'ds.menuLabel')} items={[{label: t(locale, 'ds.menuAll'), href: '/work/'}, {label: t(locale, 'ds.menuCv'), href: t(locale, 'nav.cvHref')}]} />
    <DsTooltipDemo client:visible trigger={t(locale, 'ds.tooltipTrigger')} text={t(locale, 'ds.tooltip')} />
    <PreRead client:visible trigger={t(locale, 'preread.open')} title={t(locale, 'preread.title')} intro={t(locale, 'preread.intro')} items={[t(locale, 'preread.1'), t(locale, 'preread.2'), t(locale, 'preread.3')]} closeLabel={t(locale, 'ds.close')} />
  </div>
Wie Designer das Kit nutzenQ3 2022 → T2 2023Wie Designer das Kit nutzen. Q3 2022, 5 Designer: 3 bei Einzellösungen, 2 bei Anpassen und zurückgeben. T2 2023, 7 Designer: alle 7 bei Nach Regeln erweitern.
Nach Regeln erweitern
0 %100 %+100 Pp
Einzellösungen
60 %0 %−60 Pp

1 · EinzellösungenEinzellösungenJedes Design ein Einzelstück, sogenannte Snowflakes.2 · MischungMischungEinzelstücke und globale Komponenten, persönlich angepasst.3 · Anpassen und zurückgebenAnpassen und zurückgebenGlobale Komponenten anpassen und die Änderung ins System zurückgeben.4 · Nach Regeln erweiternNach Regeln erweiternGlobale Komponenten nutzen, nach festen Regeln erweitern oder neue Varianten anfragen.5 · Nur globale KomponentenNur globale KomponentenOhne jede Anpassung.

Eine Antwort je Designer.

  1. case → embed?theme=light|dark, {type:'lab:theme'}
  2. embed → case{type:'lab:height', height}
  3. originlocation.origin

Direkt geöffnet. In einem Case zeichnet CaseLab das Fenster um diese Seite, schickt das Theme als lab:theme und übernimmt die Höhe aus lab:height.

Quelle: design-system/manifest.json, mit npm run ds:manifest generiert aus catalog.json, registry/*.json und usage.json.