List Badge
Generates a badge for the view from an integer value.
Platform Compatibility
Tags
SwiftUI Code
List {
Section("Header") {
Text("Foo")
.badge("1")
Text("Bar")
.badge(2)
}
}Found an issue or have a suggestion?
More List Components
View allOutline Group
A structure that computes views and disclosure groups on demand from an underlying collection of tree-structured, identified data.
Disclosure Group
A view that shows or hides another content view, based on the state of a disclosure control.
Section Index Label and Visibility
Sets the label that is used in a section index to point to this section, typically only a single character long. Changes the visibility of the list section index.
Explore Other Components
Browse allCustom Labeled Content
Creates a standard labeled element, with a view that conveys the value of the element and a label.
CircularProgressViewStyle
The style of a progress view that uses a circular gauge to indicate the partial completion of an activity
AccessoryCircularGaugeStyle
A gauge style that displays an open ring with a marker that appears at a point along the ring to indicate the gauge’s current value
Future DatePicker
Creates an instance that selects multiple dates on or after some start date