Documentation Index
Fetch the complete documentation index at: https://mintlify.com/6xingyv/accompanist-lyrics-ui/llms.txt
Use this file to discover all available pages before exploring further.
KaraokeLyricsView exposes a rich set of styling parameters that let you match the lyrics panel to your app’s visual identity — from font families and text sizes to GPU blend modes, Gaussian blur intensities, and the pulsing interlude dots. All styling parameters have sensible defaults that produce the Apple Music aesthetic out of the box.
Text Styles
ThreeTextStyle parameters control the typography of the different text layers:
| Parameter | Default | Used for |
|---|---|---|
normalLineTextStyle | 34.sp, FontWeight.Bold, TextMotion.Animated | Main vocal lines |
accompanimentLineTextStyle | 20.sp, FontWeight.Bold, TextMotion.Animated | Background/harmony accompaniment lines |
phoneticTextStyle | 13.sp, FontWeight.Normal (derived from normalLineTextStyle) | Phonetic ruby text above syllables |
Always include
textMotion = TextMotion.Animated in normalLineTextStyle and accompanimentLineTextStyle. Without it, Compose may optimize away the per-frame text layout invalidations that drive the karaoke fill gradient animation.Text Color
ThetextColor parameter sets the base color for active (currently singing) text. Inactive text is rendered at a reduced alpha derived from the same color.
| Context | Alpha |
|---|---|
| Active line text (main) | 1.0f (activeAlpha in LyricsLineItem) |
| Inactive line text | 0.4f (inactiveAlpha in LyricsLineItem) |
| Translation text (karaoke line) | 0.4f |
| Translation text (synced line) | 0.6f |
| Phonetic text (canvas draw) | 0.4f |
Line-level phonetic (KaraokeLine.phonetic) | 0.6f |
Blend Modes
TheblendMode parameter on KaraokeLyricsView controls how each lyrics line composites against its background layer. The default BlendMode.Plus adds the text color to the underlying pixels, which creates a glowing, luminous effect when the background is dark.
KaraokeLyricsView defaults to BlendMode.Plus, but the lower-level KaraokeLineText composable has its own blendMode parameter that defaults to BlendMode.SrcOver. When you use KaraokeLyricsView directly (which is the normal path), KaraokeLyricsView passes its own blendMode value down to KaraokeLineText, so only the KaraokeLyricsView default is relevant in practice. The KaraokeLineText default only applies if you instantiate KaraokeLineText in isolation without specifying a blend mode.BlendMode.Plus requires the parent composable to use CompositingStrategy.Offscreen so that the text is first rendered into an isolated layer before being composited. Without this, the additive blend applies against the wrong background and produces incorrect results. Apply it to the modifier of the composable wrapping KaraokeLyricsView:
BlendMode.SrcOver:
Blur Effect
The blur effect dims non-active lines by applying a Gaussian blur proportional to how far each line is from the currently focused line. This draws the eye toward the active line and is the defining visual detail of the Apple Music lyrics style.blurDelta controls how quickly blur grows with distance. A line 2 positions away from the focused line receives 2 × blurDelta pixels of blur radius. The blur is animated with a 300 ms tween for smooth transitions.
Blur is automatically suppressed whenever the user is manually scrolling the list — a drag gesture sets isManualScrolling = true, which immediately zeros the blur target value and lets the list render crisply during interaction.
Disable the effect entirely on devices where GPU-accelerated BlurEffect is too expensive:
Breathing Dots
During instrumental interludes and song introductions longer than 5 seconds,KaraokeLyricsView shows pulsing breathing dots. Their appearance is fully customizable through KaraokeBreathingDotsDefaults:
KaraokeLyricsView:
KaraokeAlignment as the preceding or following line so they feel anchored to the vocal perspective.
Offset and Padding
TwoDp parameters control vertical spacing within the list:
offset: Dp(default32.dp) — added ascontentPaddingat the top and bottom of theLazyColumn, ensuring the first and last lines are never flush against the screen edges.keepAliveZone: Dp(default100.dp) — additional space kept above the focused line during auto-scroll. Increasing this value keeps more context lines visible above the active line.
20.dp and the bottom fade covers 100.dp, so setting offset smaller than those values may make the first or last line partially masked.