BadgeProminence
The visual prominence of a badge.
Declaration
type BadgeProminence = 'decreased' | 'increased' | 'standard';struct BadgeProminencePass a literal, or build one with SwiftUI.BadgeProminence from import { SwiftUI } from 'swiftui-react-native'.
Type properties
'decreased'SwiftUI.BadgeProminence.decreasedThe lowest level of prominence for a badge.
'increased'SwiftUI.BadgeProminence.increasedThe highest level of prominence for a badge.
'standard'SwiftUI.BadgeProminence.standardThe standard level of prominence for a badge.
Overview
Badges can be used for different kinds of information, from the passive number of items in a container to the number of required actions. The prominence of badges in Lists can be adjusted to reflect this and be made to draw more or less attention to themselves.
Badges will default to standard prominence unless specified.
The following example shows a List displaying a list of folders
with an informational badge with lower prominence, showing the number
of items in the folder.
List(folders) { folder in
Text(folder.name)
.badge(folder.numberOfItems)
}
.badgeProminence(.decreased)From Apple’s SwiftUI documentation. Code samples there are Swift.
Used by
See also
More in Appearance.
- BackgroundProminenceThe prominence of backgrounds underneath other views.
- ButtonSizingThe sizing behavior of Buttons and other button-like controls.
- ColorA representation of a color that adapts to a given context.
- ColorRenderingModeThe set of possible working color spaces for color-compositing operations.
- ColorResolvedA concrete color value.
- ColorResolvedHDRA concrete color value, including HDR headroom information.
- ColorRGBColorSpaceA profile that specifies how to interpret a color value for display.
- ColorSchemeThe possible color schemes, corresponding to the light and dark appearances.
- GlassA structure that defines the configuration of a physical glass material.
- GlassChainGlass with chained calls: SwiftUI.Glass.interactive(...).
- ImageScaleA scale to apply to vector images relative to text.
- ProminenceA type indicating the prominence of a view hierarchy.