Skip to content

List ​

SList is a presentational list of rows: settings, files, contacts, search results. Rows are SListItem — a title, an optional second line, and free slots at both ends for an icon, an avatar or a trailing action. The list keeps no state of its own: it frames the rows and sets their density.

It is neither a menu nor a picker. SDropdownMenu is a menu of commands that opens from a trigger and closes on choice. SListbox is a selection control: it owns a value, a v-model and keyboard navigation. SList does none of that — a row is interactive only when you make it a link (href) or an action (clickable).

Markup is div role="list" with div role="listitem" rows rather than ul/li: library markup stays neutral, so host styles cannot reach into it through tag selectors. A link or an action row keeps its own link/button role and is nested inside the listitem wrapper, so assistive technology announces both the position in the list and the control.

Basic usage ​

Plain rows with a title and a description. label gives the list an accessible name.

Storage almost full94% of 50 GB used
New device signed inChrome on macOS
Backup finished2 minutes ago

Dividers, icons and meta ​

variant="divided" separates the rows with a hairline; variant="bordered" frames the whole list instead. The icon prop puts an SIcon in front of the title, and the append slot holds trailing meta text or an action.

Quarterly report.pdfShared with 3 people2.4 MB
Meeting notes.txtOnly you860 KB
Drafts12 items—

href renders the row as an <a>, clickable as a <button type="button">; both get the state layer, the pointer cursor and a focus ring. active marks the current row — on a link it also sets aria-current. disabled dims the row and takes it out of the tab order.

The as prop overrides the tag when the shorthands do not fit — as="label" for a row that wraps a checkbox, for instance. Anything else you pass (target, rel, @click) lands on the row, not on the listitem wrapper.

Avatars and actions in the slots ​

prepend and append take any markup, so a row can carry an avatar, a badge or a button. The default slot replaces the title and the description entirely when a row needs its own layout.

AMAlice Moreaualice@example.comOwner
JDJonas Dietrichjonas@example.com

Sizes ​

size on the list sets the density of every row: sm, md (default) or lg.

Small row
Another small row
Medium row
Another medium row
Large row
Another large row

API ​

SList ​

Props

NameTypeDefaultDescription
variant | "bordered" | "plain" | "divided""plain"Framing: plain draws nothing, bordered puts a border with rounded corners around the whole list, divided separates the rows with a hairline.
size"md" | "sm" | "lg""md"Row density: height, padding and text size of every SListItem inside.
labelstringundefinedAccessible name of the list. Set it when the surrounding markup does not already name the list — a screen reader announces it together with the number of rows.

Slots

NameDescription
defaultRows of the list, normally SListItem elements.

SListItem ​

Props

NameTypeDefaultDescription
asstringundefinedTag of the row itself; the listitem wrapper around it stays a div. By default the row is a div, an a when href is set and a button when clickable is.
hrefstringundefinedLink target: renders the row as an a and makes it interactive.
titlestringundefinedRow title (alternative to the title slot). Ignored when the default slot is filled.
descriptionstringundefinedSecondary line under the title (alternative to the description slot).
iconstringundefinedLeading icon: a registry name or a raw SVG path. Ignored when the prepend slot is set.
activebooleanfalseMarks the row as the current one: accent color, aria-current on a link row.
clickablebooleanfalseMakes a plain row an action: it renders as a button and gets the interactive styling. A link row (href) is interactive without it.
disabledbooleanfalseDisables the row: dimmed, ignores the pointer and, for a link or a button row, the keyboard as well.

Slots

NameDescription
prependLeading content: an icon, an avatar or a checkbox. Overrides the icon prop.
defaultRow content, replacing the title and the description.
titleRow title (instead of the title prop).
descriptionSecondary line (instead of the description prop).
appendTrailing content: meta text, a badge or an action button.