import { List } from "@pixxl-tools/components";
// In Server Components:
import { List } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
variant | "bullet" | "default" | "ordered" | — | default: rows of ListItems (no markers; menus, settings, results). bullet / ordered: a content list with real <ul> / <ol> semantics, disc / number markers and Prose spacing — fill it with <li> (or <ListItem as="li">). |
as | "ul" | "ol" | "div" | — | Element to render. Default: ul for variant="bullet", ol for variant="ordered", div otherwise. |
density | "default" | "compact" | — | Space between items: default or compact. |
variant"bullet" | "default" | "ordered"
default: rows of ListItems (no markers; menus, settings, results). bullet / ordered: a content list with real <ul> / <ol> semantics, disc / number markers and Prose spacing — fill it with <li> (or <ListItem as="li">).
as"ul" | "ol" | "div"
Element to render. Default: ul for variant="bullet", ol for variant="ordered", div otherwise.
density"default" | "compact"
Space between items: default or compact.
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
<List><ListItem>Layer</ListItem></List>
<List variant="bullet"><li>Real list semantics</li></List>