Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Inline Citation
  3. API and Development

Inline Citation

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Import InlineCitation from @prepared911/ui/inline-citation. Props are a union: static, or a link.
PropTypeDefaultNotes
labelLocalizedMessagerequiredThe chip text, composed by the caller
hrefstringMakes the chip a link that opens in a new tab
newTabLabelLocalizedMessagerequired with hrefAnnounced after the chip text
classNamestringAppended after the generated classes
refRef<HTMLSpanElement> static, Ref<HTMLAnchorElement> linked
data-* attributes pass to the Badge or the anchor. Reserved design-system state names are dropped with a warning. newTabLabel without href is a type error.
Exports
InlineCitation and the type InlineCitationProps.
Props
NameTypeDefaultDescription
labelLocalizedMessage—The chip's visible text, composed by the caller: the citation number alone ("1"), or the number with the source title ("2 · Layout guide"). The chip is one Badge, so the text is one string and truncates as a unit.
classNamestring—Classes appended after the generated classes.
hrefstring—No destination. The source URL. The link opens in a new tab with rel="noopener noreferrer".
newTabLabelLocalizedMessage—Not allowed without href. Announced after the chip text, such as "Opens in a new tab".
ref((instance: HTMLSpanElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<HTMLSpanElement | null> | ((instance: HTMLAnchorElement | null) => void | (() => VoidOrUndefinedOnly)) | RefObject<...> | null—Ref to the chip. Ref to the anchor.
Storybook
Interactive examples and edge cases for this component are in Storybook.
DefaultOpens in a new tab
Previous
Inline Citation / Usage
Next
Inline Citation / Accessibility
On this page
Exports
Props
Storybook