List
Ordered or unordered <ul>/<ol> with optional plain-text markers.
import { List } from "@ps1ui/core";Unordered
- install the package
- import the styles entry
- wrap your tree in PS1Root
<List>
<ListItem>install the package</ListItem>
<ListItem>import the styles entry</ListItem>
<ListItem>wrap your tree in PS1Root</ListItem>
</List>Ordered
- parse the argv
- resolve the config
- dispatch the command
- write the exit code
<List ordered>
<ListItem>parse the argv</ListItem>
<ListItem>resolve the config</ListItem>
<ListItem>dispatch the command</ListItem>
<ListItem>write the exit code</ListItem>
</List>Without markers
- install the package
- import the styles entry
- wrap your tree in PS1Root
<List showMarkers={false}>
<ListItem>install the package</ListItem>
<ListItem>import the styles entry</ListItem>
<ListItem>wrap your tree in PS1Root</ListItem>
</List>Nested
- build the package
- run the checks
- typecheck
- unit tests
- visual regression
- publish
<List ordered>
<ListItem>build the package</ListItem>
<ListItem>
run the checks
<List ordered>
<ListItem>typecheck</ListItem>
<ListItem>unit tests</ListItem>
<ListItem>visual regression</ListItem>
</List>
</ListItem>
<ListItem>publish</ListItem>
</List>Props
| Prop | Type | Default | Description |
|---|---|---|---|
showMarkers | boolean | true | Draw the plain-text marker (`-` / `1.`) on each item and reserve its hanging-indent column. Turn it off for lists whose design carries its own separators — the `<ul>`/`<ol>` semantics and the "list, N items" announcement stay either way. |
ordered | boolean | false | Render an <ol> with numbered markers instead of an <ul>. |
All native <ul> attributes are also accepted.
All native <ol> attributes are also accepted except type.
ListItem Props
All native <li> attributes are also accepted.