Scroll area

A box that scrolls its content with the native scrolling and a thin themed scrollbar (Mantine's ScrollArea). Edge shadows tell there is more; ray-reach-end fires at the end (load the next page).

Source on GitHub

An endless list: ray-reach-end loads the next page
Notifications12 loaded
    The shadows show which way there is more. Scroll to the end: ray-reach-end fires once, the next 12 load, and it fires again at the new end. scrollToStart() scrollToEnd()
    Horizontal, scrollbar on hover
    DashboardSidebar, tables, charts
    ChatThreads and presence
    StoreCatalog, cart, checkout
    BlogPosts, tags, RSS
    DocsSearch and a sidebar
    Mobile appApp shell and bottom nav
    Status pageUptime and incidents
    max-height: grows, then scrolls
    • release-notes.md12 KB
    • screenshot-dark.png1.8 MB
    Add a fileClear
    Code

    API

    For AI agents: this API as Markdown, or every component in llms-full.txt.

    <ray-scroll-area> · RayScrollArea

    Give it a size: height, max-height, CSS, or a flex/grid parent. The scrolling box is focusable (keyboard scrolling); name it with label when it holds a region of its own.

    PropertyAttributeTypeDefaultDescription
    heightheightstringHeight (CSS length).
    maxHeightmax-heightstringMaximum height: it grows with its content up to this, then scrolls.
    orientationorientation reflectsvertical | horizontal | bothverticalWhich ways it scrolls.
    typetype reflectsauto | hover | neverautoThe scrollbar: auto (when it scrolls), hover (while hovered or scrolling), never (still scrolls).
    noShadowsno-shadows reflectsbooleanNo edge shadows.
    thresholdthresholdnumber48Distance from the end (px) at which ray-reach-end fires.
    labellabelstringAccessible name: makes the scrolling box a named region.
    EventDescription
    ray-reach-endThe end came within threshold (once per arrival): the bottom, or the right when horizontal (the left right to left).
    SlotDescription
    (default)The content.
    PartDescription
    viewportThe scrolling box.
    shadowThe edge shadows.