@htmlbricks/hb-faq-component
v0.67.0
Published
FAQ layout with a horizontal topic strip (Bootstrap Icons + labels) that sets an optional `filter` key, and an accordion list built from JSON `info` entries (`title`, `topic`, HTML `text`). Checkbox hack expands/collapses answers; topics with `catchAll` c
Readme
hb-faq-component — faq-component
Category: content
Tags: content
What it does
FAQ layout with a horizontal topic strip (Bootstrap Icons + labels) that sets an optional filter key, and an accordion list built from JSON info entries (title, topic, HTML text). Checkbox hack expands/collapses answers; topics with catchAll clear the filter.
Custom element
hb-faq-component
Attributes (snake_case; use string values in HTML)
id— optional stringstyle— optional stringinfo— optional string (JSON array of{ topic?, title, text };textmay contain HTML)topics— optional string (JSON array of{ key, label, icon, catchAll?, index? })filter— optional string (active topic key)
Events
None declared on the component type.
Usage notes
Drive content via info and topics as JSON strings. Icon names use Bootstrap Icons.
Minimal HTML example
<hb-faq-component
topics="[{"key":"general","label":"General","icon":"question-circle"}]"
info="[{"topic":"general","title":"First question","text":"<p>Answer here.</p>"}]"
></hb-faq-component>