Patterns from production · Elements

Ask with a button

The next step is the most visible thing on the page.

Ask with a buttonLive demo

Try the controls to see the rule.

The rule

A page that needs an account says what it is for in one sentence, then offers one primary button that signs in and comes straight back. Never a bare link inside the sentence.

Tokens used

  • size.tap44px
  • color.accent.basetheme.accent
  • radius.pill999px
  • space.md12px
  • motion.duration.base260ms

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

SwiftUI
struct OvAskWithAButton: 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, color.accent.base=theme.accent, radius.pill=999px, space.md=12px, motion.duration.base=260ms
Compose
@Composable
fun OvAskWithAButton(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, color.accent.base=theme.accent, radius.pill=999px, space.md=12px, motion.duration.base=260ms