API reference
API reference
Select your platform
No SDKs available
No versions available

SpatialTypography Class

Modifiers: final
Defines the type scale for the Meta Horizon UI Set design system, consistent with SpatialTheme. Provides text styles for headlines, body text, labels, and captions at multiple weight and size combinations using the Inter font family. Each style specifies font weight, size, line height, and letter spacing. Accessed via SpatialTheme.typography in Compose content.

Constructors

SpatialTypography ( headline1Strong , headline1 , headline2Strong , headline2 , headline3Strong , headline3 , body1Strong , body1 , body2Strong , body2 )
Signature
constructor(headline1Strong: TextStyle,
            fontWeight = FontWeight.Bold,
            fontSize = 32.sp,
            lineHeight = 36.sp,
            letterSpacing = (-0.2).sp,
        ), headline1: TextStyle,
            fontWeight = FontWeight.Light,
            fontSize = 32.sp,
            lineHeight = 36.sp,
            letterSpacing = (-0.2).sp,
        ), headline2Strong: TextStyle,
            fontWeight = FontWeight.Bold,
            fontSize = 24.sp,
            lineHeight = 28.sp,
            letterSpacing = (-0.1).sp,
        ), headline2: TextStyle,
            fontWeight = FontWeight.Light,
            fontSize = 24.sp,
            lineHeight = 28.sp,
            letterSpacing = (-0.1).sp,
        ), headline3Strong: TextStyle,
            fontWeight = FontWeight.Bold,
            fontSize = 20.sp,
            lineHeight = 24.sp,
        ), headline3: TextStyle,
            fontWeight = FontWeight.Light,
            fontSize = 20.sp,
            lineHeight = 24.sp,
        ), body1Strong: TextStyle,
            fontWeight = FontWeight.Bold,
            fontSize = 14.sp,
            lineHeight = 20.sp,
        ), body1: TextStyle,
            fontWeight = FontWeight.Normal,
            fontSize = 14.sp,
            lineHeight = 20.sp,
        ), body2Strong: TextStyle,
            fontWeight = FontWeight.Bold,
            fontSize = 11.sp,
            lineHeight = 16.sp,
        ), body2: TextStyle,
            fontWeight = FontWeight.Normal,
            fontSize = 11.sp,
            lineHeight = 16.sp,
        ))
Parameters
headline1Strong: TextStyle
headline1: TextStyle
headline2Strong: TextStyle
headline2: TextStyle
headline3Strong: TextStyle
headline3: TextStyle
body1Strong: TextStyle
body1: TextStyle
body2Strong: TextStyle
body2: TextStyle

Properties

body1 : TextStyle
[Get]
Regular-weight body text style for standard paragraph content. The default reading style for spatial panel text, optimized for legibility at VR viewing distances.
Signature
val body1: TextStyle
body1Strong : TextStyle
[Get]
Bold body text style for emphasized paragraph content. Use for important information that needs to stand out within body copy on spatial panels.
Signature
val body1Strong: TextStyle
body2 : TextStyle
[Get]
Signature
val body2: TextStyle
body2Strong : TextStyle
[Get]
Signature
val body2Strong: TextStyle
headline1 : TextStyle
[Get]
Light-weight headline style at 32sp for secondary headings. Pairs with headline1Strong for visual hierarchy within spatial panel layouts.
Signature
val headline1: TextStyle
headline1Strong : TextStyle
[Get]
Bold headline style at 32sp with tight letter spacing (-0.2sp). Used for primary headings in spatial panels. See SpatialTheme.
Signature
val headline1Strong: TextStyle
headline2 : TextStyle
[Get]
Signature
val headline2: TextStyle
headline2Strong : TextStyle
[Get]
Signature
val headline2Strong: TextStyle
headline3 : TextStyle
[Get]
Signature
val headline3: TextStyle
headline3Strong : TextStyle
[Get]
Signature
val headline3Strong: TextStyle