This section describes a Forge preview feature. Preview features are deemed stable; however, they remain under active development and may be subject to shorter deprecation windows. Preview features are suitable for early adopters in production environments.
We release preview features so partners and developers can study, test, and integrate them prior to General Availability (GA). For more information, see Forge release phases: EAP, Preview, and GA.
To add the List
and ListItem
components to your app:
1 2import { List, ListItem } from "@forge/react";
An unordered (bulleted) or ordered (numbered) list.
Name | Type | Required | Description |
---|---|---|---|
type | "ordered" | "unordered" | No | The ordered type should be used when representing an ordered list of items. The unordered type should be used when representing an unordered list of items. The type is set to unordered by default |
children | Array<ListItem> | Yes | The items to render inside a List group. |
An unordered list is rendered with bullets.
1 2import { List, ListItem } from '@forge/react'; const App = () => { return ( <List type="unordered"> <ListItem>Confluence</ListItem> <ListItem>Jira</ListItem> <ListItem>Bitbucket</ListItem> </List> ); };
A nested unordered list. Bullet styles rotate in the following order when nested: Disc, Circle, Square.
1 2import { List, ListItem } from '@forge/react'; const App = () => { return ( <List type="unordered"> <ListItem>One</ListItem> <List type="unordered"> <ListItem>Two</ListItem> <List type="unordered"> <ListItem>Three</ListItem> <List type="unordered"> <ListItem>Four</ListItem> <List type="unordered"> <ListItem>Five</ListItem> <List type="unordered"> <ListItem>Six</ListItem> </List> </List> </List> </List> </List> </List> ); };
An ordered (numbered) list
1 2import { List, ListItem } from '@forge/react'; const App = () => { return ( <List type="ordered"> <ListItem>Confluence</ListItem> <ListItem>Jira</ListItem> <ListItem>Bitbucket</ListItem> </List> ); };
A nested ordered list. Bullet styles rotate in the following order when nested: Decimal, Lower-Alpha, Lower-Roman.
1 2import { List, ListItem } from '@forge/react'; const App = () => { return ( <List type="ordered"> <ListItem>One</ListItem> <List type="ordered"> <ListItem>Two</ListItem> <List type="ordered"> <ListItem>Three</ListItem> <List type="ordered"> <ListItem>Four</ListItem> <List type="ordered"> <ListItem>Five</ListItem> <List type="ordered"> <ListItem>Six</ListItem> </List> </List> </List> </List> </List> </List> ); };
A nested list with a mix of unordered and ordered lists, which maintains the aforementioned bullet style pattern at each nest level regardless of list type.
1 2import { List, ListItem } from '@forge/react'; const App = () => { return ( <List type="ordered"> <ListItem>Confluence</ListItem> <List type="unordered"> <ListItem>One</ListItem> <ListItem>Two</ListItem> <List type="unordered"> <ListItem>Three</ListItem> </List> </List> <ListItem>Jira</ListItem> <List type="unordered"> <ListItem>One</ListItem> <ListItem>Two</ListItem> <List type="unordered"> <ListItem>Three</ListItem> </List> </List> </List> ); };
Rate this page: