Skip to main content

List

A list of items.

This is an implementation, and renaming, of schema.org ItemList. Renaming was done as List was considered a more developer friendly alternative. Similarly, schema.org properties itemListElement and itemListOrder were renamed to items and order. Note that, as with every other such renaming in Stencila Schema, a mapping between names is defined and it is trivial to save Stencila Schema documents using the schema.org vocabulary if so desired. Analogues of List in other schema include: - JATS XML <list> - HTML <ul> and <ol> - MDAST List - OpenDocument <text:list>

Properties

Name@idTypeDescriptionInherited from
itemsschema:itemListElementArray of ListItemThe items in the listList
idschema:idstringThe identifier for this item.Entity
metastencila:metaobjectMetadata associated with this item.Entity
orderschema:itemListOrder'Ascending', 'Descending', 'Unordered'Type of ordering.List

Examples

{
"type": "List",
"items": [
{
"type": "ListItem",
"content": [
"Item One"
]
},
{
"type": "ListItem",
"content": [
"Item Two"
]
},
{
"type": "ListItem",
"content": [
"Item Three"
]
}
]
}
{
"type": "List",
"items": [
{
"type": "ListItem",
"content": "Item One"
},
{
"type": "ListItem",
"content": [
"This is a nested item",
{
"type": "List",
"order": "ordered",
"items": [
{
"type": "ListItem",
"content": [
"Nested Item One"
]
},
{
"type": "ListItem",
"content": [
"Nested Item Two"
]
},
{
"type": "ListItem",
"content": [
"Nested Item Three"
]
}
]
}
]
},
{
"type": "ListItem",
"content": [
"Item Three"
]
}
]
}
{
"type": "List",
"items": [
{
"type": "ListItem",
"checked": false,
"content": [
"Todo item"
]
},
{
"type": "ListItem",
"checked": true,
"content": [
"Completed todo item"
]
}
]
}
  • Parent: Entity
  • Descendants: None

Available as

Source

This documentation was generated from List.schema.yaml.