Patterns from production · Layout that holds
Decorations stay out of content
A flourish lands on its own bar’s edge and fades there.
Decorations stay out of content
Try the controls to see the rule.
The rule
A decoration (a seasonal fall, confetti, a sparkle) moves only inside the bar or element it belongs to, and settles on that edge. It never crosses a heading, a field or text, and reduced motion turns it off.
Tokens used
motion.duration.slow360msmotion.easing.standardcubic-bezier(.2,.7,.2,1)motion.duration.reduced0mssize.tap44pxspace.md12pxmotion.duration.base260ms
Native spec · generated from this pattern and the shared token registry
struct OvDecorStaysOut: 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: motion.duration.slow=360ms, motion.easing.standard=cubic-bezier(.2,.7,.2,1), motion.duration.reduced=0ms, size.tap=44px, space.md=12px, motion.duration.base=260ms@Composable
fun OvDecorStaysOut(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: motion.duration.slow=360ms, motion.easing.standard=cubic-bezier(.2,.7,.2,1), motion.duration.reduced=0ms, size.tap=44px, space.md=12px, motion.duration.base=260ms