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.

Stablesince 1.0.0Compose · XMLAll components

Usage

SKText.kt
SKText(
    text = "Welcome back",
    role = SKTextRole.HeadlineMedium,
    color = SKTheme.colors.onSurface,
    maxLines = 2
)

Props

PropTypeDefaultDescription
textString—Content to render.
roleSKTextRoleBodyMediumSemantic slot in the type scale.
colorColorSKTheme.colors.onSurfaceResolved text color.
maxLinesIntInt.MAX_VALUELine 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