Patterns from production · Layout that holds

An even grid: no card alone on a row

Columns that divide the cards.

An even grid: no card alone on a rowLive demo

Try the controls to see the rule.

The rule

Count the cards before choosing the columns. Eight cards are two or four to a row, six are two or three, and a card left alone on the last row is either a ninth worth adding or a column count to change.

Tokens used

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

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

SwiftUI
struct OvEvenGrid: 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: space.md=12px, size.tap=44px, motion.duration.base=260ms
Compose
@Composable
fun OvEvenGrid(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: space.md=12px, size.tap=44px, motion.duration.base=260ms