Search

Grid Flyouts

Flyout Menu with Descriptions

A flyout menu with detailed descriptions for each item. Perfect for feature-rich navigation with explanatory text.

Features

  • Multi-column grid layout - Organized content in responsive grids
  • Item descriptions - Detailed text for each menu item
  • Call-to-action sections - Prominent CTAs with descriptions
  • Responsive design - Adapts from single to multi-column on larger screens
  • Enhanced hover states - Interactive feedback on all elements
  • Mixed content types - Icons, text, links, and buttons

Usage

---
import GridFlyout from '/src/components/flyouts/GridFlyout.astro'
---

<!-- Basic usage -->
<GridFlyout />

<!-- With initial state -->
<GridFlyout open={true} />

Customization

Grid Layout

Modify the grid classes to change column structure:

<!-- 3 columns on large screens -->
<div class="p-4 grid grid-cols-1 lg:grid-cols-3 gap-4">
  <!-- Content -->
</div>

<!-- Different gap sizes -->
<div class="p-4 grid grid-cols-1 lg:grid-cols-2 gap-8">
  <!-- Content -->
</div>

Content Sections

Add or remove sections as needed:

<div class="p-4">
  <h3 class="text-base font-medium text-zinc-900 dark:text-white">
    Your Section Title
  </h3>
  <div class="pt-4 mt-4 border-t border-zinc-200 dark:border-zinc-700 space-y-2">
    <a href="#" class="text-base block font-medium hover:text-zinc-600 dark:hover:text-zinc-300 text-zinc-500 dark:text-zinc-400">
      Your link item
    </a>
  </div>
</div>

Call-to-Action

Customize the CTA section:

<div class="p-4 pt-0">
  <div class="items-end p-8 shadow grid grid-cols-1 md:grid-cols-2 bg-linear-to-r from-blue-50 to-indigo-100 dark:from-blue-900 dark:to-indigo-900 rounded-xl">
    <div class="md:col-span-1">
      <h2 class="text-lg font-semibold text-zinc-900 dark:text-white">
        Your CTA Title
      </h2>
      <p class="text-base mt-2 font-medium text-zinc-500 dark:text-zinc-400">
        Your CTA description
      </p>
    </div>
    <button class="relative flex items-center justify-center text-center font-medium rounded-md text-white bg-blue-600 hover:bg-blue-700 h-9 px-4 text-sm mt-4">
      Your CTA Button
    </button>
  </div>
</div>

Best Practices

  • Content organization - Group related items together
  • Visual hierarchy - Use clear headings and descriptions
  • Mobile optimization - Ensure single-column layout works well on mobile
  • Action clarity - Make CTAs prominent and descriptive
  • Accessibility - Maintain proper focus order and ARIA labels

Back to Flyout Menus