net.kernelpanicsoft.archie.gui.composables.input¶
Types¶
DropdownOption¶
data class DropdownOption<T>(
val value: T,
val label: Component,
val enabled: Boolean = true
)
One selectable entry of a Dropdown.
RadioOption¶
data class RadioOption<T>(
val value: T,
val label: Component,
val enabled: Boolean = true
)
A single labeled choice within a RadioGroup.
Functions¶
Button¶
A standard themed, clickable button.
ButtonCore¶
A stateless clickable container composable.
Checkbox¶
A standard themed checkbox.
CheckboxCore¶
A stateless, unstyled toggle composable, built on Modifier.toggleable.
Clickable¶
@Composable
fun Clickable(
onClick: (UINode) -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
showHandCursor: Boolean = true,
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
onAuxClick: (UINode, Int) -> Unit? = null,
content: @Composable
(isHovered: Boolean, isPressed: Boolean, isFocused: Boolean) -> Unit
)
Low-level unstyled clickable container used by higher-level inputs like ButtonCore.
ColorPicker¶
A fully controlled HSV + alpha colour picker composable.
Dropdown¶
A single-choice select: a trigger showing the current selection, which opens into a list.
RadioButton¶
A standard themed radio button with a filled center dot when selected.
RadioButtonCore¶
Low-level unstyled radio-button behavior, built on Modifier.selectable.
RadioGroup¶
@Composable
fun <T> RadioGroup(
options: List<RadioOption<T>>,
selected: T?,
onSelected: (T) -> Unit,
modifier: Modifier = Modifier,
optionSpacing: Int = 3
)
A vertical list of labeled, mutually exclusive RadioButtons.
Slider¶
A standard themed horizontal slider, drawing a "slider" track, "slider_handle" thumb, and "slider_fill" progress fill up to the thumb, all from the current theme.
SliderCore¶
@Composable
fun SliderCore(
value: Float,
onValueChange: (Float) -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
steps: Int = 0,
onValueChangeFinished: () -> Unit = {},
content: @Composable
(isHovered: Boolean, isDragging: Boolean, isFocused: Boolean, normalizedValue: Float) -> Unit
)
Low-level unstyled slider behavior: drag/click-to-position, hover/drag/focus state tracking, with no visuals of its own.
Switch¶
Simple styled switch control suitable for toggling boolean settings.
SwitchCore¶
Low-level switch primitive exposing hover/focus state and checked state to custom visuals. Built on Modifier.toggleable, so it's a vanilla keyboard/controller focus-navigation stop that toggles on Enter/Space while focused, the same as a mouse click.