Docs

Main site

Installation Browser support Extend config MCP server
Validation Page speed testing Responsive design
Accordion Aspect Ratio Avatar Badge Banner Bento Grid Blockquote Breadcrumbs Button Callout Card Drawer Dropdown Link Modal Navbar Navblock Pagination Popover Progress Separator Tabs Timeline Toast Tooltip
Checkbox Datepicker File upload Form field Input Label OTP Radio Range Select Textarea Toggle
Header Footer
Accordion Auth Checkbox & Radio Content Drawers Features Modals Statistics & Metrics Teams Dropdowns
Address Contact number Currency symbol Date Emirates ID Name
Close
Home Documentation Blocks Dropdowns

Dropdowns

Dropdown blocks built on aegov-dropdown: menus anchored to a trigger, such as an account menu or an app menu, that open on click and work fully from the keyboard.

Dropdown Example 01

An account menu opened from the avatar: who is signed in and that their identity is verified, how much document storage is used with a quick way to manage it, the account pages, and signing out set apart at the end.

Get code

Dropdown Example 01

HTML
<div class="min-h-[max(100dvh,34rem)] bg-aeblack-50">
  <div class="flex items-center justify-between gap-4 border-b border-aeblack-100 bg-white px-4 py-3 sm:px-8">
    <div role="img" aria-label="Logo" class="relative flex h-10 w-32 items-center justify-center overflow-hidden rounded-lg border-2 border-dashed border-aeblack-200 bg-white">
      <svg aria-hidden="true" class="absolute inset-0 size-full text-aeblack-200" preserveAspectRatio="none" viewBox="0 0 100 100" fill="none"><line x1="0" y1="0" x2="100" y2="100" stroke="currentColor" stroke-width="1" vector-effect="non-scaling-stroke"/><line x1="100" y1="0" x2="0" y2="100" stroke="currentColor" stroke-width="1" vector-effect="non-scaling-stroke"/></svg>
      <span aria-hidden="true" class="relative rounded bg-white px-2 text-sm font-semibold text-aeblack-500">Logo</span>
    </div>
    <aegov-dropdown align="end">
      <button type="button" aria-label="Account menu for Mohammed Al Mansouri" class="flex items-center gap-2 rounded-full p-0.5 pe-2 ring-1 ring-aeblack-100 hover:bg-aeblack-50">
        <img src="/storage/blocks/team/person-1.webp" alt="" width="800" height="800" class="size-9 rounded-full object-cover">
        <svg aria-hidden="true" class="size-4 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
      </button>
      <div slot="dropdown-content" class="w-72 sm:w-80">
        <div class="flex items-center gap-3 px-3 py-2.5">
          <span class="relative shrink-0">
            <img src="/storage/blocks/team/person-1.webp" alt="" width="800" height="800" class="size-10 rounded-full object-cover">
            <span aria-hidden="true" class="absolute -end-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-aegreen-600 text-white ring-2 ring-white"><svg aria-hidden="true" class="size-2.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg></span>
          </span>
          <span class="min-w-0 flex-1">
            <span class="block truncate text-sm font-semibold text-aeblack-900">Mohammed Al Mansouri</span>
            <span class="block truncate text-xs text-aeblack-600">mohammed.almansouri@example.ae</span>
          </span>
          <aegov-badge variant="aegreen" size="sm">Verified</aegov-badge>
        </div>
        <hr class="my-1.5 border-aeblack-100">
        <div class="px-3 py-2.5">
          <div class="flex items-center justify-between gap-3">
            <span class="min-w-0">
              <span class="block text-sm font-semibold text-aeblack-900">Document storage</span>
              <span class="block text-xs text-aeblack-600">1.2 GB of 2 GB used</span>
            </span>
            <a href="#storage" class="mb-0! shrink-0 rounded-lg bg-aeblack-100 px-3 py-1.5 text-sm font-semibold text-aeblack-900! no-underline hover:bg-aeblack-200">Manage<span class="sr-only"> document storage, 1.2 GB of 2 GB used</span></a>
          </div>
          <div aria-hidden="true" class="mt-2.5 h-1.5 overflow-hidden rounded-full bg-aeblack-100"><div class="h-full w-3/5 rounded-full bg-aeblack-800"></div></div>
        </div>
        <hr class="my-1.5 border-aeblack-100">
        <a href="#profile" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/></svg><span class="flex-1">My profile</span></a>
        <a href="#settings" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg><span class="flex-1">Settings</span></a>
        <a href="#documents" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"/></svg><span class="flex-1">My documents</span></a>
        <a href="#payments" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="5" width="20" height="14" rx="2"/><path d="M2 10h20"/></svg><span class="flex-1">Payments</span></a>
        <a href="#app" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><span aria-hidden="true" class="flex size-5 shrink-0 items-center justify-center rounded-md bg-primary-600 text-white"><svg aria-hidden="true" class="size-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="2" width="14" height="20" rx="2"/><path d="M12 18h.01"/></svg></span><span class="flex-1">Get the mobile app</span></a>
        <hr class="my-1.5 border-aeblack-100">
        <a href="#sign-out" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9"/></svg><span class="flex-1">Sign out</span></a>
      </div>
    </aegov-dropdown>
  </div>
  <div aria-hidden="true" class="mx-auto max-w-5xl px-4 py-8 sm:px-8">
    <div class="h-5 w-56 rounded-full bg-aeblack-200"></div>
    <div class="mt-3 h-3 w-80 max-w-full rounded-full bg-aeblack-100"></div>
    <div class="mt-8 grid gap-4 sm:grid-cols-3"><div class="h-28 rounded-2xl bg-white ring-1 ring-aeblack-950/5"></div><div class="h-28 rounded-2xl bg-white ring-1 ring-aeblack-950/5"></div><div class="h-28 rounded-2xl bg-white ring-1 ring-aeblack-950/5"></div></div>
  </div>
</div>

Uses the UAE Design System web components. Load the theme, base CSS and component loader first. See installation.

Dropdown Example 02

An app menu: the main pages, with a count on Messages, a labelled Support group, and signing out set apart at the end.

Get code

Dropdown Example 02

HTML
<div class="min-h-[max(100dvh,34rem)] bg-aeblack-50">
  <div class="flex items-center justify-between gap-4 border-b border-aeblack-100 bg-white px-4 py-3 sm:px-8">
    <div role="img" aria-label="Logo" class="relative flex h-10 w-32 items-center justify-center overflow-hidden rounded-lg border-2 border-dashed border-aeblack-200 bg-white">
      <svg aria-hidden="true" class="absolute inset-0 size-full text-aeblack-200" preserveAspectRatio="none" viewBox="0 0 100 100" fill="none"><line x1="0" y1="0" x2="100" y2="100" stroke="currentColor" stroke-width="1" vector-effect="non-scaling-stroke"/><line x1="100" y1="0" x2="0" y2="100" stroke="currentColor" stroke-width="1" vector-effect="non-scaling-stroke"/></svg>
      <span aria-hidden="true" class="relative rounded bg-white px-2 text-sm font-semibold text-aeblack-500">Logo</span>
    </div>
    <aegov-dropdown align="end">
      <aegov-button variant="neutral-max" appearance="outline" size="base">
        <svg aria-hidden="true" class="" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/></svg>
        Menu
        <svg aria-hidden="true" class="" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>
      </aegov-button>
      <div slot="dropdown-content" class="w-64">
        <a href="#dashboard" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M9 21V9"/></svg><span class="flex-1">Dashboard</span></a>
        <a href="#messages" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg><span class="flex-1">Messages</span><span class="sr-only">, </span><aegov-badge variant="aered" size="sm">3<span class="sr-only"> unread</span></aegov-badge></a>
        <a href="#settings" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/></svg><span class="flex-1">Settings</span></a>
        <a href="#services" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/></svg><span class="flex-1">Connected services</span></a>
        <div role="group" aria-labelledby="dropdown-support-label">
          <p id="dropdown-support-label" class="px-3 pt-3 pb-1 text-xs font-semibold tracking-wide text-aeblack-600 uppercase">Support</p>
          <a href="#guides" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20"/></svg><span class="flex-1">Guides</span></a>
          <a href="#help" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3M12 17h.01"/></svg><span class="flex-1">Help centre</span></a>
        </div>
        <hr class="my-1.5 border-aeblack-100">
        <a href="#sign-out" class="flex! mb-0! w-full items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-aeblack-800! no-underline hover:bg-aeblack-50 focus-visible:bg-aeblack-50"><svg aria-hidden="true" class="size-5 shrink-0 text-aeblack-600" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9"/></svg><span class="flex-1">Sign out</span></a>
      </div>
    </aegov-dropdown>
  </div>
  <div aria-hidden="true" class="mx-auto max-w-5xl px-4 py-8 sm:px-8">
    <div class="h-5 w-56 rounded-full bg-aeblack-200"></div>
    <div class="mt-3 h-3 w-80 max-w-full rounded-full bg-aeblack-100"></div>
    <div class="mt-8 grid gap-4 sm:grid-cols-3"><div class="h-28 rounded-2xl bg-white ring-1 ring-aeblack-950/5"></div><div class="h-28 rounded-2xl bg-white ring-1 ring-aeblack-950/5"></div><div class="h-28 rounded-2xl bg-white ring-1 ring-aeblack-950/5"></div></div>
  </div>
</div>

Uses the UAE Design System web components. Load the theme, base CSS and component loader first. See installation.

Dropdown Example 03

A navigation mega menu for Services, opened from the main navigation: the service categories as cards with a short description, and a help and support column with a call to action. It opens on hover and from the keyboard.

Get code

Dropdown Example 03

HTML
<div class="min-h-[max(100dvh,32rem)] bg-white">
  <div class="border-b border-aeblack-100">
    <div class="px-4 pt-3 sm:px-8">
    <div role="img" aria-label="Logo" class="relative flex h-10 w-32 items-center justify-center overflow-hidden rounded-lg border-2 border-dashed border-aeblack-200 bg-white">
      <svg aria-hidden="true" class="absolute inset-0 size-full text-aeblack-200" preserveAspectRatio="none" viewBox="0 0 100 100" fill="none"><line x1="0" y1="0" x2="100" y2="100" stroke="currentColor" stroke-width="1" vector-effect="non-scaling-stroke"/><line x1="100" y1="0" x2="0" y2="100" stroke="currentColor" stroke-width="1" vector-effect="non-scaling-stroke"/></svg>
      <span aria-hidden="true" class="relative rounded bg-white px-2 text-sm font-semibold text-aeblack-500">Logo</span>
    </div>
    </div>
    <div class="overflow-x-auto px-2 sm:px-6">
      <aegov-navbar label-nav="Main navigation" gap="gap-1 xl:gap-2" size="sm">
        <aegov-navbar-item href="#home" is-active="true">
          <span slot="icon-start"><svg class="size-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"><path d="M104,216V152h48v64h64V120a8,8,0,0,0-2.34-5.66l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,40,120v96Z"/></svg></span>
          Home
        </aegov-navbar-item>
        <aegov-navbar-item href="#services">
          Services
        <aegov-dropdown slot="dropdown" trigger="hover" position="bottom" align="center" data-preview-open>
          <div slot="dropdown-content" class="-m-2 grid w-[min(38rem,calc(100vw-3rem))] grid-cols-1 overflow-hidden rounded-lg sm:grid-cols-5">
            <div class="px-3 py-5 sm:col-span-3">
              <p class="px-2 pb-3 text-xs tracking-wide text-aeblack-600 uppercase">Service category</p>
              <ul role="list" class="space-y-4">
              <li class="group relative flex items-start gap-4 rounded-xl p-2 transition-colors hover:bg-aeblack-50">
                <span class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-primary-50"><svg class="size-6 text-primary-700" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"><circle cx="128" cy="96" r="64"/><path d="M32,216c19.37-33.47,54.55-56,96-56s76.63,22.53,96,56"/></svg></span>
                <span class="grow">
                  <a href="#individuals" class="block! mb-0! text-base font-medium text-aeblack-800! no-underline after:absolute after:inset-0 after:z-10 after:rounded-xl group-hover:text-primary-800! focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600">Individuals</a>
                  <span class="mt-0.5 block text-sm text-aeblack-600">Services for residents and citizens, from licences to complaints.</span>
                </span>
              </li>
              <li class="group relative flex items-start gap-4 rounded-xl p-2 transition-colors hover:bg-aeblack-50">
                <span class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-primary-50"><svg class="size-6 text-primary-700" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"><path d="M48,139.59V208a8,8,0,0,0,8,8H200a8,8,0,0,0,8-8V139.59"/><path d="M54,40H202a8,8,0,0,1,7.69,5.8L224,96H32L46.34,45.8A8,8,0,0,1,54,40Z"/><path d="M96,96v16a32,32,0,0,1-64,0V96"/><path d="M160,96v16a32,32,0,0,1-64,0V96"/><path d="M224,96v16a32,32,0,0,1-64,0V96"/></svg></span>
                <span class="grow">
                  <a href="#businesses" class="block! mb-0! text-base font-medium text-aeblack-800! no-underline after:absolute after:inset-0 after:z-10 after:rounded-xl group-hover:text-primary-800! focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600">Businesses</a>
                  <span class="mt-0.5 block text-sm text-aeblack-600">Services that help companies register, renew and trade.</span>
                </span>
              </li>
              <li class="group relative flex items-start gap-4 rounded-xl p-2 transition-colors hover:bg-aeblack-50">
                <span class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-primary-50"><svg class="size-6 text-primary-700" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"><line x1="16" y1="216" x2="240" y2="216"/><path d="M40,216V104L128,40l88,64V216"/><line x1="88" y1="216" x2="88" y2="128"/><line x1="128" y1="216" x2="128" y2="128"/><line x1="168" y1="216" x2="168" y2="128"/></svg></span>
                <span class="grow">
                  <a href="#government" class="block! mb-0! text-base font-medium text-aeblack-800! no-underline after:absolute after:inset-0 after:z-10 after:rounded-xl group-hover:text-primary-800! focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600">Government</a>
                  <span class="mt-0.5 block text-sm text-aeblack-600">Requests between government entities.</span>
                </span>
              </li>
              </ul>
            </div>
            <div class="bg-aeblack-50 px-6 py-6 sm:col-span-2">
              <p class="mb-4 text-lg font-bold text-aeblack-800">Help and support</p>
              <ul role="list" class="space-y-2.5">
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#complaints" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Complaints</a>
              </li>
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#disputes" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Dispute resolution</a>
              </li>
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#enquiries" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">General enquiries</a>
              </li>
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#suggestion" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Submit a suggestion</a>
              </li>
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#spam" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Report spam messages</a>
              </li>
              </ul>
              <div class="relative isolate mt-6 overflow-hidden rounded-xl bg-primary-900 p-4 text-whitely-50">
                <div aria-hidden="true" class="absolute -top-10 -end-8 -z-10 size-32 rounded-full bg-radial from-aered-500/40 to-transparent blur-xl"></div>
                <span aria-hidden="true" class="flex size-9 items-center justify-center rounded-lg bg-white/10 ring-1 ring-white/15"><svg class="size-6" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"><path d="M40,114.79V56a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8v58.77c0,84.18-71.31,112.07-85.54,116.8a7.54,7.54,0,0,1-4.92,0C111.31,226.86,40,199,40,114.79Z"/><polyline points="88 136 112 160 168 104"/></svg></span>
                <p class="mt-3 text-sm font-semibold">Spotted a scam?</p>
                <p class="mt-1 text-xs text-whitely-50/80">Report a suspicious call or message in two minutes.</p>
                <a href="#report-scam" class="mt-2 mb-0! inline-block! text-sm font-semibold text-white! underline">Report it</a>
              </div>
            </div>
          </div>
        </aegov-dropdown>
        </aegov-navbar-item>
        <aegov-navbar-item href="#participate">Have your say</aegov-navbar-item>
        <aegov-navbar-item href="#open-data">
          Open data

        </aegov-navbar-item>
        <aegov-navbar-item href="#about">About</aegov-navbar-item>
      </aegov-navbar>
    </div>
  </div>
  <div aria-hidden="true" class="mx-auto max-w-5xl px-4 py-10 sm:px-8">
    <div class="mx-auto h-8 w-96 max-w-full rounded-full bg-aeblack-100"></div>
    <div class="mx-auto mt-4 h-3 w-80 max-w-full rounded-full bg-aeblack-50"></div>
    <div class="mx-auto mt-2 h-3 w-64 max-w-full rounded-full bg-aeblack-50"></div>
  </div>
</div>

Uses the UAE Design System web components. Load the theme, base CSS and component loader first. See installation.

Dropdown Example 04

A navigation menu for Open data in two columns: data and research links, and a tinted column for policy and requests, with external links marked as opening in a new tab.

Get code

Dropdown Example 04

HTML
<div class="min-h-[max(100dvh,32rem)] bg-white">
  <div class="border-b border-aeblack-100">
    <div class="px-4 pt-3 sm:px-8">
    <div role="img" aria-label="Logo" class="relative flex h-10 w-32 items-center justify-center overflow-hidden rounded-lg border-2 border-dashed border-aeblack-200 bg-white">
      <svg aria-hidden="true" class="absolute inset-0 size-full text-aeblack-200" preserveAspectRatio="none" viewBox="0 0 100 100" fill="none"><line x1="0" y1="0" x2="100" y2="100" stroke="currentColor" stroke-width="1" vector-effect="non-scaling-stroke"/><line x1="100" y1="0" x2="0" y2="100" stroke="currentColor" stroke-width="1" vector-effect="non-scaling-stroke"/></svg>
      <span aria-hidden="true" class="relative rounded bg-white px-2 text-sm font-semibold text-aeblack-500">Logo</span>
    </div>
    </div>
    <div class="overflow-x-auto px-2 sm:px-6">
      <aegov-navbar label-nav="Main navigation" gap="gap-1 xl:gap-2" size="sm">
        <aegov-navbar-item href="#home" is-active="true">
          <span slot="icon-start"><svg class="size-4" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"><path d="M104,216V152h48v64h64V120a8,8,0,0,0-2.34-5.66l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,40,120v96Z"/></svg></span>
          Home
        </aegov-navbar-item>
        <aegov-navbar-item href="#services">
          Services

        </aegov-navbar-item>
        <aegov-navbar-item href="#participate">Have your say</aegov-navbar-item>
        <aegov-navbar-item href="#open-data">
          Open data
        <aegov-dropdown slot="dropdown" trigger="hover" position="bottom" align="center" data-preview-open>
          <div slot="dropdown-content" class="-m-2 w-[min(36rem,calc(100vw-3rem))] overflow-hidden rounded-lg">
            <div class="grid grid-cols-1 sm:grid-cols-5">
              <div class="p-5 sm:col-span-3">
                <p class="pb-3 text-xs tracking-wide text-aeblack-600 uppercase">Data and research</p>
                <ul role="list" class="space-y-2.5">
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#numbers" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Numbers and statistics</a>
              </li>
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#charts" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Open data charts</a>
              </li>
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#statistics" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Statistics</a>
              </li>
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#datasets" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Download datasets</a>
              </li>
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="https://example.gov.ae/survey" target="_blank" rel="noopener noreferrer" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Open data survey<svg class="size-3.5 shrink-0 text-aeblack-600 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="216 104 216 40 152 40" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/><line x1="136" y1="120" x2="216" y2="40" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/><path d="M184,144v64a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8h64" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg><span class="sr-only">, opens in a new tab</span></a>
              </li>
                </ul>
              </div>
              <div class="bg-primary-50 p-5 sm:col-span-2">
                <p class="pb-3 text-xs tracking-wide text-aeblack-600 uppercase">Policy and requests</p>
                <ul role="list" class="space-y-2.5">
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#policy" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Open data usage policy</a>
              </li>
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="#request" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Propose or request data</a>
              </li>
              <li class="flex items-center gap-3">
                <svg class="size-3 shrink-0 text-primary-700 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="96 48 176 128 96 208" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg>
                <a href="https://bayanat.ae" target="_blank" rel="noopener noreferrer" class="mb-0! inline-flex! items-center gap-1.5 text-sm font-medium text-aeblack-800! no-underline hover:underline">Bayanat.ae<svg class="size-3.5 shrink-0 text-aeblack-600 rtl:-scale-x-100" viewBox="0 0 256 256" aria-hidden="true"><polyline points="216 104 216 40 152 40" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/><line x1="136" y1="120" x2="216" y2="40" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/><path d="M184,144v64a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8h64" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="20"/></svg><span class="sr-only">, opens in a new tab</span></a>
              </li>
                </ul>
              </div>
            </div>
          </div>
        </aegov-dropdown>
        </aegov-navbar-item>
        <aegov-navbar-item href="#about">About</aegov-navbar-item>
      </aegov-navbar>
    </div>
  </div>
  <div aria-hidden="true" class="mx-auto max-w-5xl px-4 py-10 sm:px-8">
    <div class="mx-auto h-8 w-96 max-w-full rounded-full bg-aeblack-100"></div>
    <div class="mx-auto mt-4 h-3 w-80 max-w-full rounded-full bg-aeblack-50"></div>
    <div class="mx-auto mt-2 h-3 w-64 max-w-full rounded-full bg-aeblack-50"></div>
  </div>
</div>

Uses the UAE Design System web components. Load the theme, base CSS and component loader first. See installation.