Skip to content
kitn AI/UI

Feedback Bar

kai-feedback-bar

Asks for a reaction in place, then thanks the reader, with no modal in the way.

  • Shadow DOM
  • 3 events
  • Optional detail form
  • Category chips
  • Customisable copy

Drop <kai-feedback-bar> after any response. It transitions to a thank-you on vote; the × button fires kai-close and you decide when it leaves the DOM.

  • Copy: override any label with attributes: bar-title, detail-title, detail-placeholder, submit-label, thanks-message.
  • Detail form: collect-detail opens a follow-up form on a thumbs-down vote. Set categories in JavaScript (it’s an array) to render selectable chips.
PropertyTypeDefaultNotes
theme'auto'Color mode (`auto` follows prefers-color-scheme).
barTitle'Was this helpful?'The banner label (e.g. "Was this helpful?"). Attribute: `bar-title` (`title` is avoided because it is a global HTML attribute).
collectDetail—When set, a not-helpful vote opens an optional detail form before the thank-you confirmation. Attribute: `collect-detail`.
categories—Optional category chips for the detail form. Set as a JS property (array).
detailTitle—Heading for the detail form. Attribute: `detail-title`.
detailPlaceholder—Placeholder for the detail comment box. Attribute: `detail-placeholder`.
submitLabel—Submit button label in the detail form. Attribute: `submit-label`.
thanksMessage—Confirmation copy shown after a vote/submit. Attribute: `thanks-message`.
EventDetailNotes
— The user dismissed the banner.
The user rated the response. `value` is `'helpful'` or `'not-helpful'`.
The user submitted the optional detail form (`collect-detail`).

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

FeedbackBar