
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGlad to hear you're enjoying Sanity! When it comes to showing ordered (ol) and unordered (ul) lists in the Portable Text editor, you have full control over the list configuration in your schema.
By default, the Portable Text editor includes both bullet (unordered) and numbered (ordered) lists. They appear as toolbar buttons in the editor:
export default {
name: 'content',
type: 'array',
of: [
{
type: 'block',
// Lists are enabled by default
}
]
}You can explicitly configure which lists are available using the lists property:
export default {
name: 'content',
type: 'array',
of: [
{
type: 'block',
lists: [
{title: 'Bullet', value: 'bullet'},
{title: 'Numbered', value: 'number'}
]
}
]
}To disable lists entirely, just pass an empty array:
lists: [] // no listsTo enable only one type, just include that one:
lists: [
{title: 'Bullet', value: 'bullet'}
] // only unordered listsYou can also customize the titles that appear in the editor - for example, {title: 'Prioritized', value: 'number'} works just fine!
When rendering your Portable Text content on the frontend using @portabletext/react, lists are automatically rendered as <ul> and <ol> elements. You can customize this with custom serializers if needed.
More details can be found in the Configuring lists for text blocks section of the documentation.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store