Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Pinned List

    List where any row can be pinned. Pinned rows glide into a Pinned group at the top with a FLIP animation and glide back when unpinned.

    Pinned1

    • Onboarding checklistPeople, 23 itemsMon

    All4

    • Q4 roadmapProduct, 14 pages2h
    • Client invoicesFinance, 8 filesYesterday
    • Brand guidelinesDesign, 31 pagesOct 28
    • Standup notesEngineering, dailyOct 27

    Pinned1

    • Onboarding checklistPeople, 23 itemsMon

    All4

    • Q4 roadmapProduct, 14 pages2h
    • Client invoicesFinance, 8 filesYesterday
    • Brand guidelinesDesign, 31 pagesOct 28
    • Standup notesEngineering, dailyOct 27

    Pinned1

    • Onboarding checklist People, 23 items Mon

    All4

    • Q4 roadmap Product, 14 pages 2h
    • Client invoices Finance, 8 files Yesterday
    • Brand guidelines Design, 31 pages Oct 28
    • Standup notes Engineering, daily Oct 27

    Pinned1

    • Onboarding checklistPeople, 23 itemsMon

    All4

    • Q4 roadmapProduct, 14 pages2h
    • Client invoicesFinance, 8 filesYesterday
    • Brand guidelinesDesign, 31 pagesOct 28
    • Standup notesEngineering, dailyOct 27

    @php
        $items = [
            ['value' => 'roadmap', 'label' => 'Q4 roadmap', 'description' => 'Product, 14 pages', 'meta' => '2h', 'icon' => 'M9 4 3 6v14l6-2 6 2 6-2V4l-6 2zM9 4v14M15 6v14'],
            ['value' => 'invoices', 'label' => 'Client invoices', 'description' => 'Finance, 8 files', 'meta' => 'Yesterday', 'icon' => 'M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2zM9 8h6M9 12h6'],
            ['value' => 'onboarding', 'label' => 'Onboarding checklist', 'description' => 'People, 23 items', 'meta' => 'Mon', 'icon' => 'M9 6h11M9 12h11M9 18h11M4 6l1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2'],
            ['value' => 'brand', 'label' => 'Brand guidelines', 'description' => 'Design, 31 pages', 'meta' => 'Oct 28', 'icon' => 'M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'],
            ['value' => 'standup', 'label' => 'Standup notes', 'description' => 'Engineering, daily', 'meta' => 'Oct 27', 'icon' => 'M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'],
        ];
    @endphp
    
    <x-markas.pinned-list :items="$items" :default-pinned="['onboarding']" />
    import { PinnedList } from "@/components/markas/PinnedList";
    
    const items = [
      {
        value: "roadmap",
        label: "Q4 roadmap",
        description: "Product, 14 pages",
        meta: "2h",
        icon: "M9 4 3 6v14l6-2 6 2 6-2V4l-6 2zM9 4v14M15 6v14",
      },
      {
        value: "invoices",
        label: "Client invoices",
        description: "Finance, 8 files",
        meta: "Yesterday",
        icon: "M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2zM9 8h6M9 12h6",
      },
      {
        value: "onboarding",
        label: "Onboarding checklist",
        description: "People, 23 items",
        meta: "Mon",
        icon: "M9 6h11M9 12h11M9 18h11M4 6l1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2",
      },
      {
        value: "brand",
        label: "Brand guidelines",
        description: "Design, 31 pages",
        meta: "Oct 28",
        icon: "M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z",
      },
      {
        value: "standup",
        label: "Standup notes",
        description: "Engineering, daily",
        meta: "Oct 27",
        icon: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",
      },
    ];
    
    export default function PinnedListExample() {
      return <PinnedList items={items} defaultPinned={["onboarding"]} />;
    }
    <script setup lang="ts">
    import PinnedList from "@/components/markas/PinnedList.vue";
    
    const items = [
      {
        value: "roadmap",
        label: "Q4 roadmap",
        description: "Product, 14 pages",
        meta: "2h",
        icon: "M9 4 3 6v14l6-2 6 2 6-2V4l-6 2zM9 4v14M15 6v14",
      },
      {
        value: "invoices",
        label: "Client invoices",
        description: "Finance, 8 files",
        meta: "Yesterday",
        icon: "M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2zM9 8h6M9 12h6",
      },
      {
        value: "onboarding",
        label: "Onboarding checklist",
        description: "People, 23 items",
        meta: "Mon",
        icon: "M9 6h11M9 12h11M9 18h11M4 6l1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2",
      },
      {
        value: "brand",
        label: "Brand guidelines",
        description: "Design, 31 pages",
        meta: "Oct 28",
        icon: "M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z",
      },
      {
        value: "standup",
        label: "Standup notes",
        description: "Engineering, daily",
        meta: "Oct 27",
        icon: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",
      },
    ];
    </script>
    
    <template>
      <PinnedList :items="items" :default-pinned="['onboarding']" />
    </template>
    <script lang="ts">
      import PinnedList from "$lib/components/markas/PinnedList.svelte";
    
      const items = [
        {
          value: "roadmap",
          label: "Q4 roadmap",
          description: "Product, 14 pages",
          meta: "2h",
          icon: "M9 4 3 6v14l6-2 6 2 6-2V4l-6 2zM9 4v14M15 6v14",
        },
        {
          value: "invoices",
          label: "Client invoices",
          description: "Finance, 8 files",
          meta: "Yesterday",
          icon: "M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2zM9 8h6M9 12h6",
        },
        {
          value: "onboarding",
          label: "Onboarding checklist",
          description: "People, 23 items",
          meta: "Mon",
          icon: "M9 6h11M9 12h11M9 18h11M4 6l1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2",
        },
        {
          value: "brand",
          label: "Brand guidelines",
          description: "Design, 31 pages",
          meta: "Oct 28",
          icon: "M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z",
        },
        {
          value: "standup",
          label: "Standup notes",
          description: "Engineering, daily",
          meta: "Oct 27",
          icon: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",
        },
      ];
    </script>
    
    <PinnedList {items} defaultPinned={["onboarding"]} />
    ---
    import PinnedList from "@/components/markas/PinnedList.astro";
    
    const items = [
      {
        value: "roadmap",
        label: "Q4 roadmap",
        description: "Product, 14 pages",
        meta: "2h",
        icon: "M9 4 3 6v14l6-2 6 2 6-2V4l-6 2zM9 4v14M15 6v14",
      },
      {
        value: "invoices",
        label: "Client invoices",
        description: "Finance, 8 files",
        meta: "Yesterday",
        icon: "M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2zM9 8h6M9 12h6",
      },
      {
        value: "onboarding",
        label: "Onboarding checklist",
        description: "People, 23 items",
        meta: "Mon",
        icon: "M9 6h11M9 12h11M9 18h11M4 6l1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2",
      },
      {
        value: "brand",
        label: "Brand guidelines",
        description: "Design, 31 pages",
        meta: "Oct 28",
        icon: "M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z",
      },
      {
        value: "standup",
        label: "Standup notes",
        description: "Engineering, daily",
        meta: "Oct 27",
        icon: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",
      },
    ];
    ---
    
      <PinnedList items={items} defaultPinned={['onboarding']} />
    import { Component } from "@angular/core";
    import { PinnedList } from "./markas/pinned-list.component";
    
    @Component({
      selector: "markas-example",
      imports: [PinnedList],
      template: `
        <markas-pinned-list [items]="items" [defaultPinned]="['onboarding']" />
      `,
    })
    export default class PinnedListExample {
      protected readonly items = [
        {
          value: "roadmap",
          label: "Q4 roadmap",
          description: "Product, 14 pages",
          meta: "2h",
          icon: "M9 4 3 6v14l6-2 6 2 6-2V4l-6 2zM9 4v14M15 6v14",
        },
        {
          value: "invoices",
          label: "Client invoices",
          description: "Finance, 8 files",
          meta: "Yesterday",
          icon: "M5 3h14v18l-3-2-2 2-2-2-2 2-2-2-3 2zM9 8h6M9 12h6",
        },
        {
          value: "onboarding",
          label: "Onboarding checklist",
          description: "People, 23 items",
          meta: "Mon",
          icon: "M9 6h11M9 12h11M9 18h11M4 6l1 1 2-2M4 12l1 1 2-2M4 18l1 1 2-2",
        },
        {
          value: "brand",
          label: "Brand guidelines",
          description: "Design, 31 pages",
          meta: "Oct 28",
          icon: "M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z",
        },
        {
          value: "standup",
          label: "Standup notes",
          description: "Engineering, daily",
          meta: "Oct 27",
          icon: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",
        },
      ];
    }

    Examples

    Chat channels

    Pinned2

    • design-critWeekly critiques, Thursdays14
    • launch-q4Release checklist and status36

    All2

    • generalCompany-wide announcements128
    • randomCats, lunch, and memes9

    Pinned2

    • design-critWeekly critiques, Thursdays14
    • launch-q4Release checklist and status36

    All2

    • generalCompany-wide announcements128
    • randomCats, lunch, and memes9

    Pinned2

    • design-crit Weekly critiques, Thursdays 14
    • launch-q4 Release checklist and status 36

    All2

    • general Company-wide announcements 128
    • random Cats, lunch, and memes 9

    Pinned2

    • design-critWeekly critiques, Thursdays14
    • launch-q4Release checklist and status36

    All2

    • generalCompany-wide announcements128
    • randomCats, lunch, and memes9

    Simple rows

    All4

    • Jakarta31°C
    • Bandung24°C
    • Surabaya33°C
    • Denpasar29°C

    All4

    • Jakarta31°C
    • Bandung24°C
    • Surabaya33°C
    • Denpasar29°C

    All4

    • Jakarta 31°C
    • Bandung 24°C
    • Surabaya 33°C
    • Denpasar 29°C

    All4

    • Jakarta31°C
    • Bandung24°C
    • Surabaya33°C
    • Denpasar29°C

    Saved searches in a card

    Quick filters

    Quick filters

    Favorites1

    • Trials ending this weekCustomers, 42 results

    Saved searches2

    • Unpaid over Rp 5.000.000Invoices, 6 results
    • Churned this monthCustomers, 18 results

    Quick filters

    Favorites1

    • Trials ending this weekCustomers, 42 results

    Saved searches2

    • Unpaid over Rp 5.000.000Invoices, 6 results
    • Churned this monthCustomers, 18 results

    Quick filters

    Favorites1

    • Trials ending this week Customers, 42 results

    Saved searches2

    • Unpaid over Rp 5.000.000 Invoices, 6 results
    • Churned this month Customers, 18 results

    Quick filters

    Favorites1

    • Trials ending this weekCustomers, 42 results

    Saved searches2

    • Unpaid over Rp 5.000.000Invoices, 6 results
    • Churned this monthCustomers, 18 results

    Installation

    npx markasui@latest add pinned-list

    Usage

    <x-markas.pinned-list
        :default-pinned="$user->pinned_channels"
        x-on:change="fetch('/pins', { method: 'PUT', body: JSON.stringify($event.detail) })"
        :items="[
            ['value' => 'general', 'label' => 'general', 'description' => 'Company-wide announcements', 'meta' => '128'],
            ['value' => 'design', 'label' => 'design-crit', 'description' => 'Weekly critiques', 'meta' => '14'],
            ['value' => 'random', 'label' => 'random', 'meta' => '9'],
        ]"
    />
    import { PinnedList } from "@/components/markas/PinnedList";
    
    const [pinned, setPinned] = useState<string[]>(["design"]);
    
    <PinnedList items={channels} pinned={pinned} onPinnedChange={setPinned} />;
    <script setup lang="ts">
    import { ref } from "vue";
    import PinnedList from "@/components/markas/PinnedList.vue";
    
    const pinned = ref(["design"]);
    </script>
    
    <template>
      <PinnedList v-model:pinned="pinned" :items="channels" />
    </template>
    <script lang="ts">
      import PinnedList from "$lib/components/markas/PinnedList.svelte";
    
      const items = [
        { value: "roadmap", label: "Q4 roadmap", description: "Product, 14 pages" },
        { value: "standup", label: "Standup notes", description: "Team, daily" },
      ];
      let pinned = $state(["roadmap"]);
    </script>
    
    <PinnedList {items} bind:pinned />
    ---
    import PinnedList from "@/components/markas/PinnedList.astro";
    
    const items = [
      { value: "roadmap", label: "Q4 roadmap", description: "Product, 14 pages" },
      { value: "standup", label: "Standup notes", description: "Team, daily" },
    ];
    ---
    
    <PinnedList items={items} defaultPinned={["roadmap"]} />

    A small bundled script moves the rows and dispatches change with the pinned values.

    import { Component, signal } from "@angular/core";
    import { PinnedList } from "./markas/pinned-list.component";
    
    @Component({
      selector: "app-docs",
      imports: [PinnedList],
      template: `<markas-pinned-list [items]="items" [(pinned)]="pinned" />`,
    })
    export class Docs {
      readonly items = [
        { value: "roadmap", label: "Q4 roadmap", description: "Product, 14 pages" },
        { value: "standup", label: "Standup notes", description: "Team, daily" },
      ];
      readonly pinned = signal(["roadmap"]);
    }
    • Pinned rows keep the order of items, so unpinning returns a row to its original place.
    • The move uses FLIP: every row is measured before and after the change and animated from the old spot with the Web Animations API. No layout library is needed.
    • {label} in pinLabel, unpinLabel, pinnedMessage, and unpinnedMessage is replaced by the row label.
    • Blade renders the rows with Alpine x-for and needs Alpine.js.

    Props

    NameTypeDefaultDescription
    items{ value: string; label: string; description?: string; meta?: string; icon?: string }[][]Rows in their natural order. icon is the d attribute of a 24x24 stroked SVG path, meta is short text on the right.
    pinned / v-model:pinnedstring[]-Controlled pinned values in React (with onPinnedChange) and Vue (v-model:pinned).
    defaultPinnedstring[][]Values pinned on first render.
    onPinnedChange / x-on:change(pinned: string[]) => void-Fires after a pin or unpin with the new list. Blade dispatches a change DOM event with the list as detail.
    pinLabelstringPin {label}Accessible name of each pin button. It stays the same while pinned, aria-pressed carries the state.
    unpinLabelstringUnpin {label}Hover hint (title) of the pin button while the row is pinned.
    pinnedLabelstringPinnedHeading and list name of the pinned group.
    allLabelstringAllHeading and list name of the other rows.
    pinnedMessagestring{label} pinnedAnnounced in the live region after pinning.
    unpinnedMessagestring{label} unpinnedAnnounced in the live region after unpinning.
    pinnedChangeoutput<string[]>-Angular only. Emits the pinned values after every change; supports [(pinned)]. Svelte uses bind:pinned or onPinnedChange, Astro dispatches change.

    Accessibility

    • Each pin button is a toggle button with aria-pressed and a fixed name from pinLabel.
    • Both groups are lists named by pinnedLabel and allLabel. An empty group is hidden.
    • Focus follows the moved row to its pin button, and a status live region announces pinnedMessage or unpinnedMessage.
    • With reduced motion rows jump to their new place without the FLIP glide.

    Related components

    More markasui components with the same classes in every framework.