A lightweight button component with CSS transitions. No motion library dependencies for minimal bundle size while still providing smooth interactions.
The static Button component provides the same API as the animated version but uses CSS transitions instead of JavaScript-powered spring animations. This makes it significantly lighter (~3KB vs ~18KB).
import { Button } from "@/components/ui/static/button"<Button variant="outline">Button</Button>Six visual styles to match different contexts and actions.
Multiple size options for different contexts and layouts.
Add icons at the start or end of the button.
Built-in loading spinner with automatic button disabling.
Show a success checkmark after completing an action.
CSS-based ripple effect on click for visual feedback. Uses CSS keyframes instead of JavaScript animations.
@keyframes for the ripple animation instead of JavaScript-powered spring physics used in the animated version.Square buttons for icon-only actions with required accessible labels.
Merge button styles with any child element using Radix Slot.
disableAnimation prop since it uses CSS transitions by default. For complete animation control, use the Animated Button.Built with WCAG 2.1 guidelines. Keyboard and screen reader support included.
• Icon buttons require aria-label
• Loading states use aria-busy
• Spinners are aria-hidden