Typography


Page Summary


Specifications references

Implementation in Jetpack Compose

TextStyles

ODS library uses the Material type system. TextStyles are accessed via MaterialTheme.typography. Retrieve the TextStyles like so:

Text(
    text = "Subtitle2 styled",
    style = MaterialTheme.typography.titleS
)

OdsText composables

ODS library also provides OdsText composables already using specific styles. They are here to simplify the code you write.

For example, to display a text styled with subtitle2 typo, you can write:

OdsTextSubtitle2(text = "Subtitle2 styled")

Optional parameters are:

  • a Modifier
  • an OdsDisplaySurface which allow to force elements appearance to be displayed on light or dark surface.