Patterns from production · Layout that holds
Tables scroll inside themselves
Whole words in cells; only the table scrolls.
Tables scroll inside themselves
Try the controls to see the rule.
The rule
On a narrow screen, a table keeps its words whole and scrolls sideways inside its own box. The page never scrolls sideways, and a cell never breaks a word mid-letter.
Tokens used
space.md12pxsize.tap44pxmotion.duration.base260ms
Native spec · generated from this pattern and the shared token registry
struct OvTablesScrollInside: 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@Composable
fun OvTablesScrollInside(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