function badgeBuilder()
Creates a view builder for a badge element (small pill-shaped label).
function badgeBuilder(
text?: BindingOrValue<StringConvertible>,
background?: UIColor | UIColor.ColorName,
textColor?: UIColor | UIColor.ColorName,
padding?: StyleOverrides.Offsets,
borderRadius?: string | number,
): TextBuilder;
Parameters
- text — The badge text, or a binding.
- background — The background color, or a binding; defaults to ‘shade’ color.
- textColor — The text color, or a binding.
- padding — The padding within the badge; defaults to 8 px horizontally.
- borderRadius — The border radius of the badge; defaults to 1 em.
Return value
A builder object for configuring the badge.
Related
class UIText
A view class that represents a text element.
