LavaUI docs GitHub

struct ExpandStyle

Swift

struct ExpandStyle

Colours and metrics for an Expand disclosure.

Sources/LavaUI/Expand.swift:153

Constructors

init(collapsedChevron: String? = nil, expandedChevron: String? = nil, titleColor: Color? = nil, background: Color? = nil, border: Color? = nil, hoverFill: Color? = nil, cornerRadius: Float? = nil, borderWidth: Float = 1, headerPadding: Float = 10, contentPadding: Float = 10, transition: Transition = .slide(dy: -14))

Creates a style. Colours and radius left nil come from the current theme.

Sources/LavaUI/Expand.swift:178

Properties

var background: Color

Fill inside the outline.

Sources/LavaUI/Expand.swift:161

var border: Color

Colour of the outline.

Sources/LavaUI/Expand.swift:163

var borderWidth: Float

Width of the outline, in points.

Sources/LavaUI/Expand.swift:169

var collapsedChevron: String?

Optional custom header glyph while collapsed; nil uses the drawn chevron.

Sources/LavaUI/Expand.swift:155

var contentPadding: Float

Space around the content, in points.

Sources/LavaUI/Expand.swift:173

var cornerRadius: Float

Corner radius of the outline, in points.

Sources/LavaUI/Expand.swift:167

var expandedChevron: String?

Optional custom header glyph while expanded; nil uses the drawn chevron.

Sources/LavaUI/Expand.swift:157

var headerPadding: Float

Space around the header text, in points.

Sources/LavaUI/Expand.swift:171

var hoverFill: Color

Fill under the header while the pointer is over it.

Sources/LavaUI/Expand.swift:165

var titleColor: Color

Colour of the header text.

Sources/LavaUI/Expand.swift:159

var transition: Transition

How the content appears and disappears.

Sources/LavaUI/Expand.swift:175