https://kotlinlang.org logo
Title
g

Giorgi

01/30/2023, 6:15 PM
Hi. Is Skia Compose using Material 2? So I added NavigationRail to the layout and it looks like this
Was expecting this
Also the font rendering looks weird
Any easy way to make it look like the one from Material 3?
k

Kirill Grouchnikov

01/30/2023, 6:41 PM
There’s no such thing as Skia Compose. Perhaps you mean Compose Multiplatform? Dynamic color in the screenshot you attached comes from the user selection of the wallpaper on their Android S device. There is no such thing on multiplatform really - for desktop or web. You will need to explicitly create a Material theme that matches this greenish look in your specific app.
g

Giorgi

01/30/2023, 6:49 PM
There’s no such thing as Skia Compose. Perhaps you mean Compose Multiplatform?
yeah, this is confusing for me, so there are 2 kinds of compose,right? one is with HTML and another uses Skia
So how do you guys refer to Skia variant?
Anyways, the colors are fine in my example. I meant the selected states and bold text, which is in the second pic. So in Material 2, the selected icon is with different color. In Material 3, it has a rounded rectangle shape and filled icon
In my first pic, there is no rectangle shape to indicate that it is selected. Also selecting and deselcting has no effect on the icon style, it does not toggle between outline and filled
k

Kirill Grouchnikov

01/30/2023, 7:13 PM
Are you using the Material 3 dependency and its top-level theme composable?
b

Big Chungus

01/30/2023, 8:13 PM
By skia compose you mean "CfW canvas". That's what I've seen used most to refer to it.
g

Giorgi

02/02/2023, 6:53 PM
Thanks once again guys. I had to add `
@OptIn(ExperimentalComposeLibrary::class) implementation(compose.material3)
instead of
implementation(compose.material)
r

Renaud

02/03/2023, 1:11 PM
Do you guys have any documentation on how to use it?
k

Kirill Grouchnikov

02/03/2023, 1:13 PM
What is it? Compose for Web, the material 3 module, something else?
r

Renaud

02/03/2023, 1:14 PM
With this :
val jsMain by getting {
    dependencies {
        @OptIn(ExperimentalComposeLibrary::class)
        implementation(compose.material3)
Can I really add a navigation rails or OutlinedTextField in a Compose for web project?
I'm missing something here 😅
OK, we have to pass with Wasm