Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Navbar

    Site header with a brand, links, dropdown menus, a sliding hover pill, an actions area, and a mobile menu with collapsible groups.

    @php
        $logo = [
            ['fill' => 'fill-ink/15', 'points' => '354,578 1256,138 1171,430 268,868'],
            ['fill' => 'fill-ink/55', 'points' => '553,443 1455,3 1370,295 467,733'],
            ['fill' => 'fill-success/35', 'points' => '421,762 1325,318 1240,611 336,1050'],
            ['fill' => 'fill-ink/30', 'points' => '265,1073 1169,629 1084,922 180,1362'],
            ['fill' => 'fill-ink/80', 'points' => '93,965 997,521 912,814 8,1253'],
            ['fill' => 'fill-success', 'points' => '347,1135 1251,691 1166,984 262,1424'],
        ];
        $links = [
            ['label' => 'Docs', 'href' => '/docs', 'active' => true],
            [
                'label' => 'Components',
                'children' => [
                    [
                        'label' => 'Forms',
                        'href' => '/components/forms',
                        'description' => 'Input, select, checkbox, and more',
                        'icon' => 'M3 7h18v10H3zM7 12h.01M11 12h6',
                    ],
                    [
                        'label' => 'Overlays',
                        'href' => '/components/overlays',
                        'description' => 'Modal, drawer, popover, toast',
                        'icon' => 'M8 8h12v12H8zM4 16V4h12',
                    ],
                    [
                        'label' => 'Navigation',
                        'href' => '/components/navigation',
                        'description' => 'Navbar, sidebar, tabs, menus',
                        'icon' => 'M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm4-13-2 6-6 2 2-6z',
                    ],
                    [
                        'label' => 'Data display',
                        'href' => '/components/data',
                        'description' => 'Table, card, badge, avatar',
                        'icon' => 'M3 3v18h18M7 15l4-4 3 3 5-6',
                    ],
                    [
                        'label' => 'Feedback',
                        'href' => '/components/feedback',
                        'description' => 'Alert, progress, skeleton',
                        'icon' => 'M12 9v4m0 4h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z',
                    ],
                    [
                        'label' => 'Effects',
                        'href' => '/components/effects',
                        'description' => 'Aurora, beams, and grid patterns',
                        'icon' => 'M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6',
                    ],
                ],
            ],
            [
                'label' => 'Resources',
                'children' => [
                    [
                        'label' => 'Templates',
                        'href' => '/templates',
                        'description' => 'Full pages built from components',
                        'icon' => 'M3 4h18v6H3zM3 14h8v6H3zm12 0h6v6h-6z',
                    ],
                    [
                        'label' => 'Changelog',
                        'href' => '/changelog',
                        'description' => 'What shipped this week',
                        'icon' => 'M12 7v5l3 2M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z',
                    ],
                    [
                        'label' => 'Community',
                        'href' => '/community',
                        'description' => 'Ask and share on GitHub',
                        'icon' => 'M17 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M10 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm11 10v-2a4 4 0 0 0-3-3.9M16 2.1a4 4 0 0 1 0 7.8',
                    ],
                ],
            ],
            ['label' => 'Pricing', 'href' => '/pricing'],
        ];
        $brand = 'flex items-center gap-2 rounded-md';
        $logoClass = 'size-6';
        $github = 'inline-flex size-9 items-center justify-center rounded-md text-muted transition-colors duration-150 ease-out hover:bg-subtle hover:text-ink';
        $icon = 'size-5';
    @endphp
    
    <x-markas.navbar :links="$links">
        <x-slot:brand>
            <a href="/" class="{{ $brand }}">
                <svg class="{{ $logoClass }}" viewBox="0 0 1464 1430" aria-hidden="true">
                    @foreach ($logo as $shape)
                        <polygon class="{{ $shape['fill'] }}" points="{{ $shape['points'] }}" />
                    @endforeach
                </svg>
                <span>MarkasUI</span>
            </a>
        </x-slot:brand>
        <x-slot:actions>
            <a href="https://github.com" aria-label="GitHub" class="{{ $github }}">
                <svg class="{{ $icon }}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.1-1.3-.3-2.5-1-3.5.3-1.2.3-2.4 0-3.5 0 0-1 0-3 1.5a13.4 13.4 0 0 0-8 0C6 2 5 2 5 2c-.3 1.2-.3 2.4 0 3.5A5.4 5.4 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.4.5-.7 1-.9 1.7-.2.6-.2 1.2-.1 1.8v4M9 18c-4.5 2-5-2-7-2" /></svg>
            </a>
            <x-markas.button size="sm">Get started</x-markas.button>
        </x-slot:actions>
    </x-markas.navbar>
    import { Button } from "@/components/markas/Button";
    import { Navbar } from "@/components/markas/Navbar";
    
    const logo = [
      { fill: "fill-ink/15", points: "354,578 1256,138 1171,430 268,868" },
      { fill: "fill-ink/55", points: "553,443 1455,3 1370,295 467,733" },
      { fill: "fill-success/35", points: "421,762 1325,318 1240,611 336,1050" },
      { fill: "fill-ink/30", points: "265,1073 1169,629 1084,922 180,1362" },
      { fill: "fill-ink/80", points: "93,965 997,521 912,814 8,1253" },
      { fill: "fill-success", points: "347,1135 1251,691 1166,984 262,1424" },
    ];
    
    const links = [
      { label: "Docs", href: "/docs", active: true },
      {
        label: "Components",
        children: [
          {
            label: "Forms",
            href: "/components/forms",
            description: "Input, select, checkbox, and more",
            icon: "M3 7h18v10H3zM7 12h.01M11 12h6",
          },
          {
            label: "Overlays",
            href: "/components/overlays",
            description: "Modal, drawer, popover, toast",
            icon: "M8 8h12v12H8zM4 16V4h12",
          },
          {
            label: "Navigation",
            href: "/components/navigation",
            description: "Navbar, sidebar, tabs, menus",
            icon: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm4-13-2 6-6 2 2-6z",
          },
          {
            label: "Data display",
            href: "/components/data",
            description: "Table, card, badge, avatar",
            icon: "M3 3v18h18M7 15l4-4 3 3 5-6",
          },
          {
            label: "Feedback",
            href: "/components/feedback",
            description: "Alert, progress, skeleton",
            icon: "M12 9v4m0 4h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z",
          },
          {
            label: "Effects",
            href: "/components/effects",
            description: "Aurora, beams, and grid patterns",
            icon: "M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6",
          },
        ],
      },
      {
        label: "Resources",
        children: [
          {
            label: "Templates",
            href: "/templates",
            description: "Full pages built from components",
            icon: "M3 4h18v6H3zM3 14h8v6H3zm12 0h6v6h-6z",
          },
          {
            label: "Changelog",
            href: "/changelog",
            description: "What shipped this week",
            icon: "M12 7v5l3 2M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z",
          },
          {
            label: "Community",
            href: "/community",
            description: "Ask and share on GitHub",
            icon: "M17 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M10 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm11 10v-2a4 4 0 0 0-3-3.9M16 2.1a4 4 0 0 1 0 7.8",
          },
        ],
      },
      { label: "Pricing", href: "/pricing" },
    ];
    
    const brand = "flex items-center gap-2 rounded-md";
    const logoClass = "size-6";
    const github =
      "inline-flex size-9 items-center justify-center rounded-md text-muted transition-colors duration-150 ease-out hover:bg-subtle hover:text-ink";
    const icon = "size-5";
    
    export default function NavbarExample() {
      return (
        <Navbar
          links={links}
          brand={
            <a href="/" className={brand}>
              <svg className={logoClass} viewBox="0 0 1464 1430" aria-hidden="true">
                {logo.map((shape) => (
                  <polygon
                    key={shape.points}
                    className={shape.fill}
                    points={shape.points}
                  />
                ))}
              </svg>
              <span>MarkasUI</span>
            </a>
          }
          actions={
            <>
              <a href="https://github.com" aria-label="GitHub" className={github}>
                <svg
                  className={icon}
                  viewBox="0 0 24 24"
                  fill="none"
                  stroke="currentColor"
                  strokeWidth="1.5"
                  strokeLinecap="round"
                  strokeLinejoin="round"
                  aria-hidden="true"
                >
                  <path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.1-1.3-.3-2.5-1-3.5.3-1.2.3-2.4 0-3.5 0 0-1 0-3 1.5a13.4 13.4 0 0 0-8 0C6 2 5 2 5 2c-.3 1.2-.3 2.4 0 3.5A5.4 5.4 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.4.5-.7 1-.9 1.7-.2.6-.2 1.2-.1 1.8v4M9 18c-4.5 2-5-2-7-2" />
                </svg>
              </a>
              <Button size="sm">Get started</Button>
            </>
          }
        />
      );
    }
    <script setup lang="ts">
    import Button from "@/components/markas/Button.vue";
    import Navbar from "@/components/markas/Navbar.vue";
    
    const logo = [
      { fill: "fill-ink/15", points: "354,578 1256,138 1171,430 268,868" },
      { fill: "fill-ink/55", points: "553,443 1455,3 1370,295 467,733" },
      { fill: "fill-success/35", points: "421,762 1325,318 1240,611 336,1050" },
      { fill: "fill-ink/30", points: "265,1073 1169,629 1084,922 180,1362" },
      { fill: "fill-ink/80", points: "93,965 997,521 912,814 8,1253" },
      { fill: "fill-success", points: "347,1135 1251,691 1166,984 262,1424" },
    ];
    
    const links = [
      { label: "Docs", href: "/docs", active: true },
      {
        label: "Components",
        children: [
          {
            label: "Forms",
            href: "/components/forms",
            description: "Input, select, checkbox, and more",
            icon: "M3 7h18v10H3zM7 12h.01M11 12h6",
          },
          {
            label: "Overlays",
            href: "/components/overlays",
            description: "Modal, drawer, popover, toast",
            icon: "M8 8h12v12H8zM4 16V4h12",
          },
          {
            label: "Navigation",
            href: "/components/navigation",
            description: "Navbar, sidebar, tabs, menus",
            icon: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm4-13-2 6-6 2 2-6z",
          },
          {
            label: "Data display",
            href: "/components/data",
            description: "Table, card, badge, avatar",
            icon: "M3 3v18h18M7 15l4-4 3 3 5-6",
          },
          {
            label: "Feedback",
            href: "/components/feedback",
            description: "Alert, progress, skeleton",
            icon: "M12 9v4m0 4h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z",
          },
          {
            label: "Effects",
            href: "/components/effects",
            description: "Aurora, beams, and grid patterns",
            icon: "M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6",
          },
        ],
      },
      {
        label: "Resources",
        children: [
          {
            label: "Templates",
            href: "/templates",
            description: "Full pages built from components",
            icon: "M3 4h18v6H3zM3 14h8v6H3zm12 0h6v6h-6z",
          },
          {
            label: "Changelog",
            href: "/changelog",
            description: "What shipped this week",
            icon: "M12 7v5l3 2M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z",
          },
          {
            label: "Community",
            href: "/community",
            description: "Ask and share on GitHub",
            icon: "M17 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M10 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm11 10v-2a4 4 0 0 0-3-3.9M16 2.1a4 4 0 0 1 0 7.8",
          },
        ],
      },
      { label: "Pricing", href: "/pricing" },
    ];
    
    const brand = "flex items-center gap-2 rounded-md";
    const logoClass = "size-6";
    const github =
      "inline-flex size-9 items-center justify-center rounded-md text-muted transition-colors duration-150 ease-out hover:bg-subtle hover:text-ink";
    const icon = "size-5";
    </script>
    
    <template>
      <Navbar :links="links">
        <template #brand>
          <a href="/" :class="brand">
            <svg :class="logoClass" viewBox="0 0 1464 1430" aria-hidden="true">
              <polygon
                v-for="shape in logo"
                :key="shape.points"
                :class="shape.fill"
                :points="shape.points"
              />
            </svg>
            <span>MarkasUI</span>
          </a>
        </template>
        <template #actions>
          <a href="https://github.com" aria-label="GitHub" :class="github">
            <svg
              :class="icon"
              viewBox="0 0 24 24"
              fill="none"
              stroke="currentColor"
              stroke-width="1.5"
              stroke-linecap="round"
              stroke-linejoin="round"
              aria-hidden="true"
            >
              <path
                d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.1-1.3-.3-2.5-1-3.5.3-1.2.3-2.4 0-3.5 0 0-1 0-3 1.5a13.4 13.4 0 0 0-8 0C6 2 5 2 5 2c-.3 1.2-.3 2.4 0 3.5A5.4 5.4 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.4.5-.7 1-.9 1.7-.2.6-.2 1.2-.1 1.8v4M9 18c-4.5 2-5-2-7-2"
              />
            </svg>
          </a>
          <Button size="sm">Get started</Button>
        </template>
      </Navbar>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import Navbar from "$lib/components/markas/Navbar.svelte";
    
      const logo = [
        { fill: "fill-ink/15", points: "354,578 1256,138 1171,430 268,868" },
        { fill: "fill-ink/55", points: "553,443 1455,3 1370,295 467,733" },
        { fill: "fill-success/35", points: "421,762 1325,318 1240,611 336,1050" },
        { fill: "fill-ink/30", points: "265,1073 1169,629 1084,922 180,1362" },
        { fill: "fill-ink/80", points: "93,965 997,521 912,814 8,1253" },
        { fill: "fill-success", points: "347,1135 1251,691 1166,984 262,1424" },
      ];
    
      const links = [
        { label: "Docs", href: "/docs", active: true },
        {
          label: "Components",
          children: [
            {
              label: "Forms",
              href: "/components/forms",
              description: "Input, select, checkbox, and more",
              icon: "M3 7h18v10H3zM7 12h.01M11 12h6",
            },
            {
              label: "Overlays",
              href: "/components/overlays",
              description: "Modal, drawer, popover, toast",
              icon: "M8 8h12v12H8zM4 16V4h12",
            },
            {
              label: "Navigation",
              href: "/components/navigation",
              description: "Navbar, sidebar, tabs, menus",
              icon: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm4-13-2 6-6 2 2-6z",
            },
            {
              label: "Data display",
              href: "/components/data",
              description: "Table, card, badge, avatar",
              icon: "M3 3v18h18M7 15l4-4 3 3 5-6",
            },
            {
              label: "Feedback",
              href: "/components/feedback",
              description: "Alert, progress, skeleton",
              icon: "M12 9v4m0 4h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z",
            },
            {
              label: "Effects",
              href: "/components/effects",
              description: "Aurora, beams, and grid patterns",
              icon: "M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6",
            },
          ],
        },
        {
          label: "Resources",
          children: [
            {
              label: "Templates",
              href: "/templates",
              description: "Full pages built from components",
              icon: "M3 4h18v6H3zM3 14h8v6H3zm12 0h6v6h-6z",
            },
            {
              label: "Changelog",
              href: "/changelog",
              description: "What shipped this week",
              icon: "M12 7v5l3 2M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z",
            },
            {
              label: "Community",
              href: "/community",
              description: "Ask and share on GitHub",
              icon: "M17 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M10 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm11 10v-2a4 4 0 0 0-3-3.9M16 2.1a4 4 0 0 1 0 7.8",
            },
          ],
        },
        { label: "Pricing", href: "/pricing" },
      ];
    
      const brandClass = "flex items-center gap-2 rounded-md";
      const logoClass = "size-6";
      const github =
        "inline-flex size-9 items-center justify-center rounded-md text-muted transition-colors duration-150 ease-out hover:bg-subtle hover:text-ink";
      const icon = "size-5";
    </script>
    
    <Navbar {links}>
      {#snippet brand()}
        <a href="/" class={brandClass}>
          <svg class={logoClass} viewBox="0 0 1464 1430" aria-hidden="true">
            {#each logo as shape (shape.points)}
              <polygon class={shape.fill} points={shape.points} />
            {/each}
          </svg>
          <span>MarkasUI</span>
        </a>
      {/snippet}
      {#snippet actions()}
        <a href="https://github.com" aria-label="GitHub" class={github}>
          <svg
            class={icon}
            viewBox="0 0 24 24"
            fill="none"
            stroke="currentColor"
            stroke-width="1.5"
            stroke-linecap="round"
            stroke-linejoin="round"
            aria-hidden="true"
          >
            <path
              d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.1-1.3-.3-2.5-1-3.5.3-1.2.3-2.4 0-3.5 0 0-1 0-3 1.5a13.4 13.4 0 0 0-8 0C6 2 5 2 5 2c-.3 1.2-.3 2.4 0 3.5A5.4 5.4 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.4.5-.7 1-.9 1.7-.2.6-.2 1.2-.1 1.8v4M9 18c-4.5 2-5-2-7-2"
            />
          </svg>
        </a>
        <Button size="sm">Get started</Button>
      {/snippet}
    </Navbar>
    ---
    import Button from "@/components/markas/Button.astro";
    import Navbar from "@/components/markas/Navbar.astro";
    
    const logo = [
      { fill: "fill-ink/15", points: "354,578 1256,138 1171,430 268,868" },
      { fill: "fill-ink/55", points: "553,443 1455,3 1370,295 467,733" },
      { fill: "fill-success/35", points: "421,762 1325,318 1240,611 336,1050" },
      { fill: "fill-ink/30", points: "265,1073 1169,629 1084,922 180,1362" },
      { fill: "fill-ink/80", points: "93,965 997,521 912,814 8,1253" },
      { fill: "fill-success", points: "347,1135 1251,691 1166,984 262,1424" },
    ];
    
    const links = [
      { label: "Docs", href: "/docs", active: true },
      {
        label: "Components",
        children: [
          {
            label: "Forms",
            href: "/components/forms",
            description: "Input, select, checkbox, and more",
            icon: "M3 7h18v10H3zM7 12h.01M11 12h6",
          },
          {
            label: "Overlays",
            href: "/components/overlays",
            description: "Modal, drawer, popover, toast",
            icon: "M8 8h12v12H8zM4 16V4h12",
          },
          {
            label: "Navigation",
            href: "/components/navigation",
            description: "Navbar, sidebar, tabs, menus",
            icon: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm4-13-2 6-6 2 2-6z",
          },
          {
            label: "Data display",
            href: "/components/data",
            description: "Table, card, badge, avatar",
            icon: "M3 3v18h18M7 15l4-4 3 3 5-6",
          },
          {
            label: "Feedback",
            href: "/components/feedback",
            description: "Alert, progress, skeleton",
            icon: "M12 9v4m0 4h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z",
          },
          {
            label: "Effects",
            href: "/components/effects",
            description: "Aurora, beams, and grid patterns",
            icon: "M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6",
          },
        ],
      },
      {
        label: "Resources",
        children: [
          {
            label: "Templates",
            href: "/templates",
            description: "Full pages built from components",
            icon: "M3 4h18v6H3zM3 14h8v6H3zm12 0h6v6h-6z",
          },
          {
            label: "Changelog",
            href: "/changelog",
            description: "What shipped this week",
            icon: "M12 7v5l3 2M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z",
          },
          {
            label: "Community",
            href: "/community",
            description: "Ask and share on GitHub",
            icon: "M17 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M10 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm11 10v-2a4 4 0 0 0-3-3.9M16 2.1a4 4 0 0 1 0 7.8",
          },
        ],
      },
      { label: "Pricing", href: "/pricing" },
    ];
    
    const brand = "flex items-center gap-2 rounded-md";
    const logoClass = "size-6";
    const github =
      "inline-flex size-9 items-center justify-center rounded-md text-muted transition-colors duration-150 ease-out hover:bg-subtle hover:text-ink";
    const icon = "size-5";
    ---
    
    <Navbar links={links}>
      <a slot="brand" href="/" class={brand}>
        <svg class={logoClass} viewBox="0 0 1464 1430" aria-hidden="true">
          {logo.map((shape) => <polygon class={shape.fill} points={shape.points} />)}
        </svg>
        <span>MarkasUI</span>
      </a>
      <Fragment slot="actions">
        <a href="https://github.com" aria-label="GitHub" class={github}>
          <svg
            class={icon}
            viewBox="0 0 24 24"
            fill="none"
            stroke="currentColor"
            stroke-width="1.5"
            stroke-linecap="round"
            stroke-linejoin="round"
            aria-hidden="true"
          >
            <path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.1-1.3-.3-2.5-1-3.5.3-1.2.3-2.4 0-3.5 0 0-1 0-3 1.5a13.4 13.4 0 0 0-8 0C6 2 5 2 5 2c-.3 1.2-.3 2.4 0 3.5A5.4 5.4 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.4.5-.7 1-.9 1.7-.2.6-.2 1.2-.1 1.8v4M9 18c-4.5 2-5-2-7-2"></path>
          </svg>
        </a>
        <Button size="sm">Get started</Button>
      </Fragment>
    </Navbar>
    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import {
      Navbar,
      type NavbarLink,
    } from "./markas/navbar.component";
    
    const logo = [
      { fill: "fill-ink/15", points: "354,578 1256,138 1171,430 268,868" },
      { fill: "fill-ink/55", points: "553,443 1455,3 1370,295 467,733" },
      { fill: "fill-success/35", points: "421,762 1325,318 1240,611 336,1050" },
      { fill: "fill-ink/30", points: "265,1073 1169,629 1084,922 180,1362" },
      { fill: "fill-ink/80", points: "93,965 997,521 912,814 8,1253" },
      { fill: "fill-success", points: "347,1135 1251,691 1166,984 262,1424" },
    ];
    
    const links: NavbarLink[] = [
      { label: "Docs", href: "/docs", active: true },
      {
        label: "Components",
        children: [
          {
            label: "Forms",
            href: "/components/forms",
            description: "Input, select, checkbox, and more",
            icon: "M3 7h18v10H3zM7 12h.01M11 12h6",
          },
          {
            label: "Overlays",
            href: "/components/overlays",
            description: "Modal, drawer, popover, toast",
            icon: "M8 8h12v12H8zM4 16V4h12",
          },
          {
            label: "Navigation",
            href: "/components/navigation",
            description: "Navbar, sidebar, tabs, menus",
            icon: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm4-13-2 6-6 2 2-6z",
          },
          {
            label: "Data display",
            href: "/components/data",
            description: "Table, card, badge, avatar",
            icon: "M3 3v18h18M7 15l4-4 3 3 5-6",
          },
          {
            label: "Feedback",
            href: "/components/feedback",
            description: "Alert, progress, skeleton",
            icon: "M12 9v4m0 4h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z",
          },
          {
            label: "Effects",
            href: "/components/effects",
            description: "Aurora, beams, and grid patterns",
            icon: "M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6",
          },
        ],
      },
      {
        label: "Resources",
        children: [
          {
            label: "Templates",
            href: "/templates",
            description: "Full pages built from components",
            icon: "M3 4h18v6H3zM3 14h8v6H3zm12 0h6v6h-6z",
          },
          {
            label: "Changelog",
            href: "/changelog",
            description: "What shipped this week",
            icon: "M12 7v5l3 2M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z",
          },
          {
            label: "Community",
            href: "/community",
            description: "Ask and share on GitHub",
            icon: "M17 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M10 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm11 10v-2a4 4 0 0 0-3-3.9M16 2.1a4 4 0 0 1 0 7.8",
          },
        ],
      },
      { label: "Pricing", href: "/pricing" },
    ];
    
    @Component({
      selector: "markas-example",
      imports: [Button, Navbar],
      template: `
        <header markas-navbar [links]="links">
          <a brand href="/" [class]="brand">
            <svg
              [attr.class]="logoClass"
              viewBox="0 0 1464 1430"
              aria-hidden="true"
            >
              @for (shape of logo; track shape.points) {
                <polygon [attr.class]="shape.fill" [attr.points]="shape.points" />
              }
            </svg>
            <span>MarkasUI</span>
          </a>
          <ng-container actions>
            <a href="https://github.com" aria-label="GitHub" [class]="github">
              <svg
                [attr.class]="icon"
                viewBox="0 0 24 24"
                fill="none"
                stroke="currentColor"
                stroke-width="1.5"
                stroke-linecap="round"
                stroke-linejoin="round"
                aria-hidden="true"
              >
                <path
                  d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.1-1.3-.3-2.5-1-3.5.3-1.2.3-2.4 0-3.5 0 0-1 0-3 1.5a13.4 13.4 0 0 0-8 0C6 2 5 2 5 2c-.3 1.2-.3 2.4 0 3.5A5.4 5.4 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.4.5-.7 1-.9 1.7-.2.6-.2 1.2-.1 1.8v4M9 18c-4.5 2-5-2-7-2"
                />
              </svg>
            </a>
            <button markas-button size="sm">Get started</button>
          </ng-container>
        </header>
      `,
    })
    export default class NavbarExample {
      protected readonly logo = logo;
      protected readonly links = links;
      protected readonly brand = "flex items-center gap-2 rounded-md";
      protected readonly logoClass = "size-6";
      protected readonly github =
        "inline-flex size-9 items-center justify-center rounded-md text-muted transition-colors duration-150 ease-out hover:bg-subtle hover:text-ink";
      protected readonly icon = "size-5";
    }

    Examples

    Floating glass pill

    Copy, paste, and ship it today

    A glass pill that floats over the page. The highlight slides to whatever you point at.

    Copy, paste, and ship it today

    A glass pill that floats over the page. The highlight slides to whatever you point at.

    Copy, paste, and ship it today

    A glass pill that floats over the page. The highlight slides to whatever you point at.

    Copy, paste, and ship it today

    A glass pill that floats over the page. The highlight slides to whatever you point at.

    Copy, paste, and ship it today

    A glass pill that floats over the page. The highlight slides to whatever you point at.

    With announcement bar

    Command search in the middle

    Two tiers with utility bar

    Mega menu with featured cards

    MarkasUI

    Dashboard header

    Mobile with bottom tabs

    Good morning, Rian

    What shipped this week

    • Navbar Eight new layouts New
    • Command Grouped results and hotkey Updated
    • Sidebar Collapsible icon rail Updated
    • Footer Newsletter and sitemap New
    • Theme toggle Six transition styles Updated

    Good morning, Rian

    What shipped this week

    • NavbarEight new layoutsNew
    • CommandGrouped results and hotkeyUpdated
    • SidebarCollapsible icon railUpdated
    • FooterNewsletter and sitemapNew
    • Theme toggleSix transition stylesUpdated

    Good morning, Rian

    What shipped this week

    • NavbarEight new layoutsNew
    • CommandGrouped results and hotkeyUpdated
    • SidebarCollapsible icon railUpdated
    • FooterNewsletter and sitemapNew
    • Theme toggleSix transition stylesUpdated

    Good morning, Rian

    What shipped this week

    • Navbar Eight new layouts New
    • Command Grouped results and hotkey Updated
    • Sidebar Collapsible icon rail Updated
    • Footer Newsletter and sitemap New
    • Theme toggle Six transition styles Updated

    Good morning, Rian

    What shipped this week

    • NavbarEight new layoutsNew
    • CommandGrouped results and hotkeyUpdated
    • SidebarCollapsible icon railUpdated
    • FooterNewsletter and sitemapNew
    • Theme toggleSix transition stylesUpdated

    Clear over a hero, solid on scroll

    MarkasUI 1.0 is out

    Interfaces that feel finished

    Scroll this page. The header starts clear over the hero and turns solid once content moves under it.

    Three frameworks

    Blade, React, and Vue share the same classes and variants.

    Native first

    Dialog, Popover API, and details before any extra script.

    Tokens only

    Fifteen colour tokens keep light and dark mode in step.

    MarkasUI 1.0 is out

    Interfaces that feel finished

    Scroll this page. The header starts clear over the hero and turns solid once content moves under it.

    Three frameworks

    Blade, React, and Vue share the same classes and variants.

    Native first

    Dialog, Popover API, and details before any extra script.

    Tokens only

    Fifteen colour tokens keep light and dark mode in step.

    MarkasUI 1.0 is out

    Interfaces that feel finished

    Scroll this page. The header starts clear over the hero and turns solid once content moves under it.

    Three frameworks

    Blade, React, and Vue share the same classes and variants.

    Native first

    Dialog, Popover API, and details before any extra script.

    Tokens only

    Fifteen colour tokens keep light and dark mode in step.

    MarkasUI 1.0 is out

    Interfaces that feel finished

    Scroll this page. The header starts clear over the hero and turns solid once content moves under it.

    Three frameworks

    Blade, React, and Vue share the same classes and variants.

    Native first

    Dialog, Popover API, and details before any extra script.

    Tokens only

    Fifteen colour tokens keep light and dark mode in step.

    MarkasUI 1.0 is out

    Interfaces that feel finished

    Scroll this page. The header starts clear over the hero and turns solid once content moves under it.

    Three frameworks

    Blade, React, and Vue share the same classes and variants.

    Native first

    Dialog, Popover API, and details before any extra script.

    Tokens only

    Fifteen colour tokens keep light and dark mode in step.

    Installation

    npx markasui@latest add navbar

    Usage

    <x-markas.navbar variant="blur" :sticky="true" :links="[
        ['label' => 'Home', 'href' => '/', 'active' => true],
        ['label' => 'Products', 'children' => [
            [
                'label' => 'Analytics',
                'href' => '/analytics',
                'description' => 'Track usage in real time',
                'icon' => 'M3 3v18h18M7 15l4-4 3 3 5-6',
            ],
            ['label' => 'Automation', 'href' => '/automation'],
        ]],
        ['label' => 'Pricing', 'href' => '/pricing'],
    ]">
        <x-slot:brand>MarkasUI</x-slot:brand>
        <x-slot:actions>
            <x-markas.button size="sm">Sign in</x-markas.button>
        </x-slot:actions>
    </x-markas.navbar>

    Needs Alpine.js for the dropdowns and the mobile menu.

    import { Button } from "@/components/markas/Button";
    import { Navbar } from "@/components/markas/Navbar";
    
    <Navbar
      variant="blur"
      sticky
      brand="MarkasUI"
      links={[
        { label: "Home", href: "/", active: true },
        {
          label: "Products",
          children: [
            {
              label: "Analytics",
              href: "/analytics",
              description: "Track usage in real time",
              icon: "M3 3v18h18M7 15l4-4 3 3 5-6",
            },
            { label: "Automation", href: "/automation" },
          ],
        },
        { label: "Pricing", href: "/pricing" },
      ]}
      actions={<Button size="sm">Sign in</Button>}
    />;
    <script setup lang="ts">
    const links = [
      { label: "Home", href: "/", active: true },
      {
        label: "Products",
        children: [
          {
            label: "Analytics",
            href: "/analytics",
            description: "Track usage in real time",
            icon: "M3 3v18h18M7 15l4-4 3 3 5-6",
          },
          { label: "Automation", href: "/automation" },
        ],
      },
      { label: "Pricing", href: "/pricing" },
    ];
    </script>
    
    <template>
      <Navbar variant="blur" sticky :links="links">
        <template #brand>MarkasUI</template>
        <template #actions>
          <Button size="sm">Sign in</Button>
        </template>
      </Navbar>
    </template>
    <script lang="ts">
      import Button from "$lib/components/markas/Button.svelte";
      import Navbar from "$lib/components/markas/Navbar.svelte";
    
      const links = [
        { label: "Home", href: "/", active: true },
        {
          label: "Products",
          children: [
            {
              label: "Analytics",
              href: "/analytics",
              description: "Track usage in real time",
              icon: "M3 3v18h18M7 15l4-4 3 3 5-6",
            },
            { label: "Automation", href: "/automation" },
          ],
        },
        { label: "Pricing", href: "/pricing" },
      ];
    </script>
    
    <Navbar variant="blur" sticky {links}>
      {#snippet brand()}MarkasUI{/snippet}
      {#snippet actions()}
        <Button size="sm">Sign in</Button>
      {/snippet}
    </Navbar>
    ---
    import Button from "@/components/markas/Button.astro";
    import Navbar from "@/components/markas/Navbar.astro";
    
    const links = [
      { label: "Home", href: "/", active: true },
      {
        label: "Products",
        children: [
          {
            label: "Analytics",
            href: "/analytics",
            description: "Track usage in real time",
            icon: "M3 3v18h18M7 15l4-4 3 3 5-6",
          },
          { label: "Automation", href: "/automation" },
        ],
      },
      { label: "Pricing", href: "/pricing" },
    ];
    ---
    
    <Navbar variant="blur" sticky links={links}>
      <Fragment slot="brand">MarkasUI</Fragment>
      <Button slot="actions" size="sm">Sign in</Button>
    </Navbar>

    A small bundled script runs the dropdowns and the mobile menu of every navbar on the page. It also works after view transitions.

    import { Component } from "@angular/core";
    import { Button } from "./markas/button.component";
    import { Navbar, type NavbarLink } from "./markas/navbar.component";
    
    @Component({
      selector: "app-header",
      imports: [Button, Navbar],
      template: `
        <header markas-navbar variant="blur" sticky [links]="links">
          <ng-container brand>MarkasUI</ng-container>
          <button markas-button actions size="sm">Sign in</button>
        </header>
      `,
    })
    export class AppHeader {
      readonly links: NavbarLink[] = [
        { label: "Home", href: "/", active: true },
        {
          label: "Products",
          children: [
            {
              label: "Analytics",
              href: "/analytics",
              description: "Track usage in real time",
              icon: "M3 3v18h18M7 15l4-4 3 3 5-6",
            },
            { label: "Automation", href: "/automation" },
          ],
        },
        { label: "Pricing", href: "/pricing" },
      ];
    }

    The component sits on a native header element (header[markas-navbar]), so id, class, and data-* attributes stay on the header.

    • Plain links from earlier versions keep working. Add children to an item to turn it into a dropdown; its own href is then ignored.
    • Dropdown panels use the native Popover API, so they sit in the top layer above other content and close on outside click or Escape. A panel with more than three links flows into a second column.
    • variant: default draws a hairline bottom border, floating is a rounded bar with a border and soft shadow, blur is translucent with a backdrop blur. Pair blur with sticky over content that scrolls under the header.
    • The layout follows the header width through a container query (@container and @2xl:), not the viewport. The desktop menu shows when the header is 42rem wide or more, below that the menu button appears and dropdowns become collapsible groups.
    • The menu button is labelled “Menu” and the navs “Main” and “Main mobile”. Translate them with menuLabel, navLabel, and mobileNavLabel (Blade: menu-label, nav-label, mobile-nav-label).

    Props

    NameTypeDefaultDescription
    links{ label, href?, active?, children?: { label, href, description?, icon? }[] }[][]Main menu. Links with active get aria-current=page. An item with children becomes a dropdown trigger; icon is an SVG path (d) for a 24px stroke icon.
    brandslot / ReactNode-Logo or site name on the left.
    actionsslot / ReactNode-Right-hand area, such as a Sign in button.
    variant"default" | "floating" | "blur""default"default: hairline bottom border. floating: rounded, bordered bar with a soft shadow. blur: translucent background with backdrop blur for content scrolling underneath.
    stickybooleanfalseKeeps the header at the top while the page scrolls (floating leaves a small gap).
    menuLabelstringMenuAccessible label of the mobile menu button.
    navLabelstringMainAccessible label of the desktop nav element.
    mobileNavLabelstringMain mobileAccessible label of the mobile nav element.

    Accessibility

    • The mobile menu button uses aria-expanded and aria-controls pointing to the menu panel.
    • Escape closes the mobile panel and returns focus to the menu button.
    • The desktop and mobile menus are each wrapped in a nav with different labels (navLabel and mobileNavLabel).
    • The layout follows the header width (container query), the desktop menu shows from 42rem wide.
    • Dropdowns follow the WAI-ARIA disclosure navigation pattern: a button with aria-expanded and aria-controls opens a native popover. Click, Enter, Space, and ArrowDown open it, ArrowDown also focuses the first link, Escape closes it and returns focus to the button.
    • Hover opens a dropdown after 120ms and closes it 180ms after the mouse leaves; touch and pen ignore hover.
    • On mobile, items with children become details and summary groups that open with Enter or Space.
    • Animations are disabled with prefers-reduced-motion.

    Related components

    More navigation components with the same classes in every framework.