Slab
Slab

What's new

0.3.1

Eight new components, from Table to Date Range Picker, submenus in Menu, and Listboxes of thousands of Options.

0.3.1 brings eight new components, submenus for Menu, and a virtual attribute for Listbox and Combobox that keeps a list of thousands of Options quick. It's a patch release with nothing to restyle, so updating is safe.

TL;DR The short version

  1. Eight new components, each headless, with its keyboard, ARIA and form support done.
  2. Table, Grid List and Sortable List for data, and Date Picker and Date Range Picker for days.
  3. Menus open submenus, from the keyboard, a click or the pointer resting on a Menu Item.
  4. Listbox and Combobox take virtual, and are much faster with long lists either way.
  5. Nothing to restyle: every change adds to what you have.

New components

Every one is live below, styled the way this site styles them.

  • Slab Yards Poured Driveway 12 2026-09-14 Garage 18 2026-08-30 Patio 8 2026-10-02 Total 38

    Table

    Rows and cells that components can render into, laid out like a native <table>. A sortable Column Header sorts its column and says how.

    Docs for Table
  • Alert Dialog

    A modal Dialog that asks before something can't be undone. Focus starts on Cancel, and a click outside doesn't close it.

    Docs for Alert Dialog
  • Grid lines Snap to grid Rebar

    Toggle Button

    A native button with aria-pressed, for one setting that's on or off, such as Bold or Mute.

    Docs for Toggle Button
  • Driveway, 12 yards Ticket Garage, 18 yards Ticket Patio, 8 yards Ticket Walkway, not poured yet

    Grid List

    Rows that hold their own buttons, links and checkboxes. Up and Down move between rows, Left and Right into them, and rows can be selected.

    Docs for Grid List
  • The plant needs two days' notice.

    Date Picker

    A Date Field with a button that opens a Calendar in a popover, the same in every browser and yours to style.

    Docs for Date Picker
  • Press Escape to clear it.

    Search Field

    A search input with a button that clears it, and Escape that does the same in every browser.

    Docs for Search Field
  • The crew needs at least one dry day in the window.

    Date Range Picker

    A Date Range Field with one range Calendar in a popover, so the start and the end are picked together.

    Docs for Date Range Picker
  • Footings Foundation walls Garage slab Driveway

    Sortable List

    A list put in order by dragging each item's handle or with the keyboard, while a screenreader hears where the item is.

    Docs for Sortable List

Also new

  • Submenus

    A slab-menu inside another, with a slab-menu-item as its anchor, opens beside that Menu Item. Right, Enter or a pause under the pointer opens it, and Left or Escape closes it.

  • Virtual lists

    virtual on Listbox and Combobox lays out only the Options near view, while the keys, typeahead, filtering and selection still reach every one.

  • Showcase

    Four pages built from Slab and themed four ways, to see the components together in something like an app.

Fixes

A line each, and the components it's in.

Screenreaders

  • The anchor's aria-details points at the card, and a label makes the card a named group.

Speed

  • A thousand Options appear at once rather than in seconds, since an Option that connects or changes no longer makes work for every other.

Upgrade

Install
pnpm add slab-elements@0.3.1

Every change, in full, is in the release notes.