
Frosted glass UI visuals with softly tumbled edges and glow; modifier to apply effects, plus themed buttons, surfaces, palettes, recipes and Material You support.
Frosted color, softly tumbled edges, and a little seaside whimsy for Jetpack Compose and Compose Multiplatform. Add glass with a modifier, or use the included buttons, surfaces, styles, and themes.
Sea Glass 0.1.0 is available on Maven Central. Add mavenCentral() to your repositories, then add the dependency in an existing Compose app:
// Android dependencies, or commonMain.dependencies in a KMP app.
implementation("dev.mttmcknn:sea-glass:0.1.0")Building the checkout requires JDK 17. See build setup for Android SDK requirements and desktop-only builds.
Apply Modifier.seaGlass() inside a composable:
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import dev.mttmcknn.seaglass.SeaGlassPalette
import dev.mttmcknn.seaglass.seaGlass
@Composable
fun GlassLabel() {
val palette = SeaGlassPalette.Lagoon
Text(
"Hello, sea glass",
color = palette.ink,
modifier = Modifier
.seaGlass(palette = palette)
.padding(horizontal = 24.dp, vertical = 16.dp),
)
}The modifier draws the material; your content, layout, and interactions stay Compose. Leave room around it for the glow. Existing controls may need a transparent fill and explicit content colors—see using glass with existing controls.
Use SeaGlassButton or SeaGlassSurface for ready-made components. Customize recipes and palettes, share component styles, and set defaults with SeaGlassTheme. Material You is supported too.
The glass does not sample or distort content behind it. Check text contrast with your chosen colors. iOS rendering, older-Android fallback behavior on devices, and physical-device performance remain unverified. See rendering notes for details.
Sea Glass ports the material from the original web playground, whose source is included. Licensed under Apache 2.0.
Frosted color, softly tumbled edges, and a little seaside whimsy for Jetpack Compose and Compose Multiplatform. Add glass with a modifier, or use the included buttons, surfaces, styles, and themes.
Sea Glass 0.1.0 is available on Maven Central. Add mavenCentral() to your repositories, then add the dependency in an existing Compose app:
// Android dependencies, or commonMain.dependencies in a KMP app.
implementation("dev.mttmcknn:sea-glass:0.1.0")Building the checkout requires JDK 17. See build setup for Android SDK requirements and desktop-only builds.
Apply Modifier.seaGlass() inside a composable:
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import dev.mttmcknn.seaglass.SeaGlassPalette
import dev.mttmcknn.seaglass.seaGlass
@Composable
fun GlassLabel() {
val palette = SeaGlassPalette.Lagoon
Text(
"Hello, sea glass",
color = palette.ink,
modifier = Modifier
.seaGlass(palette = palette)
.padding(horizontal = 24.dp, vertical = 16.dp),
)
}The modifier draws the material; your content, layout, and interactions stay Compose. Leave room around it for the glow. Existing controls may need a transparent fill and explicit content colors—see using glass with existing controls.
Use SeaGlassButton or SeaGlassSurface for ready-made components. Customize recipes and palettes, share component styles, and set defaults with SeaGlassTheme. Material You is supported too.
The glass does not sample or distort content behind it. Check text contrast with your chosen colors. iOS rendering, older-Android fallback behavior on devices, and physical-device performance remain unverified. See rendering notes for details.
Sea Glass ports the material from the original web playground, whose source is included. Licensed under Apache 2.0.