Docs-Hero
Einstiegs-Hero fuer Dokumentationen im Syntax-Stil: Navy-Band (color.code.*-Welt) mit Schaltkreis-Raster und Glow-Knoten, Eyebrow, Titel, Leadtext, Aktions-Pills und Code-Fenster rechts
Nutzt: component.code-block
Beispiele
Die zwei Türen
PHP-Bibliothek für Anwendungen, Surface-JSON für redaktionelle Seiten.
Eigenschaften
| Prop | Typ | Default | Builder-Label |
|---|---|---|---|
| eyebrow | string | "" | Eyebrow (Zeile ueber dem Titel) |
| title * | string | — | Titel |
| headingLevel | string: 1 | 2 | "1" | Ueberschriftenebene des Titels |
| lead | string | "" | Leadtext |
| actions | array | [] | Aktionen |
| code | string | "" | Code-Beispiel (optional, rechts) |
| filename | string | "" | Dateiname des Beispiels |
| codeStyle | string: block | terminal | "block" | Darstellung des Codes |
| codeSamples | array | [] | Code-Beispiele (Terminal) |
| padding | string: standard | none | sm | md | lg | xl | "standard" | Innenabstand (standard = Baustein-Wert, schlaegt Eigenabstand) |
| margin | string: standard | none | sm | md | lg | xl | "standard" | Aussenabstand |
| border | string: standard | none | hairline | strong | "standard" | Rahmen |
| radius | string: standard | none | control | surface | pill | "standard" | Ecken-Rundung |
| textColor | string | "" | Textfarbe (Token; leer = Standard) |
| backgroundColor | string | "" | Hintergrundfarbe (Token; leer = Standard) |
| shadow | string: standard | none | sm | md | lg | "standard" | Schatten |
| width | string: standard | container | full | "standard" | Breite (full = Band aus dem Container, container = im Container) |
| height | string: standard | half | full | "standard" | Hoehe (full = Bildschirmhoehe, Inhalt zentriert) |
| backgroundImage | string | "" | Hintergrundbild (https-URL oder /pfad; leer = keins) |
| backgroundDim | string: standard | light | medium | strong | "standard" | Bild abdunkeln (Lesbarkeit; standard = aus) |
| backgroundFixed | boolean | false | Bild steht fest beim Scrollen (Parallax) |
| alignSelf | string: standard | start | center | end | "standard" | Ausrichtung im Elternteil |
| anchor | string | "" | Anker-ID (Sprungziel, z. B. fuer Nav-Links) |
* Pflicht-Prop
Events & Slots
Events:
⚡ navigate — im Surface per on: {<event>: {action, params}} verdrahtbar.
Stellschrauben (Komponenten-Tokens)
Ebene 3 — aus dem CSS generiert (Registry). Umverdrahtbar per Hüllen-Komposition, ohne Markup-Eingriff; künftige Regler-Quelle des Component Builders.
| Token | Default |
|---|---|
--docshero-code-muted | var(--color-code-muted) |
--docshero-code-property | var(--color-code-property) |
--docshero-code-surface | var(--color-code-surface) |
--docshero-code-surface-raised | var(--color-code-surface-raised) |
--docshero-code-text | var(--color-code-text) |
--docshero-code-variable | var(--color-code-variable) |
--docshero-radius-full | var(--radius-full) |
Genutzte Design-Tokens
LLM-Notizen
section.docs-hero
Einstiegs-Hero für Dokumentationen im Syntax-Stil: dunkles Band mit Eyebrow, Titel, Leadtext, Aktions-Pills und einem Code-Fenster rechts.
Wann nutzen
- Startband einer technischen Doku oder API-Landingpage, wenn ein Code-Beispiel Teil des Aufmachers ist.
- Für Marketing-Hero ohne Code eher
section.hero-centeredodersection.hero.
Wichtige Props
title* = Titel (max. 160)eyebrow= Zeile über dem Titel (max. 80)lead= Leadtext (max. 500)actions= Array aus{label*, href*, variant?}, variant =primary|secondary(Defaultsecondary)code= Code-Beispiel für das rechte Fensterfilename= Dateiname des Beispiels
Beispiel-Node
{ "definition": "section.docs-hero", "props": { "eyebrow": "Schnellstart", "title": "In Minuten produktiv", "lead": "Installiere das SDK und lege los.", "actions": [{ "label": "Loslegen", "href": "/start", "variant": "primary" }], "code": "npm install @acme/sdk", "filename": "terminal" } }
Hinweise
- Feuert
navigatebei Klick auf eine Aktion. - Nutzt intern
component.code-blockfür die Darstellung des Beispiels.