Skip to content
MarkasUI
Type to search

    Guide

    MarkasUI

    Form

    Feedback

    Overlay

    Navigation

    Data

    Sections

    Animations

    Backgrounds

    Buttons

    Templates

    Pages

    Scroll Area

    Scrollable container with a thin token-styled scrollbar that keyboard users can focus and scroll. No JavaScript.

    Releases

    v2.12.0

    v2.11.0

    v2.10.0

    v2.9.0

    v2.8.0

    v2.7.0

    v2.6.0

    v2.5.0

    v2.4.0

    v2.3.0

    v2.2.0

    v2.1.0

    Releases

    v2.12.0

    v2.11.0

    v2.10.0

    v2.9.0

    v2.8.0

    v2.7.0

    v2.6.0

    v2.5.0

    v2.4.0

    v2.3.0

    v2.2.0

    v2.1.0

    Releases

    v2.12.0

    v2.11.0

    v2.10.0

    v2.9.0

    v2.8.0

    v2.7.0

    v2.6.0

    v2.5.0

    v2.4.0

    v2.3.0

    v2.2.0

    v2.1.0

    Releases

    v2.12.0

    v2.11.0

    v2.10.0

    v2.9.0

    v2.8.0

    v2.7.0

    v2.6.0

    v2.5.0

    v2.4.0

    v2.3.0

    v2.2.0

    v2.1.0

    Releases

    v2.12.0

    v2.11.0

    v2.10.0

    v2.9.0

    v2.8.0

    v2.7.0

    v2.6.0

    v2.5.0

    v2.4.0

    v2.3.0

    v2.2.0

    v2.1.0

    <x-markas.scroll-area label="Releases" class="max-h-56 border border-line bg-surface">
        <div class="p-4">
            <p class="mb-2 text-sm font-medium text-ink">Releases</p>
            @foreach (range(12, 1) as $minor)
                <p class="border-t border-line py-2 text-sm text-muted">v2.{{ $minor }}.0</p>
            @endforeach
        </div>
    </x-markas.scroll-area>
    import { ScrollArea } from "@/components/markas/ScrollArea";
    
    const releases = Array.from({ length: 12 }, (_, i) => `v2.${12 - i}.0`);
    
    export default function ScrollAreaExample() {
      return (
        <ScrollArea
          label="Releases"
          className="max-h-56 border border-line bg-surface"
        >
          <div className="p-4">
            <p className="mb-2 text-sm font-medium text-ink">Releases</p>
            {releases.map((release) => (
              <p
                key={release}
                className="border-t border-line py-2 text-sm text-muted"
              >
                {release}
              </p>
            ))}
          </div>
        </ScrollArea>
      );
    }
    <script setup lang="ts">
    import ScrollArea from "@/components/markas/ScrollArea.vue";
    
    const releases = Array.from({ length: 12 }, (_, i) => `v2.${12 - i}.0`);
    </script>
    
    <template>
      <ScrollArea label="Releases" class="max-h-56 border border-line bg-surface">
        <div class="p-4">
          <p class="mb-2 text-sm font-medium text-ink">Releases</p>
          <p
            v-for="release in releases"
            :key="release"
            class="border-t border-line py-2 text-sm text-muted"
          >
            {{ release }}
          </p>
        </div>
      </ScrollArea>
    </template>
    <script lang="ts">
      import ScrollArea from "$lib/components/markas/ScrollArea.svelte";
    
      const releases = Array.from({ length: 12 }, (_, i) => `v2.${12 - i}.0`);
    </script>
    
    <ScrollArea label="Releases" class="max-h-56 border border-line bg-surface">
      <div class="p-4">
        <p class="mb-2 text-sm font-medium text-ink">Releases</p>
        {#each releases as release (release)}
          <p class="border-t border-line py-2 text-sm text-muted">{release}</p>
        {/each}
      </div>
    </ScrollArea>
    ---
    import ScrollArea from "@/components/markas/ScrollArea.astro";
    
    const releases = Array.from({ length: 12 }, (_, i) => `v2.${12 - i}.0`);
    ---
    
    <ScrollArea label="Releases" class="max-h-56 border border-line bg-surface">
      <div class="p-4">
        <p class="mb-2 text-sm font-medium text-ink">Releases</p>
        {
          releases.map((release) => (
            <p class="border-t border-line py-2 text-sm text-muted">{release}</p>
          ))
        }
      </div>
    </ScrollArea>
    import { Component } from "@angular/core";
    import { ScrollArea } from "./markas/scroll-area.component";
    
    @Component({
      selector: "markas-example",
      imports: [ScrollArea],
      template: `
        <div
          markas-scroll-area
          label="Releases"
          class="max-h-56 border border-line bg-surface"
        >
          <div class="p-4">
            <p class="mb-2 text-sm font-medium text-ink">Releases</p>
            @for (release of releases; track release) {
              <p class="border-t border-line py-2 text-sm text-muted">
                {{ release }}
              </p>
            }
          </div>
        </div>
      `,
    })
    export default class ScrollAreaExample {
      protected readonly releases = Array.from(
        { length: 12 },
        (_, i) => `v2.${12 - i}.0`,
      );
    }

    Examples

    Horizontal

    Morning light

    City nights

    Slow mornings

    Coastline

    Weekend drive

    Rain sounds

    Morning light

    City nights

    Slow mornings

    Coastline

    Weekend drive

    Rain sounds

    Morning light

    City nights

    Slow mornings

    Coastline

    Weekend drive

    Rain sounds

    Morning light

    City nights

    Slow mornings

    Coastline

    Weekend drive

    Rain sounds

    Morning light

    City nights

    Slow mornings

    Coastline

    Weekend drive

    Rain sounds

    Both directions

    Mon
    Tue
    Wed
    Thu
    Fri
    Sat
    Sun
    08:00
    09:00
    10:00
    11:00
    12:00
    13:00
    14:00
    15:00
    16:00
    17:00
    Mon
    Tue
    Wed
    Thu
    Fri
    Sat
    Sun
    08:00
    09:00
    10:00
    11:00
    12:00
    13:00
    14:00
    15:00
    16:00
    17:00
    Mon
    Tue
    Wed
    Thu
    Fri
    Sat
    Sun
    08:00
    09:00
    10:00
    11:00
    12:00
    13:00
    14:00
    15:00
    16:00
    17:00
    Mon
    Tue
    Wed
    Thu
    Fri
    Sat
    Sun
    08:00
    09:00
    10:00
    11:00
    12:00
    13:00
    14:00
    15:00
    16:00
    17:00
    Mon
    Tue
    Wed
    Thu
    Fri
    Sat
    Sun
    08:00
    09:00
    10:00
    11:00
    12:00
    13:00
    14:00
    15:00
    16:00
    17:00

    In a card

    Notifications

    • Dewi Lestari commented on Q3 roadmap

      2m ago

    • Budi Santoso assigned you to Invoice export

      15m ago

    • Siti Aminah shared Brand guidelines

      1h ago

    • Rizky Pratama closed Login timeout bug

      3h ago

    • Ayu Wulandari mentioned you in Weekly sync

      Yesterday

    • Fajar Nugroho uploaded Pricing v2.pdf

      2 days ago

    Notifications

    • Dewi Lestari commented on Q3 roadmap

      2m ago

    • Budi Santoso assigned you to Invoice export

      15m ago

    • Siti Aminah shared Brand guidelines

      1h ago

    • Rizky Pratama closed Login timeout bug

      3h ago

    • Ayu Wulandari mentioned you in Weekly sync

      Yesterday

    • Fajar Nugroho uploaded Pricing v2.pdf

      2 days ago

    Notifications

    • Dewi Lestari commented on Q3 roadmap

      2m ago

    • Budi Santoso assigned you to Invoice export

      15m ago

    • Siti Aminah shared Brand guidelines

      1h ago

    • Rizky Pratama closed Login timeout bug

      3h ago

    • Ayu Wulandari mentioned you in Weekly sync

      Yesterday

    • Fajar Nugroho uploaded Pricing v2.pdf

      2 days ago

    Notifications

    • Dewi Lestari commented on Q3 roadmap

      2m ago

    • Budi Santoso assigned you to Invoice export

      15m ago

    • Siti Aminah shared Brand guidelines

      1h ago

    • Rizky Pratama closed Login timeout bug

      3h ago

    • Ayu Wulandari mentioned you in Weekly sync

      Yesterday

    • Fajar Nugroho uploaded Pricing v2.pdf

      2 days ago

    Notifications

    • Dewi Lestari commented on Q3 roadmap

      2m ago

    • Budi Santoso assigned you to Invoice export

      15m ago

    • Siti Aminah shared Brand guidelines

      1h ago

    • Rizky Pratama closed Login timeout bug

      3h ago

    • Ayu Wulandari mentioned you in Weekly sync

      Yesterday

    • Fajar Nugroho uploaded Pricing v2.pdf

      2 days ago

    Installation

    npx markasui@latest add scroll-area

    Usage

    <x-markas.scroll-area label="Releases" class="max-h-56 border border-line">
        <div class="p-4">...</div>
    </x-markas.scroll-area>
    import { ScrollArea } from "@/components/markas/ScrollArea";
    
    <ScrollArea label="Releases" className="max-h-56 border border-line">
      <div className="p-4">...</div>
    </ScrollArea>;
    <template>
      <ScrollArea label="Releases" class="max-h-56 border border-line">
        <div class="p-4">...</div>
      </ScrollArea>
    </template>
    <script lang="ts">
      import ScrollArea from "$lib/components/markas/ScrollArea.svelte";
    </script>
    
    <ScrollArea label="Releases" class="max-h-56 border border-line">
      <div class="p-4">...</div>
    </ScrollArea>
    ---
    import ScrollArea from "@/components/markas/ScrollArea.astro";
    ---
    
    <ScrollArea label="Releases" class="max-h-56 border border-line">
      <div class="p-4">...</div>
    </ScrollArea>
    import { Component } from "@angular/core";
    import { ScrollArea } from "./markas/scroll-area.component";
    
    @Component({
      selector: "app-example",
      imports: [ScrollArea],
      template: `
        <div
          markas-scroll-area
          label="Releases"
          class="max-h-56 border border-line"
        >
          <div class="p-4">...</div>
        </div>
      `,
    })
    export class Example {}

    Angular uses an attribute selector on a native div, so the size classes stay on the region.

    • Set the size limit with a class such as max-h-56 or max-w-sm. Without it nothing scrolls.
    • Use orientation="horizontal" for a row of cards and orientation="both" for wide grids.
    • The scrollbar is native, only thinner and in token colors, so no JavaScript is needed.

    Props

    NameTypeDefaultDescription
    orientation"vertical" | "horizontal" | "both""vertical"Direction the content can scroll. The other direction is clipped unless you pick both.
    labelstringScrollable contentAccessible name of the region. Describe the content, for example Releases.
    classstring-Set the size limit here, for example max-h-64 or max-w-sm, plus any border or background.

    Accessibility

    • Uses role=region with aria-label so screen reader users can find and identify the scrollable area.
    • Has tabindex=0, so keyboard users can focus it and scroll with the arrow keys, Page Up, and Page Down.
    • Shows a visible focus outline and keeps the native scrollbar, only thinner and in token colors.

    Related components

    More data components with the same classes in every framework.