radio(label::AbstractString = "", fieldname::Union{Symbol,Nothing} = nothing, args...; kwargs...)

The radio component is another basic element for user input. You can use this to supply a way for the user to pick an option from multiple choices.



julia> @reactive mutable struct RadioModel <: ReactiveModel
         shape::R{String} = "line"


julia> radio("Line", :shape, val="line")
julia> radio("Rectangle", :shape, val="rectange")
julia> radio("Ellipse", :shape, val="ellipse")
julia> radio("Polygon", :shape, val="polygon")


  1. Behaviour
    • name::String - Used to specify the name of the control; Useful if dealing with forms submitted directly to a URL ex. car_id
    • keep-color::Bool - Should the color (if specified any) be kept when checkbox is unticked?
  2. General
    • tabindex::Union{Int, String} - Tabindex HTML attribute value
  3. Label
    • leftlabel::Bool - Label (if any specified) should be displayed on the left side of the checkbox
  4. State
    • disable::Bool - Put component in disabled mode
  5. Style
    • size::String - Size in CSS units, including unit name or standard size name (xs|sm|md|lg|xl) ex. 16px2remxsmd
    • color::String - Color name for component from the Color Palette ex. primaryteal-10
    • dark::Bool - Notify the component that the background is a dark color
    • dense::Bool - Dense mode; occupies less space