Skip to main content
Give us your valuable feedback

It will help us understand how we can serve you better

Give feedback

Foundation

Typography

Elicit emotions and convey specific messages to the users

banner-Typography

Usage

Typography is defined as the science of style, appearance, and structure of fonts that aim to provide convenience and aesthetics to the reader. Effective typography depends not only on the content but also on the presentation visual of the typography itself, starting from the font type, font size and line height. You can chek out the guideline for more detail description.

In your composable function, can use value LegionTheme.typography.{typography_token} on the colors attribute widget. Example below:

@Composable
fun YourComposable() {
Text(
text = stringResource(id = R.string.your_string),
style = LegionTheme.typography.bodyLargeRegular,
color = LegionTheme.colors.tertiary700
)
}

Heading

Common usage : Hero section, Title content or component, Subtitle of title

PreviewProps NameFont SizeLine Height

Heading 1

heading134sp48dp

Heading 2

heading228sp42dp

Heading 3

heading324sp36dp

Heading 4

heading422sp32dp

Heading 5

heading520sp28dp

Heading 6

heading618sp26dp

Heading 1

Create your own typography styles:

val Heading = TextStyle(
fontSize = 34.sp,
lineHeight = 48.sp,
fontWeight = FontWeight.Bold,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val Heading1 = Heading.copy(fontSize = 34.sp, lineHeight = 48.sp)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
heading1 = Heading1
)
...
darkTheme = false,
content = content
)

Heading 2

Create your own typography styles:

val Heading = TextStyle(
fontSize = 34.sp,
lineHeight = 48.sp,
fontWeight = FontWeight.Bold,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val Heading2 = Heading.copy(fontSize = 28.sp, lineHeight = 42.sp)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
heading2 = Heading2
)
...
darkTheme = false,
content = content
)

Heading 3

Create your own typography styles:

val Heading = TextStyle(
fontSize = 34.sp,
lineHeight = 48.sp,
fontWeight = FontWeight.Bold,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val Heading3 = Heading.copy(fontSize = 24.sp, lineHeight = 36.sp)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
heading3 = Heading3
)
...
darkTheme = false,
content = content
)

Heading 4

Create your own typography styles:

val Heading = TextStyle(
fontSize = 34.sp,
lineHeight = 48.sp,
fontWeight = FontWeight.Bold,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val Heading4 = Heading.copy(fontSize = 22.sp, lineHeight = 32.sp)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
heading4 = Heading4
)
...
darkTheme = false,
content = content
)

Heading 5

Create your own typography styles:

val Heading = TextStyle(
fontSize = 34.sp,
lineHeight = 48.sp,
fontWeight = FontWeight.Bold,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val Heading5 = Heading.copy(fontSize = 20.sp, lineHeight = 28.sp)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
heading5 = Heading5
)
...
darkTheme = false,
content = content
)

Heading 6

Create your own typography styles:

val Heading = TextStyle(
fontSize = 34.sp,
lineHeight = 48.sp,
fontWeight = FontWeight.Bold,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val Heading6 = Heading.copy(fontSize = 18.sp, lineHeight = 26.sp)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
heading6 = Heading6
)
...
darkTheme = false,
content = content
)

Body

Common usage : Description, Paragraph, Button, Text Field, Tabs, etc

PreviewProps NameFont Size

Large Reguler

bodyLargeRegular18sp

Large Semibold

bodyLargeSemiBold18sp

Large Bold

bodyLargeBold18sp

Large Italic

bodyLargeItalic18sp

Small Reguler

bodySmallRegular14sp

Small Semibold

bodySmallSemiBold14sp

Small Bold

bodySmallBold14sp

Small Italic

bodySmallItalic14sp

Body Large

Body Large Regular

Create your own typography styles:

val BodyLarge = TextStyle(
fontSize = 18.sp,
lineHeight = 24.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
bodyLargeRegular = BodyLarge
)
...
darkTheme = false,
content = content
)

Body Large Semi Bold

Create your own typography styles:

val BodyLarge = TextStyle(
fontSize = 18.sp,
lineHeight = 24.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val BodyLargeSemiBold = BodyLarge.copy(fontWeight = FontWeight.SemiBold)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
bodyLargeSemiBold = BodyLargeSemiBold
)
...
darkTheme = false,
content = content
)

Body Large Bold

Create your typography styles :

val BodyLarge = TextStyle(
fontSize = 18.sp,
lineHeight = 24.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val BodyLargeBold = BodyLarge.copy(fontWeight = FontWeight.Bold)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
bodyLargeBold = BodyLargeBold
)
...
darkTheme = false,
content = content
)

Body Large Italic

Create your own typography styles:

val BodyLarge = TextStyle(
fontSize = 18.sp,
lineHeight = 24.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val BodyLargeItalic = BodyLarge.copy(fontStyle = FontStyle.Italic)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
bodyLargeItalic = BodyLargeItalic
)
...
darkTheme = false,
content = content
)

Body Small

Body Small Regular

Create your own typography styles :

val BodySmall = TextStyle(
fontSize = 14.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
bodySmallRegular = BodySmall
)
...
darkTheme = false,
content = content
)

Body Small Semi Bold

Create your own typography styles:

val BodySmall = TextStyle(
fontSize = 14.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val BodySmallSemiBold = BodySmall.copy(fontWeight = FontWeight.SemiBold)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
bodySmallSemiBold = BodySmallSemiBold
)
...
darkTheme = false,
content = content
)

Body Small Bold

Create your typography styles:

val BodySmall = TextStyle(
fontSize = 14.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val BodySmallBold = BodySmall.copy(fontWeight = FontWeight.Bold)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
bodySmallBold = BodySmallBold
)
...
darkTheme = false,
content = content
)

Body Small Italic

Create your own typography styles:

val BodySmall = TextStyle(
fontSize = 14.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val BodySmallItalic = BodySmall.copy(fontStyle = FontStyle.Italic)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
bodySmallItalic = BodySmallItalic
)
...
darkTheme = false,
content = content
)

Caption

Common usage: Description, Tags, Chips, Badge, etc

PreviewProps NameFont SizeLine Height

Large Reguler

captionLargeRegular12sp18dp

Large Semibold

captionLargeSemiBold12sp18dp

Large Bold

captionLargeBold12sp18dp

Large Italic

captionLargeItalic12sp18dp

Small Reguler

captionSmallRegular10dp18dp

Small Semibold

captionSmallSemiBold10dp18dp

Small Bold

captionSmallBold10dp18dp

Small Italic

captionSmallItalic10dp18dp

Caption Large

Caption Large Regular

Create your own typography styles:

val CaptionLarge = TextStyle(
fontSize = 12.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val CaptionLargeRegular = CaptionLarge

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
captionLargeRegular = CaptionLarge
)
...
darkTheme = false,
content = content
)

Caption Large SemiBold

Create your own typography styles:

val CaptionLarge = TextStyle(
fontSize = 12.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val CaptionLargeSemiBold = CaptionLarge.copy(fontWeight = FontWeight.SemiBold)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
captionLargeSemiBold = CaptionLargeSemiBold
)
...
darkTheme = false,
content = content
)

Caption Large Bold

Create your typography styles:

val CaptionLarge = TextStyle(
fontSize = 12.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val CaptionLargeBold = CaptionLarge.copy(fontWeight = FontWeight.Bold)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
captionLargeBold = CaptionLargeBold
)
...
darkTheme = false,
content = content
)

Caption Large Italic

Create your own typography styles:

val CaptionLarge = TextStyle(
fontSize = 12.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val CaptionLargeItalic = CaptionLarge.copy(fontStyle = FontStyle.Italic)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
captionLargeItalic = CaptionLargeItalic
)
...
darkTheme = false,
content = content
)

Caption Small

Caption Small Regular

Create your own typography styles:

val CaptionSmall = TextStyle(
fontSize = 10.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val CaptionSmallRegular = CaptionSmall

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
captionSmallRegular = CaptionSmall
)
...
darkTheme = false,
content = content
)

Caption Small SemiBold

Create your own typography styles:

val CaptionSmall = TextStyle(
fontSize = 10.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val CaptionSmallSemiBold = CaptionSmall.copy(fontWeight = FontWeight.SemiBold)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
captionSmallSemiBold = CaptionSmallSemiBold
)
...
darkTheme = false,
content = content
)

Caption Small Bold

Create your own typography styles:

val CaptionSmall = TextStyle(
fontSize = 10.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val CaptionSmallBold = CaptionSmall.copy(fontWeight = FontWeight.Bold)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
captionSmallBold = CaptionSmallBold
)
...
darkTheme = false,
content = content
)

Caption Small Italic

Create your own typography styles:

val CaptionSmall = TextStyle(
fontSize = 10.sp,
lineHeight = 18.sp,
fontWeight = FontWeight.Normal,
fontStyle = FontStyle.Normal,
fontFamily = NunitoSans
)
val CaptionSmallItalic = CaptionSmall.copy(fontStyle = FontStyle.Italic)

Register in your themes:

LegionAppTheme(
...
typography = LgnTypography(
captionSmallItalic = CaptionSmallItalic
)
...
darkTheme = false,
content = content
)