An animated button component with a variety of styles.
Made by raouf.codesOverview
Core Concept
The Button component provides a motion-enhanced button with comprehensive variant support. Built on top of Framer Motion, it delivers fluid hover and tap animations while maintaining full accessibility.
Key Features
- Motion animations — Smooth scale and shadow transitions on hover/tap
- Variant system — Full support for intent, styling, size, shape, and elevation
- Polymorphic rendering — Uses primitive button with
asChildslot support - Accessible by default — Proper focus states and ARIA support
Installation
Usage
Basic
Composition
Combine with icons or use within forms:
API Reference
Button
Azemmur API Reference - Button Primitive| Prop | Type | Default |
|---|---|---|
intent? | enum | "primary" |
styling? | enum | "solid" |
size? | enum | "md" |
shape? | enum | "rounded" |
elevation? | enum | "raised" |
...props? | HTMLMotionProps<"button"> | - |
Accessibility
- Focus visible — Native focus ring support for keyboard navigation
- ARIA attributes — Supports all standard button ARIA props
- Disabled state — Proper
disabledattribute handling with visual feedback
| Key | Action |
|---|---|
Enter / Space | Activates the button |
Tab | Moves focus to next element |
Credits
- Credit to shadcn/ui, and animate-ui for style inspiration.
Built by raouf.codes. The source code is available on GitHub.
Last updated: 3/21/2026