Patterns from production · Elements
Status is a dot and a word
A dot for the eye, a word for everyone, and nothing when away from it.
Status is a dot and a word
Try the controls to see the rule.
The rule
Show a person’s status as a dot on their picture and a word beside it: online, away, do not disturb, live. To other people, offline and invisible show no dot at all; never show “last seen”. The dot is decoration (aria-hidden), and the picture’s name carries the word.
Tokens used
space.md12pxcolor.text.primarytheme.text.primarysize.tap44pxmotion.duration.base260ms
Native spec · generated from this pattern and the shared token registry
struct OvStatusDot: 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, color.text.primary=theme.text.primary, size.tap=44px, motion.duration.base=260ms@Composable
fun OvStatusDot(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, color.text.primary=theme.text.primary, size.tap=44px, motion.duration.base=260ms