Button pill
Button pill allows users to toggle an element to their favourites.
iOSreleased
Usage
Design Guidelines
See Figma: Warp - Components / Button pill
Framework(s)
Syntax
swift
Warp.ButtonPill(
type: ButtonPillType,
selected: Binding<Bool>
)swift
Warp.ButtonPill(
type: .overlay,
selected: $isSelected
)Visual options
There are a variety of variants supported for the ButtonPill component:
swift
enum Warp.ButtonPillType {
/// A pill with an overlay appearance.
case overlay
/// A pill with a flat appearance.
case flat
}Legacy support
By default all Warp components return a SwiftUI View but there is always a UIKit UIView available to use also.
swift
Warp.ButtonPill(
type: .overlay,
selected: $isSelected
).uiViewParameters
Required props
| name | type | default | notes |
|---|---|---|---|
type | Warp.ButtonPillType | The type of the button ( | |
selected | Binding Bool | A binding to the selected state of the button. |
Questions?
Feel free to ask any questions on usage in the Warp DS Slack channel: #warp-design-system