RadialMenuItem

data class RadialMenuItem(val id: Int, val icon: Painter, val iconActive: Painter? = null, val label: String = "", val isActive: Boolean = false, val badgeCount: Int = 0, val badgeText: String? = null, val contentDescription: String = label)(source)

Represents a single item in the radial menu.

Developers define their own items with arbitrary IDs and icons. The library does not prescribe fixed actions.

Since

1.0.0

Parameters

id

Unique identifier for this item, developer-defined.

icon

The default-state icon Painter.

iconActive

Optional active/toggled-state icon Painter (e.g. filled heart).

label

Human-readable label (used for accessibility and future label rendering).

isActive

Whether this item is currently in its "active" toggle state.

badgeCount

Badge count to display. 0 means no badge.

badgeText

Optional custom badge text (overrides badgeCount when non-null).

contentDescription

Accessibility description for screen readers.

Note on equality: RadialMenuItem is a data class, so equals() and hashCode() are auto-generated. However, since icon and iconActive are Painter instances (an interface), equality comparison for these fields depends on the specific Painter implementation. When using copy() or comparing items, be aware that two painters pointing to the same resource may not be considered equal.

Constructors

Link copied to clipboard
constructor(id: Int, icon: Painter, iconActive: Painter? = null, label: String = "", isActive: Boolean = false, badgeCount: Int = 0, badgeText: String? = null, contentDescription: String = label)

Properties

Link copied to clipboard
val badgeCount: Int = 0
Link copied to clipboard
val badgeText: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val iconActive: Painter? = null
Link copied to clipboard
val id: Int
Link copied to clipboard
val isActive: Boolean = false
Link copied to clipboard