haze-patterns
OfficialAdvanced UI Patterns with Haze
AuthorKototoro-app
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides expert guidance on implementing various UI patterns with the Haze library in Kotlin, including blurring effects, overlapping elements, and dialog management.
Core Features & Use Cases
- Scaffold Blur: Implement blur effects on Scaffold components, such as top and bottom bars.
- Dialog Blur: Apply blur to dialog backgrounds and overlay content.
- Sticky Headers: Utilize sticky headers in LazyColumns for improved navigation.
- Overlapping Cards: Create overlapping blurred cards with defined z-index levels.
- Filtering Source Areas: Exclude specific layers from blur effects.
- Deep Hierarchy Composition: Share blur states across nested composables efficiently.
- Integrated Source and Effect: Apply source and effect on the same layout node.
- Split-Window Position Strategy: Correctly align blur effects in split-screen modes.
- Quick Start: Learn how to implement each pattern step-by-step.
Quick Start
To implement a dialog blur, start with the following code snippet in your Kotlin project:
val hazeState = rememberHazeState()
var showDialog by remember { mutableStateOf(false) }
// ... your existing content ...
if (showDialog) {
Dialog(onDismissRequest = { showDialog = false }) {
Surface(
modifier = Modifier.fillMaxWidth().fillMaxHeight(0.5f),
shape = MaterialTheme.shapes.extraLarge,
color = MaterialTheme.colorScheme.surface.copy(alpha = 0.2f),
) {
Box(Modifier.hazeEffect(state = hazeState) {
blurEffect { style = HazeMaterials.regular() }
}) {
// Your dialog content here
}
}
}
}
Dependency Matrix
Required Modules
None requiredComponents
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: haze-patterns Download link: https://github.com/Kototoro-app/Kototoro/archive/main.zip#haze-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.