Display
Collapsible
A single disclosure: a trigger that shows or hides a block of content beneath it. For a group of them that coordinate, use Accordion.
Unlimited projects, up to three team members, and community support. Upgrade any time | nothing is lost when you do.
Installation #
With the Nuxt module, every component is auto-imported — there is nothing to add. In a plain Vue project, import what you use:
import { JCollapsible } from '@juxtui/ui'Usage #
<JCollapsible v-model="open" label="What’s included in the free plan?">
<p>Unlimited projects, up to three team members, and community support.</p>
</JCollapsible>A single disclosure primitive — for a group where opening one can close the others, use JAccordion instead.
Variants & examples #
Several, independently#
Each panel keeps its own v-model, so any number can be open at once.
Yes, at any time. Upgrades apply immediately; downgrades apply at the next billing cycle.
Within 14 days of any charge, no questions asked.
Every paid plan starts with a 14-day trial | no card required.
Disabled#
Upgrade to a Team plan to unlock advanced settings.
API #
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| modelValue | boolean | false | Bound with v-model. |
| label | string | — | Visible summary text; use the trigger slot for custom content instead. |
| disabled | boolean | false | Disables the trigger. |
Events
| Event | Payload | Description |
|---|---|---|
| update:modelValue | boolean | Emitted when toggled. |
Slots
| Slot | Props | Description |
|---|---|---|
| default | — | Panel content. |
| trigger | — | Custom trigger content, replacing label. |
Accessibility #
- A native
<button type="button">witharia-expandedandaria-controlspointing at the panel. - The panel is
role="region", labelled by the trigger, and markedinertwhile closed — its contents are unreachable and unannounced. - Panel height animates through CSS grid rows rather than a measured pixel value, and is skipped entirely under reduced motion.
Keyboard #
| Key | Action |
|---|---|
| Enter | Toggles the panel. |
| Space | Toggles the panel. |