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

Menu

Button

Stateful Button

StatefulButton.vue

Install

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/button-stateful

Import the shared styles once in your application.

TSUsage
import StatefulButton from '@/components/beui/actions/StatefulButton.vue'
import '@/components/beui/styles.css'

API Reference

class?
string
Default—
size?
"sm" | "md" | "lg" | "icon"
Default—
labels?
Partial<StatefulButtonMessages>

Override any built-in string.

Default—
variant?
"primary" | "secondary" | "ghost" | "outline"
Default—
#icon?
slot

Shown after the idle label while the button is idle.

Default—
pressScale?
number
Default—
ripple?
boolean

Spawn a Material-style ripple from the press point. Off by default.

Default—
state?
ButtonState
Default—
loadingText?
string
Default—
successText?
string
Default—
errorText?
string
Default—
disabled?
boolean
Default—
#default?
slot

The idle label.

Default—
Also on React Native. Spring press, ripple, icons and a stateful variant.(opens in a new tab)

Used in these Pro blocks

Updated