pressable
Configure component to receive press via accessibility "press" event.
Add this modifier to the element to make it pressable within its bounds and show an indication as specified in indication parameter.
If interactionSource is null, and indication is an IndicationNodeFactory, an internal MutableInteractionSource will be lazily created along with the indication only when needed. This reduces the performance cost of clickable during composition, as creating the indication can be delayed until there is an incoming androidx.compose.foundation.interaction.Interaction. If you are only passing a remembered MutableInteractionSource and you are never using it outside of clickable, it is recommended to instead provide null to enable lazy creation. If you need indication to be created eagerly, provide a remembered MutableInteractionSource.
If indication is not an IndicationNodeFactory, and instead implements the deprecated Indication.rememberUpdatedInstance method, you should explicitly pass a remembered MutableInteractionSource as a parameter for interactionSource instead of null, as this cannot be lazily created inside pressable.
Parameters
MutableInteractionSource that will be used to dispatch PressInteraction.Press when this pressable is pressed. If null, an internal MutableInteractionSource will be created if needed.
indication to be shown when modified element is pressed. By default, indication from LocalIndication will be used. Pass null to show no indication, or current value from LocalIndication to show theme default
Controls the enabled state. When false, this modifier will appear disabled for accessibility services
the type of user interface element. Accessibility services might use this to describe the element or do customizations
how long to wait before appearing 'pressed' (emitting PressInteraction.Press). If null, even if the animation is subsequently scrolled or consumed, a "pressed" appears directly.