Component
Animated Arrow Button
Arrow slide animations on hover for navigation
- Component
- Tailwind
- MIT
Preview
Live component
9:41 100%
devsnips.dev/library/tailwind/components/buttons/animated-button/arrow/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Buttons/animated-button/arrow Tailwind/Components/Buttons/animated-button/arrow <!-- Arrow Button - Slide Right -->
<button class="group px-6 py-2.5 bg-blue-600 text-white font-medium rounded-lg flex items-center gap-2 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all">
<span>Shop Now</span>
<svg class="w-5 h-5 transition-transform group-hover:translate-x-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 8l4 4m0 0l-4 4m4-4H3"/>
</svg>
</button>
<!-- Arrow Button - Slide Left -->
<button class="group px-6 py-2.5 bg-gray-800 text-white font-medium rounded-lg flex items-center gap-2 hover:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-gray-500 transition-all">
<svg class="w-5 h-5 transition-transform group-hover:-translate-x-1" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16l-4-4m0 0l4-4m-4 4h18"/>
</svg>
<span>Go Back</span>
</button> # Animated Button Arrow
Button with an animated arrow indicator on hover/focus.
## Preview
Open `preview.html` for a standalone demonstration of this variant.
## Features
- Arrow animation on interaction
- CSS transitions
- Focus-visible states
- Native button
## Usage
```bash
npx devsnips add Tailwind/Components/Buttons/animated-button/arrow
```
Copy from `code.html`. No JavaScript required for the core animation.
## Customization
- Arrow icon / transform classes
- Colors, spacing, typography
- Transition duration
## Accessibility
- Native `<button>`
- Focus-visible styles
## Dependencies
- Tailwind CSS only
## File Structure
- `code.html` — copy/paste snippet
- `preview.html` — standalone demo
- `metadata.json` — metadata
- `README.md` — this file 15 lines UTF-8 · LF · Spaces: 2
Continue browsing