Patterns from production · Elements

Pill buttons with icons

Use icon and text together for an action.

Pill buttons with iconsLive demo

Try the controls to see the rule.

The rule

Pair a familiar icon with a short action label inside a pill. Keep the full control at least 44 px tall and give icon-only controls an accessible name.

Tokens used

  • size.tap44px
  • radius.pill999px
  • space.md12px
  • motion.duration.base260ms

Native spec · generated from this pattern and the shared token registry

SwiftUI
struct OvIconPills: View {
    let status: String
    @Environment(\.accessibilityReduceMotion) private var reduceMotion
    var body: some View {
        HStack(spacing: OvScale.spaceMd) {
            Text(status).font(.body)
        }
        .frame(minHeight: OvScale.sizeTap)
        .animation(reduceMotion ? .none : .easeOut(duration: OvScale.motionDurationBase), value: status)
    }
}
// Tokens: size.tap=44px, radius.pill=999px, space.md=12px, motion.duration.base=260ms
Compose
@Composable
fun OvIconPills(status: String, reduceMotion: Boolean) {
    Row(
        modifier = Modifier.defaultMinSize(minHeight = OvScale.SizeTap),
        horizontalArrangement = Arrangement.spacedBy(OvScale.SpaceMd),
    ) {
        Text(status, style = MaterialTheme.typography.bodyMedium)
    }
    // Apply motion only when !reduceMotion.
}
// Tokens: size.tap=44px, radius.pill=999px, space.md=12px, motion.duration.base=260ms