SkapaTypography2
Represents the complete set of typography styles in the Skapa typography system.
See also
Samples
import androidx.compose.animation.core.RepeatMode
import androidx.compose.animation.core.animateFloat
import androidx.compose.animation.core.infiniteRepeatable
import androidx.compose.animation.core.rememberInfiniteTransition
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.*
import androidx.compose.material3.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.semantics.heading
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.sp
import net.ikea.skapa.foundation.typography2.SkapaTypeScale
import net.skapa.ikea.fonts.latin.NotoIkeaLatin
fun main() {
//sampleStart
SkapaTheme2(
darkTheme = isSystemInDarkTheme(),
fontFamily = NotoIkeaLatin, // Add your desired font family
typeScale = SkapaTypeScale.SmallScreen, // Select the desired type scale depending on what size device you are designing for
baseFontSize = 14.sp // Add your desired base font size, increasing will scale all typesets accordingly
) {
Column {
Text(
text = "Skapa Display M",
style = SkapaTheme.typography2.displayM
)
Text(
text = "Skapa heading M",
style = SkapaTheme.typography2.headingM,
modifier = Modifier.semantics { heading() }
)
Text(
text = "Skapa statement M",
style = SkapaTheme.typography2.statementM
)
Text(
text = "Skapa body M",
style = SkapaTheme.typography2.bodyM
)
Text(
text = "Skapa label M",
style = SkapaTheme.typography2.labelM
)
Text(
text = "Skapa caption M",
style = SkapaTheme.typography2.captionM
)
}
}
//sampleEnd
}Properties
Regular variant (FontWeight.W400), the large display text style.
Regular variant (FontWeight.W400), the medium display text style.
Regular variant (FontWeight.W400), the extra-large display text style.
The font family used for the typography.
Regular variant (FontWeight.W400), the large heading text style.
Regular variant (FontWeight.W400), the medium heading text style.
Regular variant (FontWeight.W400), the small heading text style.
Regular variant (FontWeight.W400), the extra-large heading text style.
Regular variant (FontWeight.W400), the extra-small heading text style.
Regular variant (FontWeight.W400), the large label text style.
Regular variant (FontWeight.W400), the medium label text style.
Regular variant (FontWeight.W400), the small label text style.
Regular variant (FontWeight.W400), the extra-small label text style.
The large statement text style.
The medium statement text style.