Floating Action Button

Intermediate

Modern floating action button with smooth animations, expandable menu options, and elegant hover effects. Perfect for mobile-first applications and quick actions.

Live Preview

Code Implementation

HTML
<div class="fab-container">
  <!-- Main FAB Button -->
  <button class="fab-main" id="fabMain" aria-label="Main action menu">
    <span class="fab-icon main-icon">+</span>
    <span class="fab-icon close-icon">Γ—</span>
  </button>
  
  <!-- FAB Menu Items -->
  <div class="fab-menu" id="fabMenu">
    <button class="fab-item" data-action="message" aria-label="Send message">
      <span class="fab-icon">πŸ’¬</span>
      <span class="fab-tooltip">Message</span>
    </button>
    
    <button class="fab-item" data-action="call" aria-label="Make a call">
      <span class="fab-icon">πŸ“ž</span>
      <span class="fab-tooltip">Call</span>
    </button>
    
    <button class="fab-item" data-action="email" aria-label="Send email">
      <span class="fab-icon">βœ‰οΈ</span>
      <span class="fab-tooltip">Email</span>
    </button>
    
    <button class="fab-item" data-action="share" aria-label="Share content">
      <span class="fab-icon">πŸ”—</span>
      <span class="fab-tooltip">Share</span>
    </button>
  </div>
  
  <!-- Background Overlay -->
  <div class="fab-overlay" id="fabOverlay"></div>
</div>

Snippet Features

Responsive Design: Yes
Dark Mode Support: Yes
Category: interactive
Difficulty Level: Intermediate