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

Menu

Animated CTA Buttons

Slide Action Button

SlideActionButton.vue

Drag the arrow to the end

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/slide-action-button

Import the shared styles once in your application.

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

API Reference

completeLabel?
string
Default—
threshold?
number

Fraction of the track the thumb must reach to complete.

Default.82
resetDelay?
number

How long the completed state lasts before the thumb slides back, in ms. A negative value keeps it.

Default1200
@complete?
() => void
Default—
thumbClassName?
string
Default—
fillClassName?
string
Default—
labels?
Partial<SlideActionButtonMessages>

Override any built-in string.

Default—
className?
string
Default—
label?
string

Track label; the slot wins when both are set.

Default—
disabled?
boolean
Default—
#default?
slot

Track label. A plain string also names the thumb for assistive technology.

Default—
#completeLabel?
slot

Shown on the track once the slide completes; wins over the `completeLabel` prop.

Default—

Updated