Checklists

List items can be marked complete using checklists.

Checklists (i.e., task lists) are unordered lists that have items marked as checked ([*] or [x]) or unchecked ([ ]). Here’s an example:

Checklist syntax
* [*] checked
* [x] also checked
* [ ] not checked
*     normal list item
Rendered checklist
  • checked

  • also checked

  • not checked

  • normal list item

Not all items in the list have to be checklist items, as the previous example shows.

When checklists are converted to HTML, the checkbox markup is transformed into an HTML checkbox with the appropriate checked state. The data-item-complete attribute on the checkbox is set to 1 if the item is checked, 0 if not. The checkbox is used in place of the item’s bullet.

Since HTML generated by Asciidoctor is usually static, the checkbox is set as disabled to make it appear as a simple mark. If you want to make the checkbox interactive (i.e., clickable), add the interactive option to the checklist (shown here using the shorthand syntax for Options):

Checklist with interactive checkboxes
[%interactive]
* [*] checked
* [x] also checked
* [ ] not checked
*     normal list item
Rendered checklist with interactive checkboxes
  • checked

  • also checked

  • not checked

  • normal list item