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.
SyncedLineText renders a single SyncedLine — a lyric line that carries word-level or line-level timing information but does not have individual syllable timestamps. Unlike KaraokeLineText, there is no fill gradient or character animation; the entire line is displayed as a standard Text composable styled by the caller. It handles RTL text alignment and optionally shows a translation string at reduced opacity beneath the main content. KaraokeLyricsView uses this composable for all SyncedLine items in the lyrics list, with RTL detection performed automatically via isRtl() on the line’s content.
Function Signature
Parameters
The synced lyric line to display.
SyncedLine contains a content string (the lyric text), an optional translation string, and timing fields (start, end). The content is rendered as the main lyric; translation is rendered beneath it when showTranslation is true.Determines horizontal alignment. When
true, the Column, its Text, and the translation Text are all end-aligned, and TextAlign.End is applied so that long lines wrap correctly. When false, start alignment is used. Pass the result of calling isRtl() on line.content to auto-detect direction — this is exactly what KaraokeLyricsView does internally.The
TextStyle applied to the main lyric Text. This is a required parameter; there is no ambient fallback. When called from KaraokeLyricsView the normalLineTextStyle with an additional lineHeight = 1.2.em override is passed here.The color of the main lyric
Text. This is a required parameter with no default. The translation text (if shown) is rendered at textColor.copy(alpha = 0.6f) to visually subordinate it to the main content.Modifier applied to the outer
Column. The column also internally applies fillMaxWidth() and padding(vertical = 12.dp, horizontal = 16.dp), so the modifier you provide is combined on top of those.Whether to render the
line.translation string (if non-null) below the main lyric text. The translation is shown at textColor.copy(alpha = 0.6f) with the same alignment as the main text. Pass false to suppress translations globally (e.g. when the user has disabled them in settings).RTL Auto-Detection
When used insideKaraokeLyricsView, the isLineRtl value is derived automatically:
isRtl() is a utility function in the library that inspects the Unicode bidirectional properties of the string’s characters. You should do the same when embedding SyncedLineText in a custom layout.
Usage Example
SyncedLineText is intentionally minimal — it renders static Text composables with no animation driven by playback position. All focus-based effects (scale, alpha, blur) are applied by the parent LyricsLineItem wrapper, not by SyncedLineText itself.