struct BorderStyle
Swift
struct BorderStyle
A stroke on a view's own edge, lying inside its layout rect.
Colour and width together in one field, rather than two that merge
separately: a border is one decision. Merged per field, a later
.border(.red) in a chain would inherit whatever width an earlier one set
and quietly draw a 4px red frame where the caller asked for a hairline.
Sources/LavaUI/Modifiers.swift:10
Constructors
init(_ color: Color, width: Float = 1)
Creates a border. A negative width is treated as zero.
Sources/LavaUI/Modifiers.swift:17
Properties
var color: Color
The stroke colour.
Sources/LavaUI/Modifiers.swift:12
var width: Float
Pixels, drawn inward from the layout rect's edge.
Sources/LavaUI/Modifiers.swift:14