Skip to content

Support for Android Jetpack Compose #478

Description

@bherbst

Jetpack Compose is the future of Android UI development, and I'd love to see first-class support for Compose in style dictionary.

While Jetpack Compose has an interop layer with style resources, I would love to see a more idiomatic integration.

For example, today with Compose + Style Dictionary we could do:

@Composable
fun TextExample() {
  Text(
    text = "Hello World",
    color = colorResource(R.color.color_font_base)
}

But I would much rather have Style Dictionary generate a Kotlin file containing the colors so we can have something like this:

@Composable
fun TextExample() {
  Text(
    text = "Hello World",
    color = StyleDictionary.colors.font.base
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions