Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Expandable Control

Preview

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/expandable-control

Import the shared styles once in your application.

TSUsage
import ExpandableControl from '@/components/beui/layout/ExpandableControl.vue'
import '@/components/beui/styles.css'

API Reference

ExpandableButton

#icon?
slot

Always-visible icon.

Default—
label?
string

Text revealed beside the icon when expanded. The `label` slot wins when both are set.

Default—
className?
string
Default—
v-model:expanded?
boolean

Controlled expanded state. Use `v-model:expanded`.

Defaultundefined
defaultExpanded?
boolean
Defaultfalse
disabled?
boolean
Default—
@expanded-change?
(expanded: boolean) => void
Default—
#label?
slot

Label revealed when expanded.

Default—

ExpandableChip

label?
string

Chip text. The `label` slot wins when both are set.

Default—
#actionIcon?
slot

Icon of the trailing action.

Default—
actionLabel
string

Accessible name of the trailing action.

Default—
@action?
(event: MouseEvent) => void

Fires when the trailing action is activated.

Default—
collapseOnAction?
boolean

Collapse the chip and return focus to its label after the action runs.

Defaulttrue
disabled?
boolean
Default—
className?
string
Default—
labelClassName?
string
Default—
actionClassName?
string
Default—
v-model:expanded?
boolean

Controlled expanded state. Use `v-model:expanded`.

Defaultundefined
defaultExpanded?
boolean
Defaultfalse
@expanded-change?
(expanded: boolean) => void
Default—
#label?
slot

Chip text.

Default—
Also on React Native. Buttons and chips that spring open to reveal more.(opens in a new tab)

Updated