Accordéon
VAccordion regroupe des sections repliables fondées sur des éléments natifs <details>.
Utilisation
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.
Exemples
Variantes
flat laisse le groupe sans cadre. outline ajoute une bordure, elevated une surface surélevée avec une ombre et filled une surface atténuée.
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.
Une section à la fois
Une seule section reste ouverte par défaut. Activez multiple pour en conserver plusieurs ouvertes.
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.
Sous-titres et icônes
Ajoutez icon et subtitle, ou utilisez leurs slots pour du contenu personnalisé.
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.
Icônes d'ouverture et de fermeture
Sans collapseIcon, l’icône tourne à l’ouverture. Avec cette prop, les icônes s’échangent.
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.
Sections désactivées
Les sections désactivées ne s’ouvrent ni ne se ferment, et la navigation au clavier les ignore.
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 | Défaut |
|---|---|---|
multiple | boolean | false |
| Permet de conserver plusieurs sections ouvertes. | ||
variant | AccordionVariant'flat' | 'outline' | 'elevated' | 'filled' | 'flat' |
| Groupe sans cadre, ou encadré par une bordure, une ombre ou un fond atténué. | ||
expandIcon | IconSource | expand_more |
Icône de section fermée. Tourne à l’ouverture sauf si collapseIcon est défini. | ||
collapseIcon | IconSource | aucune |
| Icône de section ouverte remplaçant l’icône tournée. | ||
| Prop | Type | Défaut |
|---|---|---|
title | string | aucune |
Titre de section. Remplacé par le slot title. | ||
subtitle | string | aucune |
| Seconde ligne sous le titre. Remplacée par son slot. | ||
icon | IconSource | aucune |
| Icône avant le titre. Remplacée par son slot. | ||
defaultOpen | boolean | false |
| État ouvert initial. Les modifications ultérieures ne pilotent pas la section. | ||
disabled | boolean | false |
| Désactive les interactions. | ||
v-model:open | boolean | null | null |
| État ouvert à observer ou à piloter. | ||
Slots
| Slot | Type |
|---|---|
default | {} |
Enfants VAccordionItem. | |
| Slot | Type |
|---|---|
default | {} |
| Contenu déplié. | |
title | {} |
| Contenu remplaçant le titre. | |
subtitle | {} |
| Contenu remplaçant le sous-titre. | |
icon | {} |
| Contenu remplaçant l’icône. | |
Types
Types utilisés dans les tables d’API. Importez les types exportés depuis 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