Raxol.UI.Components.Input.Checkbox (Raxol v0.3.0)

View Source

Checkbox component for toggling boolean values.

This component provides a selectable checkbox with customizable appearance and behavior. Fully supports style and theme props (with correct merging/precedence), implements robust lifecycle hooks, and supports accessibility/extra props.

Summary

Functions

Creates a new checkbox component with the given options. See init/1 for details.

Types

t()

@type t() :: %{
  id: String.t(),
  label: String.t(),
  checked: boolean(),
  on_toggle: function() | nil,
  disabled: boolean(),
  style: map(),
  theme: map(),
  tooltip: String.t() | nil,
  required: boolean(),
  aria_label: String.t() | nil,
  focused: boolean()
}

Functions

new(opts \\ [])

@spec new(keyword()) :: t()

Creates a new checkbox component with the given options. See init/1 for details.