UI Icons
Quick reference for icon patterns.
Using Icons
🔴 Always use JellyfinIcons, never Material Icons library
kotlin
// GOOD import com.eygraber.jellyfin.ui.icons.JellyfinIcons Icon( imageVector = JellyfinIcons.Settings, contentDescription = stringResource(R.string.settings), ) // BAD - Never use Material Icons import androidx.compose.material.icons.Icons Icon(imageVector = Icons.Default.Settings, ...)
Adding New Icons
- •Get SVG from design or Material Icons
- •Use Valkyrie IDE plugin to convert SVG → ImageVector
- •Add to
ui/iconsmodule as extension onJellyfinIcons
kotlin
// ui/icons/src/main/kotlin/.../JellyfinIcons.kt
object JellyfinIcons
// ui/icons/src/main/kotlin/.../Settings.kt
val JellyfinIcons.Settings: ImageVector
get() = materialIcon(name = "Settings") {
// ... vector path data
}
Icon Guidelines
- •Use
contentDescriptionfor meaningful icons - •Use
contentDescription = nullfor decorative icons - •Ensure 48dp minimum touch target when icon is clickable
- •Use appropriate icon size (typically 24dp for toolbar, 16dp for inline)
Documentation
- •.claude/rules/ui-resources.md - UI resource rules