Dots

Availability List

Rows of features that each work, wait in a queue or are paused, shown as words plus an icon.

During maintenance

  • Card paymentsOnline and in stores, Works
  • TransfersSent after 04:30, Queued
  • ExchangeRates are on hold, Paused
import {
  AvailabilityItem,
  AvailabilityList,

The AvailabilityList component tells the user what they can still do right now: during maintenance, under an account restriction, while a card is frozen or after a lockout. Each row names a feature, says what it means at the moment and shows its state as a word plus an icon. Use it when the answer is a state per feature. For label and value details such as fees or terms, use KeyValue. For the steps of a process over time, use StatusTimeline.

Installation

pnpm dlx shadcn@latest add @dots/availability-list

Usage

import {
  AvailabilityItem,
  AvailabilityList,
} from "@/components/ui/availability-list"
<AvailabilityList label="During maintenance">
  <AvailabilityItem
    title="Card payments"
    description="Online and in stores"
    status="works"
  />
  <AvailabilityItem
    title="Transfers"
    description="Sent after 04:30"
    status="queued"
  />
</AvailabilityList>

Composition

Use the following composition to build an availability list:

AvailabilityList
└── AvailabilityItem

Features

  • Three states: works, queued and paused, each shown as a word plus an icon, never color alone
  • An optional heading that also names the list, with a configurable heading level
  • An optional round icon tile per row
  • Custom status words through statusLabel, such as "Delayed" or "Off", while the icon stays
  • No background of its own, so it sits in a card or sheet

Without icons

Leave out icon for a compact list. Put working features first, then queued, then paused.

While your card is frozen

  • Incoming transfersCredited as usual, Works
  • SubscriptionsCharged when you unfreeze, Queued
  • Card paymentsDeclined until you unfreeze, Paused
import {
  AvailabilityItem,
  AvailabilityList,

Custom status words

Use statusLabel to replace the status word when "Queued" or "Paused" does not fit. Without a label, pass aria-label to name the list.

  • Bank top-upsCredited after 04:30, Delayed
  • Cash withdrawalsNot available in this country, Off
import {
  AvailabilityItem,
  AvailabilityList,

Accessibility

AvailabilityList renders a real list (<ul role="list">) of <li> rows.

Name the list

With label, the heading names the list through aria-labelledby. Set headingLevel so the heading fits the page outline. Without label, pass aria-label or aria-labelledby.

<AvailabilityList aria-label="Services right now">
  {/* items */}
</AvailabilityList>

State in words

Each row reads as the title and the description, followed by the status word. The status icon and the row icon are hidden from assistive tech, so the status word must carry the meaning. Keep statusLabel short and clear.

API Reference

AvailabilityList

The list and its optional heading. Accepts all <div> props except title.

PropTypeDefaultDescription
labelReact.ReactNode-What the rows answer, e.g. "Still works". Also names the list.
headingLevel2 | 3 | 4 | 5 | 63Heading level of the label in the page outline.
aria-labelstring-Names the list when there is no label. Ignored when label is set.
aria-labelledbystring-Names the list by another element when there is no label.
childrenReact.ReactNode-AvailabilityItem elements.
classNamestring-Additional classes to apply to the root.

AvailabilityItem

One feature and its state. Accepts all <li> props except title and children.

PropTypeDefaultDescription
titleReact.ReactNode-The feature, e.g. "Card payments". Required.
status"works" | "queued" | "paused"-The state of the feature. Required.
descriptionReact.ReactNode-What it means right now, e.g. "Sent after 04:30".
iconReact.ReactNode-An icon for the feature, shown in a round tile.
statusLabelstring-Replaces the status word. The status icon stays.
classNamestring-Additional classes to apply to the row.