# bitboss-ui — complete knowledge base > Vue 3 component library by BitBoss: every guide, recipe, composable and > component contract concatenated into one file. **This file is for bulk ingestion — search indexes, embeddings, offline evaluation. It is far larger than a useful prompt.** If you are an agent about to write code, do NOT read this. Fetch `https://cdn.jsdelivr.net/npm/bitboss-ui@beta/dist/llms-medium.txt` instead, then hop to the one component contract you need. Canonical URL: https://cdn.jsdelivr.net/npm/bitboss-ui@beta/dist/llms-full.txt Index: https://cdn.jsdelivr.net/npm/bitboss-ui@beta/llms.txt --- # BbAccordion ## Agent Contract - Safety level: **Consumer API** - Group: **Navigation** - Description: Expands and collapses a content panel. - Usage rule: Prefer this component for consumer-facing implementations. - Implementation source (only when the contract below is not enough): [source/BbAccordion.md](./source/BbAccordion.md) ## Usage & Guidelines ### When to use `BbAccordion` is the top of the disclosure ladder: a ready-made panel that pairs a header **button** with a collapsible body and wires the accessibility for you (`aria-expanded`, `aria-controls`, `role="region"`, `aria-labelledby`). Reach for it for FAQs, settings sections, and any "click a title to reveal detail" pattern. Each `BbAccordion` is **one** panel controlled by a boolean `v-model`. Compose several for a list; there is no group wrapper. That keeps the model explicit: for independent panels give each its own boolean, and for single-open behaviour track one active key yourself (shown below). Step down the ladder when the composed header doesn't fit: - Your trigger lives somewhere the header can't (inline link, toolbar, inside another component) → **`BbCollapsible`** (`./BbCollapsible.md`), the primitive this is built on. - You only need to animate a height change, with no hide/show state at all → **`BbSmoothHeight`** (`./BbSmoothHeight.md`). The public surface is small on purpose: `v-model` (boolean), `eager`, `transition-duration`, `id`, two slots, and the `update:modelValue` event. Everything else is composition. ### Composing an FAQ The classic pricing-page FAQ is independent panels — each with its own boolean. The `header` slot is rendered **inside the header button** — so put text and an indicator there, never a nested ` ``` Both sides carry the pill's radius and inline padding, so each hit area runs **flush to the border** — clicking the extreme left edge presses the body, the extreme right edge presses the clear. The clear button's hit region spans the full pill height even though only the glyph's circle looks interactive. Focus is always ringed on the **whole pill** (never on the inner control), for the body and the clear button alike; the clear button additionally lights its glyph. The class hooks above are the supported styling surface — `.bb-badge__body` and `.bb-badge__trailing` are new, so avoid direct-child selectors like `.bb-badge > .bb-badge__content`, which no longer match. ### Works well with - `BbBadgeButton` — the companion that makes the badge body a real button/link. - `BbIndicator` — the anchored sibling: counts and dots pinned over a bell, button, or avatar. - `BbTable` / `BbTabs` — standalone badges as status pills in cells and tab labels. - `BbSelect` / `ChipsBox` — a `clearable` `secondary` badge is exactly how multi-selects render their removable selections. - `BbPopover` / `BbDropdown` — a `BbBadgeButton` ref is a ready-made activator for an inline-edit chip. ### Gotchas & anti-patterns - The label lives in the **default slot** — there is no `text`/`content` prop. In button mode it moves to `BbBadgeButton`'s slot; don't write both. - **`BbBadgeButton` must be a direct child** of the badge's default slot. Wrapping it in another element or component is undefined behavior — the badge won't hand over its body, and you'll get a duplicated label. Outside a badge entirely, it throws. - One `BbBadgeButton` per badge. There is only one body to take over. - A badge **without** the companion stays inert: no events, no `href`. Only `clearable` adds behavior (the clear button + `click:clear`). - Don't nest your own `