Button

A customizable button component with loading state support.

Installation

npx shadcn-vue@latest add https://dsn-ui.pages.dev/r/dsn-button.json

Usage

Basic Usage

A simple button component equivalent to the standard UI button.

Loading State

A button with a loading state, which disables interaction and shows a spinner along with loading text.

Props

PropTypeDescription
loading

boolean

Default: false

Indicates if the button is in a loading state. When true, the button is disabled and shows a spinner icon.

Example: true

loadingText

string

Default: 'Loading...'

The text to display when the button is in the loading state alongside the spinner icon.

Example: 'Processing...'