StippleUI.Radios.radio - Function
radio(label::Union{String, Symbol, Nothing} = nothing, 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.
Examples
Model
julia> @vars RadioModel begin
shape::R{String} = "line"
end
View
julia> radio("Line", :shape, val="line")
julia> radio("Rectangle", :shape, val="rectange")
julia> radio("Ellipse", :shape, val="ellipse")
julia> radio("Polygon", :shape, val="polygon")
Arguments
- 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?
- General
tabindex::Union{Int, String}
- Tabindex HTML attribute value
- Model
fieldname::Symbol
- Name of the variable to bind to.
- Label
label::AbstractString
- Labelleftlabel::Bool
- Label (if any specified) should be displayed on the left side of the checkbox
- State
disable::Bool
- Put component in disabled mode
- Style
size::String
- Size in CSS units, including unit name or standard size name (xs|sm|md|lg|xl) ex.16px
2rem
xs
md
color::String
- Color name for component from the Color Palette ex.primary
teal-10
dark::Bool
- Notify the component that the background is a dark colordense::Bool
- Dense mode; occupies less space