Skip to main content
Version: latest
Server Component

List is best rendered on the server. Use the standard import (e.g. @prokodo/ui/list) — the library detects the runtime automatically.

List

List renders semantic <ul> or <ol> lists with optional icon bullets and support for nested sub-lists.

Live demo →

Overview

import { List } from "@prokodo/ui/list"
;<List
items={[
{ text: "First item" },
{ text: "Second item", children: [{ text: "Nested item" }] },
]}
/>

Import

import { List } from "@prokodo/ui/list"

CSS:

import "@prokodo/ui/list.css"

Props

PropTypeDefaultRequiredDescription
itemsListDefaultItemProps[] | ListCardItemProps[]List items array.
type"default" | "icon" | "card""default"Visual list type.
colorVariantsAccent color variant.
optionsListDefaultOptionsConfiguration options for default/icon type.
onClick(item: ListDefaultItemProps) => voidClick handler for list items.
classNameDescstringCSS class on item description element.
classNamestringCSS class on root element.

See src/components/list/List.model.ts for the full ListProps type.


Design Tokens

List does not define component-specific CSS custom properties. Override appearance by customising the following global design-system tokens on :root or a scoped ancestor:

TokenDescription
--pk-space-xsVertical item spacing and icon top margin
--pk-space-smIcon wrapper right padding
--pk-space-mdCard-style item margin and content padding
--pk-color-mutedDefault item text color
--pk-color-surface-raisedIcon bubble background (light mode)
--pk-color-brandHover accent color and color="primary" item color

WCAG 2.2 Status

CriterionNameStatusNote
1.3.1Info and Relationships (A)✅ FulfilledSemantic structure (headings, lists, labels, landmarks) must be conveyed programmatically via HTML or ARIA.
1.3.2Meaningful Sequence (A)🔍 Manual reviewContent reading order in the DOM must match the intended visual presentation order.
1.4.3Contrast (Minimum) (AA)🔍 Manual reviewText must have a contrast ratio of at least 4.5:1 (3:1 for large text). Verify against the final product theme.
2.4.6Headings and Labels (AA)🔍 Manual reviewHeadings and labels must describe the topic or purpose of their associated content.
4.1.2Name, Role, Value (A)✅ FulfilledName, role, and state of all interactive UI components must be programmatically determinable via native HTML semantics or ARIA.

Test coverage: 2 jest-axe assertion(s) across 1 test file(s) · 4 ARIA attribute occurrence(s) in source scan. Criteria marked 🔍 require manual verification in the final product integration and theme context.

Storybook

👉 Open List in Storybook


Source

src/components/list/List.model.ts