Skip to content

Action Button

A button that performs an action when clicked and optionally asks for user confirmation.

Open in
pnpm dlx shadcn@latest add https://wds-shadcn-registry.netlify.app/r/action-button.json
import { ActionButton } from "@/components/ui/action-button"
import { updateSettings } from "@/actions/settings"
const settings = { name: "Kyle" }
<ActionButton
action={updateSettings.bind(null, settings)}
requireAreYouSure
>
Save Settings
</ActionButton>
Open in
Open in
Open in