API and Development
Sources from @prepared911/ui/sources.
| Prop | Type | Default | Notes |
|---|---|---|---|
label | LocalizedMessage | required | Trigger label, for example "Used 3 sources". |
sources | readonly Source[] | The citations. | |
newTabLabel | LocalizedMessage | required | Announced after each link's name. |
open | boolean | Controlled open state. | |
defaultOpen | boolean | false | Initial open state when uncontrolled. |
onOpenChange | (open: boolean, details: ChangeDetails) => void | Reason is trigger-press. | |
className | string | Appended to the root. |
| Field | Type | Notes |
|---|---|---|
href | string | Destination URL and list key. |
title | LocalizedMessage | DisplayValue | Link text. |
icon | Glyph | Optional decorative glyph. |
| Name | Type | Default | Description |
|---|---|---|---|
label | LocalizedMessage | — | Trigger label, for example "Used 3 sources". |
newTabLabel | LocalizedMessage | — | Announced after each link's name, for example "opens in a new tab". Every source opens in a new tab. |
className | string | — | Classes appended to the root. |
defaultOpen | boolean | false | Initial open state when uncontrolled. |
onOpenChange | CollapsibleOpenChangeHandler | — | Fires when the trigger requests a change. details.cancel() keeps the current state. |
open | boolean | — | Controlled open state. |
sources | readonly Source[] | — | The citations as data; the list layout belongs to the component. Sources are keyed by href, so each href
appears once. |