Button
Button is part of the Actions and feedback group. Intent-aware action primitive for forms, toolbars, dialogs, and command surfaces.
Installation
Section titled “Installation”npx bambiui add button --framework reactnpx bambiui add button --framework solidnpx bambiui add button --framework sveltenpx bambiui add button --framework vueimport { Button } from "@/components/ui/button";
export function Example() { return <Button />;}import { Button } from "~/components/ui/button";
export function Example() { return <Button />;}<script lang="ts"> import { Button } from "$lib/components/ui/button";</script>
<Button /><script setup lang="ts">import { Button } from "@/components/ui/button";</script>
<template> <Button /></template>Preview
Section titled “Preview”Behavior
Section titled “Behavior”Use for user-triggered actions. Prefer links for navigation unless the control performs an application command.
Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.
Accessibility
Section titled “Accessibility”Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Button. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.
Exports
Section titled “Exports”ButtonTokens
Section titled “Tokens”Customize tokens after installing and previewing the component. Relevant tokens include:
--bambi-intent-primary-bg--bambi-intent-primary-fg--bambi-intent-primary-hover-bg--bambi-radius-md