theming-styles
Use this skill to integrate the Jetpack Compose Styles API into an Android project.
Skill by Google LLC
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/3fn-theming-styles-79ece7
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, frontend, backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
theming-styles- Description
- Use this skill to integrate the Jetpack Compose Styles API into an Android project. This skill guides you through upgrading dependencies, setting up component themes, making custom components styleable, and migrating existing layout properties to use unified styles. Migrate custom design system components, replace hard coded parameters with Style attributes, and use Modifier.styleable for interaction states.
- License
- Apache-2.0
- Metadata
- author: Google LLC · last-updated: 2026-05-19
- Instructions
- 203 lines in SKILL.md · view on GitHub
Files (6)
- SKILL.md
- custom.md · references/android/develop/ui/compose/designsystems/
- fundamentals.md · references/android/develop/ui/compose/styles/
- state-animations.md · references/android/develop/ui/compose/styles/
- styles-vs-modifiers.md · references/android/develop/ui/compose/styles/
- theming.md · references/android/develop/ui/compose/styles/
SKILL.md (first lines)
## Limitations
- Warn the user that this skill is EXPERIMENTAL and requires updating to alpha version of Compose and opting in to the Experimental APIs.
- This skill only supports custom UI components and custom themes.
- This skill does not support Material Design component Styles.
## Prerequisites
### 1. Upgrade dependencies
- The project must use `compileSdk` version 37 or higher.
- The project must use `androidx.compose.foundation:foundation` version `1.12.0-alpha01` or higher.
- Alternatively, the project must use Compose BOM version `2026.04.01` or higher.
- The API requires this exact package: `import
androidx.compose.foundation.style.Style`
### 2. Configure compiler options to enable experimental API
You must opt-in to the experimental API at the project level. Add the following
block to your module's `build.gradle.kts`:
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget("17")
freeCompilerArgs.add("-opt-in=androidx.compose.foundation.style.ExperimentalFoundationStyleApi")
}
}
## Core workflows and guides
Refer to the official documentation to complete specific development tasks:
- Basic Style Usage: To set backgrounds, sizes, and alignments on a component, follow the [Compose Styles Fundamentals
Guide](references/android/develop/ui/compose/styles/fundamentals.md).
- State and Transitions: To configure property changes for state shifts (like pressed or hovered), follow the [Animations and State-Based Styling
Guide](references/android/develop/ui/compose/styles/state-animations.md).
- Architecture Trade offs: To decide when to use a Style versus a standard Modifier, follow the [Styles versus Modifiers
Comparison](references/android/develop/ui/compose/styles/styles-vs-modifiers.md).
- Theme Level Integration: To connect style definitions with custom themes, follow [Theming with Styles](references/android/develop/ui/compose/styles/theming.md) and [Custom Themes in Compose](references/android/develop/ui/compose/designsystems/custom.md).
## Step-by-Step Migration Workflow
### Step 1: Analyze theme structure
1. Locate your central theme file (such as `Theme.kt`).
2. Identify design tokens. Note references for colors, typography, and shapes (for example, `LocalColorScheme`, `LocalTypography`, or `LocalShapes`).
3. If the project lacks Jetpack Compose dependencies, stop. Instruct the user to migrate to Jetpack Compose first.
4. If the project imports `androidx.compose.material.MaterialTheme`, recommend migrating to Material 3 before proceeding.
### Step 2: Establish `ComponentStyles`
1. Create a new file named `ComponentStyles.kt` in your theme directory.
2. Define a top-level data class to hold your component styles, for example, the Jetsnack one is called `JetsnackStyles`:
```kotlin
object ExampleComponentStyles {
val customButtonStyle: Style = {
}
val customTextFieldStyle: Style = {
}
}
```
<br />
3. Expose this class through your custom theme with a static reference, don't
use `CompositionLocals` here as it's not required.
```kotlin
@Immutable
class JetsnackTheme(
// other Design system properties
) {
companion object {
val colors: CustomThemingWithStyles.JetsnackColors
@Composable @ReadOnlyComposable
get() = LocalJetsnackTheme.current.colors
// ...
// add helper static reference
val styles: ComponentStyles = ComponentStyles
}
}
```
<br />
4. Provide extensions on `StyleScope` to reference theme tokens directly if
they are exposed using `CompositionLocals`. For example:
```kotlin
val StyleScope.colors: JetsnackColors
get() = LocalJetsnackTheme.currentValue.colors
val StyleScope.typography: androidx.compose.material3.Typography
get() = LocalJetsnackTheme.currentValue.typography
val StyleScope.shapes: Shapes
get() = LocalJetsnackTheme.currentValue.shapes
```
<br />
### Step 3: Migrate a component to Styles API
For each custom component (for example, `CustomButton`), complete the following
sequence:
1. If you are able to run an Android emulator, locate an existing screenshot test for the component. If none exists, create one using the existing project testing framework. If no framework exists, use UI Automator or Espresso to create a screenshot test with minimum required setup. Run the test and take a baseline screenshot of the Component. ELSE proceed to the next step without a screenshot test.
2. **Remove individual styling parameters** : Remove styling parameters such as `backgroundColor`, `shape`, `textStyle`, and `contentPadding` from the signature - anything that `StyleScope` supports.
3. **Add the style parameter** : Add `style: Style = Style` to the function signature.
4. **Declare state tracking** : If the component is interactable, create a `MutableStyleState` using the interaction source. Update state fields (such as `isEnabled`) inside the Composable to track the state correctly.
5. **Apply styleable modifier** : Replace specific layout modifiers on the root element with `Modifier.styleable()`.
6. **Move defaults to ComponentStyles** : Move hardcoded values from the component definition to a dedicated `Style` instance in `ComponentStyles.kt`.From 3fn/DesignerPunk, Apache-2.0.
More from 3fn/DesignerPunk
- 0.647score
impeccable-dp
3fn
Design creation and critique skill adapted for DesignerPunk.
SkillAFreshness: A★ 28Claude Code +9 - 0.647score
adaptive
Google LLC
Instructions to make or update an app's UI so that it adapts to different Android devices including phones, tablets, foldables, laptops, desktop, TV, Auto and…
SkillAFreshness: A★ 28Claude Code +9 - 0.647score
navigation-3
Google LLC
Learn how to install and migrate to Jetpack Navigation 3, and how to implement features and patterns such as deep links, multiple backstacks, scenes (dialogs…
SkillAFreshness: A★ 28Claude Code +9 - 0.647score
theming-styles
Google LLC
Use this skill to integrate the Jetpack Compose Styles API into an Android project.
SkillAFreshness: A★ 28Claude Code +9 - 0.642score
edge-to-edge
Google LLC
Use this skill to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues.
SkillAFreshness: A★ 28Claude Code +9 - 0.637score
_fixture-skill
3fn
Internal DesignerPunk pipeline fixture (Spec 122 C10.3).
SkillAFreshness: A★ 28Claude Code +9
Signals
- Stars
- 28
- Forks
- 4
- Open issues
- 0
- Last commit (this folder)
- Jul 10, 2026 (3 months ago)
- Last release
- Oct 17, 2026 (12 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/3fn/DesignerPunk
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.647score
theming-styles
Google LLC
Use this skill to integrate the Jetpack Compose Styles API into an Android project.
SkillAFreshness: A★ 28Claude Code +9 - 0.388score
theming-styles
Google LLC
Use this skill to integrate the Jetpack Compose Styles API into an Android project.
SkillAFreshness: A★ 28Claude Code +9 - 0.386score
theming-styles
Google LLC
Use this skill to integrate the Jetpack Compose Styles API into an Android project.
SkillAFreshness: A★ 28Claude Code +9 - 0.386score
theming-styles
Google LLC
Use this skill to integrate the Jetpack Compose Styles API into an Android project.
SkillAFreshness: A★ 28Claude Code +9
More from Google LLC
- 0.861score
secops-cases
Google LLCOfficial
Manage Google Security Operations (SecOps) SOAR cases throughout their lifecycle.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-triage
Google LLCOfficial
Expert guidance for security alert triage in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-investigate
Google LLCOfficial
Expert guidance for deep security incident and entity investigations in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-hunt
Google LLCOfficial
Expert guidance for proactive threat hunting in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.861score
secops-detection-engineering
Google LLCOfficial
Author, validate, test, and deploy YARA-L 2.0 detection rules and evaluate end-to-end detection coverage gaps in Google SecOps.
SkillAFreshness: A★ 21.5KClaude Code +9 - 0.815score
ima-sdk-client-side
Google LLCOfficial
Supports Interactive Media Ads (IMA) SDK.
SkillBFreshness: B★ 21.5KClaude Code +9
Cite this page
theming-styles skill. Agent Mart. https://agentmart.dev/skills/3fn-theming-styles-79ece7 (last updated 2026-10-24)