One section that opens and closes.
Import it from rei-kit/web:
import { BaseDisclosure } from 'rei-kit/web'
Open BaseDisclosure in the live documentation, where every prop below is a control you can change, in four materials and ten palettes.
<script setup lang="ts">
import { ref } from 'vue'
import { BaseDisclosure } from 'rei-kit/web'
const open = ref(false)
</script>
<template>
<BaseDisclosure v-model="open" title="Show details">
Everything that did not fit in the summary.
</BaseDisclosure>
</template>
| Prop | Type | Required or default | What it is for |
|---|---|---|---|
title | string | '' | The question. Already translated. Optional only because the `title` slot is the other way to give one — pass exactly one of them. A disclosure with neither has a control nobody can read, which is why this is documented rather than defaulted to something. |
headingLevel | 2 | 3 | 4 | 3 | Which heading the control sits inside. A heading, always — it is how a screen reader user moves between sections without opening any of them. The level depends on what is above it on the page, and getting it wrong breaks the outline. |
rei-kit is an accessible Vue 3 and Tailwind CSS 4 component library: 106 components, themed by role rather than by colour on three independent axes — ten WCAG-checked palettes, four materials and light or dark, each switched with one attribute. Typed, tested, SSR-safe, no runtime dependencies, MIT.