Skip to content
Kimenpre-v1documentation home
Color scheme

ki-citation

Use ki-citation inside a sentence. Set ref to the identifier of a ki-source in a Sources disclosure in the same document or shadow root. Use citationRef in JSX. First mention determines the number, even when a later citation refers to the same source.

Tab to the citation to access its preview, Escape to dismiss it, and Enter to reach the named source link.

When to use: Next to a claim supported by a ki-source in the same document or shadow root. Repeat the same reference for subsequent mentions.

When not to use: To cite a source outside this tree or replace a standalone link. Use ki-link for direct navigation.

Properties & attributes

AttributePropertyTypeDefaultDescription
refcitationRefstring–ID or source-id of the source. Use the ref attribute in HTML and citationRef in JSX so framework refs remain available.
label-templatelabelTemplatestring'Source {number}: {title}'Localized link name with {number} and {title} placeholders.

CSS parts

PartDescription
linkFocusable citation link.
markerVisible citation number.
previewAnchored title and hostname preview.
preview-domainHostname in the preview.
preview-titleTitle in the preview.

CSS custom properties

The public styling contract of ki-citation: reassign these tokens at :root or on a subtree — never override internals.

TokenDescription
--ki-citation-backdrop-filterComplete backdrop filter for a citation marker.
--ki-citation-bgBackground of a citation marker.
--ki-citation-bg-imageOptional decorative image over a citation marker.
--ki-citation-fgText on a citation marker.
--ki-citation-hover-bgBackground of a hovered citation marker.
--ki-citation-hover-fgText on a hovered citation marker.
--ki-citation-paddingInline padding of the citation number.
--ki-citation-preview-backdrop-filterComplete backdrop filter for the citation preview.
--ki-citation-preview-bgBackground of the title and hostname preview.
--ki-citation-preview-bg-imageOptional decorative image over the citation preview.
--ki-citation-preview-borderEdge color of the citation preview.
--ki-citation-preview-border-widthEdge width of the citation preview.
--ki-citation-preview-fgText on the citation preview.
--ki-citation-preview-max-inline-sizeMaximum width of the citation preview.
--ki-citation-preview-paddingInset around the preview content.
--ki-citation-preview-radiusCorner radius of the citation preview.
--ki-citation-preview-shadowElevation of the citation preview.
--ki-citation-radiusCorner radius of a citation marker.
--ki-citation-sizeMinimum painted edge of a citation marker.
--ki-density-target-minThe smallest pointer target any density may produce: 24 x 24 CSS px by default and in compact (WCAG 2.5.8 AA), 44 x 44 in touch (WCAG 2.5.5). It floors a shrinking control but never lifts what a control paints: a control painted smaller extends its target to it, invisibly; rows and tabs grow to it (spec 045 A1).
--ki-focus-ring-colorColour of the keyboard focus ring every focusable component draws: 3:1 or more against the page in every theme and scheme.
--ki-focus-ring-offsetGap between a focusable component and its keyboard focus ring.
--ki-focus-ring-widthThickness of the keyboard focus ring every focusable component draws (its outline). One token instead of one per component, so a mode or a theme changes every ring at once.
--ki-typography-family-bodysemantic font family for typography family body.
--ki-typography-line-height-caption-2semantic dimension for typography line height caption 2.
--ki-typography-size-caption-2semantic dimension for typography size caption 2.
--ki-typography-weight-body-semiboldsemantic font weight for typography weight body semibold.