
Easy use of Google's Material Symbols via variable fonts: adjustable weight, size, grade, style, and tint through simple Symbol functions for UI icons.
This library is a Compose Multiplatform library that aims to facilitate the use of
the new Google's Material Symbols, as the old compose icons libraries
(material-icons-[extended]) are now deprecated.
This library is built on top of Symbol's variable fonts and therefore allows to customize the weight, style and size of the symbols.
Compose Material Symbols provided several Compose functions to easily displays different styles of Material Symbols. They all take the same parameters:
@Composable
<Filled/Outlined>[Sharp/Rounded]Symbol(
icon: String, // The name of the symbol
weight: FontWeight, // The weight of the symbol,
size: Dp, // The size of the symbol, defaults to 24dp,
grade: Float, // The grade of the symbol, defaults to 0f
tint: Color, // The tint color of the symbol, defaults to the current content color
modifier: Modifier // Additional modifiers
)Example:
@Composable
FilledSymbol(
icon = "close",
weight = FontWeight.Bold,
size = 32.dp,
tint = MaterialTheme.colorScheme.error
)Will display a red bold "close" symbol ( X ), with a size of 32dp
kotlin {
sourceSets {
commonMain.dependencies {
implementation("dev.vicart:compose-material-symbols:1.0.0")
}
}
}dependencies {
implementation("dev.vicart:compose-material-symbols:1.0.0")
}This library is a Compose Multiplatform library that aims to facilitate the use of
the new Google's Material Symbols, as the old compose icons libraries
(material-icons-[extended]) are now deprecated.
This library is built on top of Symbol's variable fonts and therefore allows to customize the weight, style and size of the symbols.
Compose Material Symbols provided several Compose functions to easily displays different styles of Material Symbols. They all take the same parameters:
@Composable
<Filled/Outlined>[Sharp/Rounded]Symbol(
icon: String, // The name of the symbol
weight: FontWeight, // The weight of the symbol,
size: Dp, // The size of the symbol, defaults to 24dp,
grade: Float, // The grade of the symbol, defaults to 0f
tint: Color, // The tint color of the symbol, defaults to the current content color
modifier: Modifier // Additional modifiers
)Example:
@Composable
FilledSymbol(
icon = "close",
weight = FontWeight.Bold,
size = 32.dp,
tint = MaterialTheme.colorScheme.error
)Will display a red bold "close" symbol ( X ), with a size of 32dp
kotlin {
sourceSets {
commonMain.dependencies {
implementation("dev.vicart:compose-material-symbols:1.0.0")
}
}
}dependencies {
implementation("dev.vicart:compose-material-symbols:1.0.0")
}