Lists

Lists can be ordered or unordered, and you can customize their bullet styles too.

A simple list can be made up just of strings, like this:

List {
    "This is a list item"
    "So is this"
    "And this"
}

Lists are unordered by default. Use the listStyle() modifier to change that:

List {
    "This is the first list item"
    "This is the second one"
    "And here's one more"
}
.listStyle(.ordered(.default))
  1. This is the first list item
  2. This is the second one
  3. And here's one more

You can customize the bullet style by adjusting the list style. For example, here are Roman numerals:

List {
    "Veni"
    "Vidi"
    "Vici"
}
.listStyle(.ordered(.lowerRoman))
  1. Veni
  2. Vidi
  3. Vici

And here is a custom style using emoji:

List {
    "The players gonna play"
    "Haters gonna hate"
    "Fakers gonna fake"
}
.listStyle(.custom("💃"))

Created with Ignite