Typography
SKText
SKText is the single typography entry point in SKOne. Instead of raw font sizes it takes a semantic role from the type scale, so headings, body copy and labels stay consistent across Compose and XML and respond to density, locale and user font-scale settings.
Usage
SKText.kt
SKText(
text = "Welcome back",
role = SKTextRole.HeadlineMedium,
color = SKTheme.colors.onSurface,
maxLines = 2
)Props
| Prop | Type | Default | Description |
|---|---|---|---|
| text | String | — | Content to render. |
| role | SKTextRole | BodyMedium | Semantic slot in the type scale. |
| color | Color | SKTheme.colors.onSurface | Resolved text color. |
| maxLines | Int | Int.MAX_VALUE | Line clamp. |
Accessibility
Respects system font scaling up to 200%, exposes text as a single semantics node, and inherits heading semantics when a display or headline role is used.
Theming
Colors resolve from SKTheme.colors; roles resolve from SKTheme.typography.
API surface
- SKText
- SKTextRole
- SKTypography