Typography


class Typography


The Glimmer type scale includes a range of contrasting styles that support the needs of your product and its content.

Summary

Public constructors

Typography(
    defaultFontFamily: FontFamily?,
    titleLarge: TextStyle,
    titleMedium: TextStyle,
    titleSmall: TextStyle,
    bodyLarge: TextStyle,
    bodyMedium: TextStyle,
    bodySmall: TextStyle
)

Creates a Glimmer type scale.

Public functions

Typography
copy(
    titleLarge: TextStyle,
    titleMedium: TextStyle,
    titleSmall: TextStyle,
    bodyLarge: TextStyle,
    bodyMedium: TextStyle,
    bodySmall: TextStyle
)

Returns a copy of this Typography, optionally overriding some of the values.

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

TextStyle

bodyLarge is the largest body, and is typically used for long-form writing as it works well for small text sizes.

TextStyle

bodyMedium is the second largest body, and is typically used for long-form writing as it works well for small text sizes.

TextStyle

bodySmall is the smallest body, and is typically used for long-form writing as it works well for small text sizes.

TextStyle

titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length.

TextStyle

titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length.

TextStyle

titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length.

Public constructors

Typography

Added in 1.0.0-alpha01
Typography(
    defaultFontFamily: FontFamily? = null,
    titleLarge: TextStyle = TitleLarge,
    titleMedium: TextStyle = TitleMedium,
    titleSmall: TextStyle = TitleSmall,
    bodyLarge: TextStyle = BodyLarge,
    bodyMedium: TextStyle = BodyMedium,
    bodySmall: TextStyle = BodySmall
)

Creates a Glimmer type scale.

Parameters
defaultFontFamily: FontFamily? = null

the default FontFamily to be used for TextStyles provided in this constructor. This default will be used if the FontFamily on the TextStyle is null.

titleLarge: TextStyle = TitleLarge

titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length.

titleMedium: TextStyle = TitleMedium

titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length.

titleSmall: TextStyle = TitleSmall

titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length.

bodyLarge: TextStyle = BodyLarge

bodyLarge is the largest body, and is typically used for long-form writing as it works well for small text sizes.

bodyMedium: TextStyle = BodyMedium

bodyMedium is the second largest body, and is typically used for long-form writing as it works well for small text sizes.

bodySmall: TextStyle = BodySmall

bodySmall is the smallest body, and is typically used for long-form writing as it works well for small text sizes.

Public functions

copy

Added in 1.0.0-alpha01
fun copy(
    titleLarge: TextStyle = this.titleLarge,
    titleMedium: TextStyle = this.titleMedium,
    titleSmall: TextStyle = this.titleSmall,
    bodyLarge: TextStyle = this.bodyLarge,
    bodyMedium: TextStyle = this.bodyMedium,
    bodySmall: TextStyle = this.bodySmall
): Typography

Returns a copy of this Typography, optionally overriding some of the values.

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

bodyLarge

Added in 1.0.0-alpha01
val bodyLargeTextStyle

bodyLarge is the largest body, and is typically used for long-form writing as it works well for small text sizes.

bodyMedium

Added in 1.0.0-alpha01
val bodyMediumTextStyle

bodyMedium is the second largest body, and is typically used for long-form writing as it works well for small text sizes.

bodySmall

Added in 1.0.0-alpha01
val bodySmallTextStyle

bodySmall is the smallest body, and is typically used for long-form writing as it works well for small text sizes.

titleLarge

Added in 1.0.0-alpha01
val titleLargeTextStyle

titleLarge is the largest title, and is typically reserved for emphasized text that is shorter in length.

titleMedium

Added in 1.0.0-alpha01
val titleMediumTextStyle

titleMedium is the second largest title, and is typically reserved for emphasized text that is shorter in length.

titleSmall

Added in 1.0.0-alpha01
val titleSmallTextStyle

titleSmall is the smallest title, and is typically reserved for emphasized text that is shorter in length.