navigation

Tab Interface

An accessible tab panel with keyboard navigation and animated indicator.

tabs interface animation | GPT 5.3 Ultra

Prompt

# Role
You are a Senior Frontend Developer specializing in accessible interactive components and smooth micro-interactions.

# Objective
Build an accessible tab interface with animated active indicator, keyboard navigation, and proper ARIA attributes — suitable for content organization and settings panels.

# Instructions
1. Create the tab container:
   - Horizontal tab list using `<div role="tablist">`
   - Vertical arrangement option (tab list on left, content on right)
2. Build the tab buttons:
   - 4–5 tabs with descriptive labels
   - Each tab has `role="tab"`, `aria-selected`, `aria-controls`
   - Active tab visually distinct (bold, accent underline or background)
   - Hover state with subtle background change
3. Create the tab panels:
   - Each panel has `role="tabpanel"` and `aria-labelledby` pointing to its tab
   - Content areas with realistic text content
   - Hidden panels use `hidden` attribute; visible panel is displayed
4. Implement animated active indicator:
   - Sliding underline or background that moves to the active tab
   - Smooth transition (200–300ms ease)
   - Indicator width matches tab text width
5. Add keyboard navigation:
   - Arrow keys (←/→) to switch tabs
   - Home/End to jump to first/last tab
   - Enter/Space to activate focused tab

# Constraints
- Proper ARIA pattern: `tablist`, `tab`, `tabpanel` roles
- `tabindex` management: active tab has `tabindex="0"`, others have `tabindex="-1"`
- Focus visible styles for keyboard users
- Tailwind CSS only — no custom CSS
- Smooth animated indicator with CSS transitions

# Output Format
- Single HTML file using Tailwind CSS CDN
- Include 4 tabs with distinct content
- Well-commented code with clear section separation

Notes

Prompt

Role

You are a Senior Frontend Developer specializing in accessible interactive components and smooth micro-interactions.

Objective

Build an accessible tab interface with animated active indicator, keyboard navigation, and proper ARIA attributes — suitable for content organization and settings panels.

Instructions

  1. Create the tab container:
    • Horizontal tab list using <div role="tablist">
    • Vertical arrangement option (tab list on left, content on right)
  2. Build the tab buttons:
    • 4–5 tabs with descriptive labels
    • Each tab has role="tab", aria-selected, aria-controls
    • Active tab visually distinct (bold, accent underline or background)
    • Hover state with subtle background change
  3. Create the tab panels:
    • Each panel has role="tabpanel" and aria-labelledby pointing to its tab
    • Content areas with realistic text content
    • Hidden panels use hidden attribute; visible panel is displayed
  4. Implement animated active indicator:
    • Sliding underline or background that moves to the active tab
    • Smooth transition (200–300ms ease)
    • Indicator width matches tab text width
  5. Add keyboard navigation:
    • Arrow keys (←/→) to switch tabs
    • Home/End to jump to first/last tab
    • Enter/Space to activate focused tab

Constraints

  • Proper ARIA pattern: tablist, tab, tabpanel roles
  • tabindex management: active tab has tabindex="0", others have tabindex="-1"
  • Focus visible styles for keyboard users
  • Tailwind CSS only — no custom CSS
  • Smooth animated indicator with CSS transitions

Output Format

  • Single HTML file using Tailwind CSS CDN
  • Include 4 tabs with distinct content
  • Well-commented code with clear section separation

Notes

  • The animated indicator is a nice touch but must not replace proper ARIA — focus on accessibility first.
  • tabindex="-1" on inactive tabs allows programmatic focus without being in the tab order.
  • Perfect for settings pages, documentation, and dashboard content organization.

Related Prompts

View prompt details

Breadcrumb Navigation

A responsive breadcrumb trail with hover states and structured hierarchy.

# Role You are a Senior Frontend Developer specializing in accessible navigation patterns and semantic markup for SEO. # Objective Build a responsive breadcrumb navigation component with proper hierarchy indication, hover states, and structured markup — optimized for accessibility and SEO. # Instructions 1. Create the breadcrumb container: - Use semantic `<nav>` element with `aria-label="Breadcrumb"` - Structured list using `<ol>` with `<li>` items - Separator between items: chevron (›) or forward slash 2. Implement each breadcrumb item: - First item: "Home" with house icon, links to homepage - Middle items: category/page names linking to their pages - Last item: current page (non-linked, bold, muted color) 3. Add visual hierarchy: - Subtle background or pill shape for the container - Hover effect: underline or color change on links - Current page has distinct styling (bold, different color) 4. Ensure proper nesting: - Support 3–5 levels of depth - Truncate long names with ellipsis if needed 5. Style with Tailwind CSS in dark mode: - Muted text colors, accent color on hover - Small, readable font size - Consistent spacing between items # Constraints - Semantic HTML with proper list structure — never use `<div>` chains for breadcrumbs - Add schema.org structured data (JSON-LD) for SEO - Keyboard navigable: Tab through links, Enter to activate - Responsive: horizontally scroll on small screens if needed - Tailwind CSS only — no custom CSS # Output Format - Single HTML file using Tailwind CSS CDN - Include JSON-LD schema markup - Well-structured markup with comments

breadcrumb navigation seo
Claude 4.6 Sonnet
View prompt details

Developer Dashboard Header

Dense top navigation for dev tools

# Role You are a Senior Frontend Developer specializing in accessible UI, developer-focused tooling, and information-dense navigation design. # Objective Build a compact top navigation bar for a developer-focused dashboard tool — featuring monospace breadcrumbs, a search input with keyboard shortcut hint, and a user avatar dropdown — inspired by Vercel/Linear design language. # Instructions 1. Create a fixed top navigation bar: - Full width, exactly 48px height — no wasted space - Dark background with bottom border: `1px solid rgba(255, 255, 255, 0.08)` - Three sections: left (breadcrumbs), center (search), right (user) 2. Build the breadcrumb navigation (left section): - Implement as an unstyled `<ol>` with `display: inline-flex` - Monospace font for all breadcrumb text - Separator: subtle forward slashes (`/`) in muted color between items - Active (last) breadcrumb in full-brightness text; previous items muted - Example: `{{TOOL_NAME}} / Projects / Settings` 3. Add the search input (center section): - Compact input with search icon and `⌘K` keyboard shortcut badge - Muted placeholder text: "Search..." - Input styled with subtle background and border on focus - Shortcut badge as a `<kbd>` element inside the input area 4. Build the user section (right section): - Small avatar circle (32px) with user image or initials - Dropdown trigger: chevron icon beside the avatar - On click: dropdown menu with user options (Profile, Settings, Logout) 5. Use `{{FRAMEWORK}}` and `{{CSS_TOOL}}` as specified by the user: - Template variables allow customization for any stack # Constraints - Height must be exactly 48px — do not exceed - Monospace font for breadcrumbs and technical labels - Breadcrumbs as semantic `<ol>` with `inline-flex` — not concatenated strings - Must be keyboard-accessible: Tab through interactive elements - Dark mode only, Vercel/Linear aesthetic - Responsive: hide breadcrumb text on mobile, show only icons # Output Format - Single HTML file with embedded styles - Use `{{FRAMEWORK}}`, `{{CSS_TOOL}}`, and `{{TOOL_NAME}}` template variables for customization - Well-commented code with clear structural sections

Personalize Prompt 3 vars
header dense breadcrumbs
Gemini 3.1 Pro
View prompt details

Mega Menu Navigation

Full-width dropdown menu with categorized links.

# Role You are a Senior Frontend Developer specializing in accessible UI components, navigation patterns, and complex interactive menus. # Objective Build a full-width mega menu navigation system with categorized link columns, a featured content section, and smooth open/close transitions — fully accessible and keyboard-navigable. # Instructions 1. Create the top-level navigation bar: - Horizontal bar with 4–5 top-level menu items - Fixed or sticky positioning at the top of the page - Dark background with consistent height (56–64px) 2. Build the mega menu dropdown panel: - Triggers on hover over a top-level item - Full-width panel that slides down with smooth height transition - Divided into 3–4 content columns 3. Structure each column: - Section title (bold, uppercase or semi-bold) - List of 4–6 navigation links beneath each title - Links with hover color transition 4. Add a featured section: - Rightmost column contains an image card or promotional block - Image with overlay text and a CTA link - Visually distinct from the link columns 5. Implement interaction behavior: - Hover to open with a 150ms delay before closing (prevents accidental close) - Use `pointer-events` management to prevent flicker when moving between nav item and dropdown - Click outside the menu to close - Escape key to close - Smooth height/opacity transition on open and close # Constraints - Semantic HTML: `<nav>`, `<ul>`, `<li>`, `<a>` elements - Full keyboard navigation: Tab through items, Enter to open, arrow keys within dropdown - Add ARIA attributes: `aria-expanded`, `aria-haspopup`, `role="menu"` - No external dependencies — vanilla HTML, CSS, and JavaScript - Must work without JavaScript for basic link navigation (progressive enhancement) - Dark mode design # Output Format - Single HTML file with embedded `<style>` and `<script>` blocks - Include realistic placeholder navigation content (SaaS product categories) - Well-commented code with clear separation of structure, style, and behavior

menu navigation dropdown +1
Claude 4.6 Opus
View prompt details

Command Palette

A ⌘K search bar with recent searches.

# Role You are a Senior Frontend Developer specializing in accessible UI, search interfaces, and keyboard-driven interaction patterns. # Objective Build a command palette (⌘K) search component with recent searches, categorized results, keyboard navigation, and a polished dark-mode design — inspired by tools like VS Code, Linear, and Raycast. # Instructions 1. Create the command palette trigger: - Open with `⌘K` (Mac) or `Ctrl+K` (Windows/Linux) keyboard shortcut - Centered modal overlay with backdrop blur - Smooth entrance animation (fade + scale) 2. Build the search input: - Full-width input at the top of the palette - Search icon on the left, keyboard shortcut hint on the right - Auto-focus on open - Clear button (×) when input has text 3. Display search results: - **Recent searches** section shown when input is empty - **Categorized results** when typing: Pages, Actions, Settings (grouped with headers) - Each result row: icon + label + optional description + keyboard shortcut hint - Highlighted active/selected row 4. Implement keyboard navigation: - Arrow Up/Down to move between results - Enter to select the active result - Escape to close the palette - Tab to cycle through result categories 5. Close behavior: - Escape key - Click on backdrop - After selecting a result 6. Style with Tailwind CSS in dark mode: - Dark modal background, subtle border - Muted section headers, bright result text - Accent highlight on active row # Constraints - Use Tailwind CSS for all styling - Semantic HTML with `role="dialog"`, `role="listbox"`, `aria-activedescendant` - No external dependencies for search logic — filter from a static list - Palette max-width: 640px, max-height: 400px with scrollable results - Must be fully keyboard-navigable — mouse is optional - Include at least 10 sample searchable items across 3 categories # Output Format - Single HTML file using Tailwind CSS CDN - Embedded JavaScript for keyboard handling and filtering - Well-commented code with clear sections for markup, styles, and behavior

search cmdk palette
Claude 4.6 Opus