Component docs
Loading
import { DataList } from "@pixxl-tools/components";
// In Server Components:
import { DataList } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
items (required) | readonly DataListItem[] | — | Items to render. |
itemsrequiredreadonly DataListItem[]
Items to render.
Other props are passed to the root element (HTMLAttributes<HTMLDListElement>), including className, style, id and aria-* attributes.
const items = [
{ id: "name", label: "Name", value: "candraw" },
{ id: "size", label: "Size", value: "45 kB" },
];
<DataList items={items} />