Scenic.Component.Input.RadioButton (Scenic v0.10.3) View Source

Add a single radio button to a graph.


{text, id} {text, id, selected?}

  • text - a bitstring of the text to display
  • id - any term. Identifies the radio button.
  • selected? - boolean. true if selected. false if not. Default is false if this term is not provided.


The RadioButton component is used by the RadioGroup component and usually isn't accessed directly, although you are free to do so if it fits your needs. There is no short-cut helper function so you will need to add it to the graph manually.

The following example adds a caret to a graph.

|> RadioButton.add_to_graph({"A button", :an_id, true})

Link to this section Summary

Link to this section Functions

Link to this function

add_to_graph(graph, data \\ nil, opts \\ [])

View Source


add_to_graph(graph :: Scenic.Graph.t(), data :: any(), opts :: list()) ::

Callback implementation for Scenic.Component.add_to_graph/3.