Component
Floating Action Button Standard
Standard floating action buttons (FAB)
- Component
- Tailwind
- MIT
Preview
Live component
9:41 100%
devsnips.dev/library/tailwind/components/buttons/floating-action-button/standard/ fluid · no fixed width 100%
Install
Add to your project
npx devsnips add Tailwind/Components/Buttons/floating-action-button/standard Tailwind/Components/Buttons/floating-action-button/standard <!-- FAB - Primary -->
<button class="p-4 bg-blue-600 text-white rounded-full shadow-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>
</svg>
</button>
<!-- FAB - Outline -->
<button class="p-3 bg-white text-blue-600 border-2 border-blue-600 rounded-full shadow-lg hover:bg-blue-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>
</svg>
</button>
<!-- FAB - Pink -->
<button class="p-3 bg-pink-500 text-white rounded-full shadow-lg hover:bg-pink-600 focus:outline-none focus:ring-2 focus:ring-pink-400 focus:ring-offset-2 transition-all">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"/>
</svg>
</button> # Floating Action Button Standard
Standard circular floating action button.
## Preview
Open `preview.html` for a standalone demonstration of this variant.
## Features
- Circular FAB
- Elevation / shadow
- Focus-visible states
## Usage
```bash
npx devsnips add Tailwind/Components/Buttons/floating-action-button/standard
```
Copy from `code.html`. Position as needed in your layout.
## Customization
- Size, colors, shadow
- Icon
## Accessibility
- Native `<button>` with `aria-label` if icon-only
## Dependencies
- Tailwind CSS only
## File Structure
- `code.html` — copy/paste snippet
- `preview.html` — standalone demo
- `metadata.json` — metadata
- `README.md` — this file 20 lines UTF-8 · LF · Spaces: 2
Continue browsing