Button pill
Button pill allows users to toggle an element to their favourites.
React
unsupportedVue
unsupportedElements
unsupportedAndroid
unsupportediOS
releasedExample
Usage
Design Guidelines
See Figma: Warp - Components / Button pill
Questions?
Feel free to ask any questions on usage in the Warp DS Slack channel: #smp-warp-design-system
Frameworks
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
).uiView
Parameters
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. |