Accordion
VAccordion groups collapsible sections built with native <details> elements.
Usage
vue
Does it work with Nuxt?
Yes. The package is SSR-safe and ships as ESM.
Is there a Tailwind preset?
No. The tokens are custom properties, which any framework can read.
Examples
Variants
flat leaves the group unframed. outline adds a border, elevated a raised surface with a shadow and filled a muted surface.
vue
Flat, the default
Nothing is drawn around the group, which lets it sit on the surface behind it.
No background, no border
Reach for it when the page already provides the frame.
Outline
A border on the page surface and rounded corners, so the group reads as a card.
Its own surface
Reach for it when the accordion has to stand apart from what surrounds it.
Elevated
A raised surface with a shadow and no border.
Lifted from the page
Reach for it when the group floats above a busy background.
Filled
A muted surface with no border.
Fewer lines
Reach for it on a page that already has a lot of rules.
One section at a time
One section stays open by default. Enable multiple to keep several open.
vue
How long does delivery take?
Two working days in France, five anywhere else in Europe.
Do you ship outside Europe?
Yes, to twenty-eight countries. The rate is shown at checkout.
Can I change the address after ordering?
Until the parcel is handed to the carrier, from the order page.
What can I return?
Anything unworn, within thirty days of delivery.
Who pays for the return?
We do, once per order. The label is in your account.
When is the refund issued?
Within three working days of the parcel reaching the warehouse.
Subtitles and icons
Add icon and subtitle, or use their slots for custom content.
vue
NotificationsEmail and in-app alerts
Choose which events reach you, and where.
AvailabilityWorking hours and time zone
The hours during which your team can be reached.
DocumentsContracts and invoices
Everything signed or billed on this account.
Expand and collapse icons
Without collapseIcon, the expand icon rotates when open. With it, the icons switch.
vue
Where do these two icons come from?
From the icon set wired into the application, since both are given here as names.
And without a collapse icon?
The expand icon stays in place and is rotated when the section opens.
Disabled sections
Disabled sections cannot be toggled and are skipped by keyboard navigation.
vue
Personal details
Your name, your address and how we may contact you.
Payment methods
Available once your email address has been confirmed.
Delivery preferences
Available once a payment method has been added.
Privacy
What we store, and for how long.
API
Props
| Prop | Type | Default |
|---|---|---|
multiple | boolean | false |
| Allows several sections to remain open. | ||
variant | AccordionVariant'flat' | 'outline' | 'elevated' | 'filled' | 'flat' |
| Unframed group, or framed by a border, a shadow or a muted fill. | ||
expandIcon | IconSource | expand_more |
Closed-section icon. Rotates when open unless collapseIcon is set. | ||
collapseIcon | IconSource | none |
| Open-section icon replacing the rotated expand icon. | ||
| Prop | Type | Default |
|---|---|---|
title | string | none |
Section heading. Replaced by the title slot. | ||
subtitle | string | none |
| Second line below the title. Replaced by its slot. | ||
icon | IconSource | none |
| Icon before the title. Replaced by its slot. | ||
defaultOpen | boolean | false |
| Initial open state. Later changes do not control the section. | ||
disabled | boolean | false |
| Disables interaction. | ||
v-model:open | boolean | null | null |
| Open state to observe or control. | ||
Slots
| Slot | Type |
|---|---|
default | {} |
VAccordionItem children. | |
| Slot | Type |
|---|---|
default | {} |
| Expanded content. | |
title | {} |
| Content replacing the title. | |
subtitle | {} |
| Content replacing the subtitle. | |
icon | {} |
| Content replacing the icon. | |
Types
Types used in the API tables. Import exported types from vectis-ui.
export interface BuiltinIcon {
name: string
paths: readonly [string] | readonly [string, string]
}export type IconRender =
| { path: string; viewBox?: string }
| { component: Component; props?: Record<string, unknown> }
| { src: string }
| { text: string; class?: string }
| { class: string }export type IconSource = string | BuiltinIcon | IconRender