Panel
Fieldset
A native fieldset that names the controls inside it, and can collapse behind its legend.
WAI-ARIA tested
Import
main.ts
import { Fieldset } from '@vitral/vue';Basic
Toggleable
collapsed: false
API
Read from packages/vue/src/components/Fieldset/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| legend | string | The legend's text. |
| toggleable | boolean | Makes the legend a button that shows and hides the group. |
| toggleIcon | IconProp | — |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| toggle | event: FieldsetToggleEvent | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| default | — | — |
| legend | — | Replaces the legend's text. |
| toggleicon | (props: { collapsed: boolean }) | — |