Skip to content
kitn AI/UI

Source

kai-source

A citation chip that shows a domain label and reveals a hover card with a headline and description — drop it below an assistant message to let users verify where an answer came from.

  • Shadow DOM
  • All props are attributes
  • Optional favicon
  • Hover-card preview
  • No events

All props are plain HTML attributes — no JavaScript needed:

<kai-source
href="https://kitn.dev"
headline="kitn — the kit"
description="Composable SolidJS + web-component chat UI."
show-favicon
></kai-source>
<script type="module">import '@kitn.ai/ui/elements';</script>
  • href is required. The element renders nothing without it.
  • label defaults to the hostname (kitn.dev). Pass an explicit label when the domain is ambiguous or too long.
  • headline (not title) — title is a reserved HTML attribute that conflicts with custom element constructors.
  • Clicking the chip opens the URL directly — the element emits no events.

Override the domain default with label when you want a shorter or more recognisable name.

PropertyTypeDefaultNotes
theme'auto'Color mode (`auto` follows prefers-color-scheme).
href''The URL this citation links to (the domain also seeds the default label/favicon).
labelTrigger label (defaults to the domain).
headline''Hover-card headline. Attribute: `headline` (`title` is avoided because it is a global HTML attribute that reflects in a CE constructor and breaks it).
description''Hover-card body text describing the source.
showFaviconfalseShow the source's favicon next to the trigger label.

This element wraps these SolidJS components — reach for them directly when you need finer control than the props expose.

SourceSourceTriggerSourceContentSourceList