StippleUI.Ratings.ratingFunction
rating(fieldname::Union{Symbol,Nothing} = nothing,args...; kwargs...)

Rating is a Component which allows users to rate items, usually known as “Star Rating”.


Examples


Model

julia> @reactive mutable struct RatingModel <: ReactiveModel
          myrating::R{Int} = 3
       end

View

julia> rating(:myrating,size="1.5em",icon="thumb_up")
julia> rating(:myrating, size="2em",color="red-7",icon="favorite_border")
julia> rating(:myrating, size="2.5em", color="purple-4", icon="create")

Arguments


  1. Behaviour
    • name::String - Used to specify the name of the control; Useful if dealing with forms submitted directly to a URL car_id
  2. Content
    • icon::Union{String, Vector} - Icon name; make sure you have the icon library installed unless you are using 'img:' prefix; If an array is provided each rating value will use the corresponding icon in the array (0 based) ex. mapion-addimg:https://cdn.quasar.dev/logo/svg/quasar-logo.svgimg:path/to/some_image.png
    • iconselected::Union{String, Vector} - Icon name to be used when selected (optional); make sure you have the icon library installed unless you are using 'img:' prefix; If an array is provided each rating value will use the corresponding icon in the array (0 based) ex. mapion-addimg:https://cdn.quasar.dev/logo/svg/quasar-logo.svgimg:path/to/some_image.png
    • iconhalf::Union{String, Vector} - Icon name to be used when selected (optional); make sure you have the icon library installed unless you are using 'img:' prefix; If an array is provided each rating value will use the corresponding icon in the array (0 based) ex. mapion-addimg:https://cdn.quasar.dev/logo/svg/quasar-logo.svgimg:path/to/some_image.png
  3. Label
    • max::Union{Int, String} - Number of icons to display ex. 3max="5"
  4. Model
    • noreset::Bool - When used, disables default behavior of clicking/tapping on icon which represents current model value to reset model to 0
  5. State
    • readonly::Bool - Put component in readonly mode
    • disable::Bool - Put component in disabled mode
  6. Style
    • size::String - Size in CSS units, including unit name or standard size name (xs|sm|md|lg|xl) ex. 16px2remmdxs
    • color::Union{String, Vector} - Color name for component from the Color Palette; v1.5.0+: If an array is provided each rating value will use the corresponding color in the array (0 based) ex. primaryprimaryteal-10["accent", "grey-7"]
    • colorselected::Union{String, Vector} - Color name from the Quasar Palette for selected icons primaryteal-10
    • colorhalf::Union{String, Vector} - Color name from the Color Palette ex. primaryteal-10
    • nodimming::Bool - Does not lower opacity for unselected icons
source