Citation
@astryxdesign/core v0.7.1 · Citation
Props
| Name | Type | Default | Description |
|---|---|---|---|
source | CitationSource | - | title is the visible label and falls back to the number. url renders a link. src is a favicon. icon is an image URL or a CSS icon class and wins over src. |
number | number | - | 1-based index. Spoken in the accessible name and shown by the number variant. |
variant | 'label' | 'number' | 'label' | label is a chip with the title. number is a compact superscript. |
A template ref exposes element, the link or the span.
Theming
packages/themes/neutral/citation.css maps component variables onto semantic tokens. Another theme overrides those variables.
--astryx-citation-foreground/--astryx-citation-foreground-hover: resting and hover text.--astryx-citation-border/--astryx-citation-hover: chip border and hover fill.--astryx-citation-number-background: superscript fill.--astryx-citation-icon-background: the circle behind a label icon.--astryx-citation-focus: keyboard outline.--astryx-duration-fast-max/--astryx-ease-standard: hover transition.
Native attributes
Attributes fall through to the root, which is an <a> when source.url is set and a <span> otherwise. target, rel, role, aria-label, and title are set by the component.