Skip to main content

List

A list of items.

!array('This is an implementation, and renaming, of schema.org ')ItemList!array('. Renaming was done as ')List!array(' was considered a more developer friendly alternative. Similarly, schema.org properties ')itemListElement!array(' and ')itemListOrder!array(' were renamed to ')items!array(' and ')order!array('. 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.')

!array('Analogues of ')List!array(' in other schema include:')

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"
]
}
]
}

Related#

  • Parent: Entity
  • Descendants: None

Available as#

Source#

This documentation was generated from List.schema.yaml.