Docs Components Uncategorized

List

React example follows below.
ts
import { List, ListItem } from "@grassroot/ui-react";
export default function ListDemo() {
return (
<List ordered>
<ListItem>Parse the source.</ListItem>
<ListItem>Build the render plan.</ListItem>
<ListItem>Mount the adapter.</ListItem>
</List>
);
}
ts
<script setup lang="ts">
import { List, ListItem } from "@grassroot/ui-vue";
</script>
<template>
<List :ordered="true">
<ListItem>Parse the source.</ListItem>
<ListItem>Build the render plan.</ListItem>
<ListItem>Mount the adapter.</ListItem>
</List>
</template>
ts
import { Component } from "@angular/core";
import { GrassrootList, GrassrootListItem } from "@grassroot/ui-angular";
@Component({
selector: "app-list-demo",
standalone: true,
imports: [GrassrootList, GrassrootListItem],
host: { style: "display: contents" },
template: `
<grassroot-markdown-list [ordered]="true">
<grassroot-list-item>Parse the source.</grassroot-list-item>
<grassroot-list-item>Build the render plan.</grassroot-list-item>
<grassroot-list-item>Mount the adapter.</grassroot-list-item>
</grassroot-markdown-list>
`,
})
export class ListDemoComponent {}
export default ListDemoComponent;
ts
<script lang="ts">
import { List, ListItem } from "@grassroot/ui-svelte";
</script>
<List ordered>
<ListItem>Parse the source.</ListItem>
<ListItem>Build the render plan.</ListItem>
<ListItem>Mount the adapter.</ListItem>
</List>
ts
/** @jsxImportSource solid-js */
import { List, ListItem } from "@grassroot/ui-solid";
export default function ListDemo() {
return (
<List ordered>
<ListItem>Parse the source.</ListItem>
<ListItem>Build the render plan.</ListItem>
<ListItem>Mount the adapter.</ListItem>
</List>
);
}

Installation

API Reference

Import

import { List, ListItem } from "@grassroot/ui-react";

Props

Prop
Type
Default
Requirement
ordered
boolean | undefined
optional
Prop
ordered
Type
boolean | undefined
Default
Requirement
optional

Content regions

  • children

Native attributes

Standard DOM and ARIA attributes not listed above spread onto the root element.

Import

import { List, ListItem } from "@grassroot/ui-vue";

Props

Prop
Type
Default
Requirement
ordered
boolean | undefined
false
optional
Prop
ordered
Type
boolean | undefined
Default
false
Requirement
optional

Content regions

  • default

Import

import { Component } from "@angular/core";
import { GrassrootList, GrassrootListItem } from "@grassroot/ui-angular";

Props

Prop
Type
Default
Requirement
ordered
boolean
false
optional
className
string
optional
Prop
ordered
Type
boolean
Default
false
Requirement
optional
Prop
className
Type
string
Default
Requirement
optional

Content regions

  • default

Import

import { List, ListItem } from "@grassroot/ui-svelte";

Props

Prop
Type
Default
Requirement
ordered
boolean
false
optional
class
string
optional
Prop
ordered
Type
boolean
Default
false
Requirement
optional
Prop
class
Type
string
Default
Requirement
optional

Content regions

  • children

Import

import { List, ListItem } from "@grassroot/ui-solid";

Props

Prop
Type
Default
Requirement
ordered
boolean
optional
className
string
optional
Prop
ordered
Type
boolean
Default
Requirement
optional
Prop
className
Type
string
Default
Requirement
optional

Content regions

  • children

Native attributes

Standard DOM and ARIA attributes not listed above spread onto the root element.