List
Create a list of children with text between each child. The text to join with
is specified by providing either joiner children, or providing boolean
props for the punctuation and line breaks. The default joiner is no
punctuation and a hard break. The ender prop can provide text to place at
the end of the list when there is at least one child.
import { List } from "@alloy-js/core";
<List comma doubleHardline ender={Children} enderPunctuation hardline joiner={Children} line literalline semicolon softline space> {children}</List>import { List } from "@alloy-js/core/stc";
List({ comma: boolean, doubleHardline: boolean, ender: Children, enderPunctuation: boolean, hardline: boolean, joiner: Children, line: boolean, literalline: boolean, semicolon: boolean, softline: boolean, space: boolean,}).children(children)| children | optionalChildren |
| comma | optionalbooleanPlace a comma between each element |
| doubleHardline | optionalbooleanPlace two hardlines between each element |
| ender | optionalChildrenText to place at the end of the list when there is at least one item. If set to true, the joiner is used. |
| enderPunctuation | optionalbooleanPlace the join punctuation at the end, but without a line break. |
| hardline | optionalbooleanPlace a hardline ( |
| joiner | optionalChildrenText to place between each element |
| line | optionalbooleanPlace a regular line ( |
| literalline | optionalbooleanPlace a literal line ( |
| semicolon | optionalbooleanPlace a semicolon between each element |
| softline | optionalbooleanPlace a softline ( |
| space | optionalbooleanPlace a space between each element |