Engee documentation

StippleUI API

API

`csscolors(name, color)`
`csscolors(names, colors)`
`csscolors(prefix, colors)`

Construct a css string that defines colors to be used for styling quasar elements; either as a value for the keyword argument color or as a classname with the resective prefix text- or bg-. (cf. quasar docs)

Usage

css = style(csscolors(:stipple, [RGB(0.2, 0.4, 0.8), "#123456", RGBA(0.1, 0.2, 0.3, 0.5)]))

ui(model) = css * page(model, class="container, text-stipple-1", [ btn("Hit me", @click(:pressed), color="stipple-3") ])

Avatars

Badges

badge()

The badge component allows you to create a small badge for adding information like contextual data that needs to stand out and get noticed. It is also often useful in combination with other elements like a user avatar to show a number of new messages.


Examples


Model

julia> @vars BadgeModel begin
          myicon = "bluetooth"
       end

View

julia> Html.div("Badge", class="text-h6", [
          badge("1.0.0+", color="primary")
       ])

Arguments


  1. Content

    • floating::Bool - Tell badge if it should float to the top right side of the relative positioned parent element or not

    • transparent::Bool - Applies a 0.8 opacity; Useful especially for floating badge

    • multiline::Bool - Content can wrap to multiple lines

    • label::Union{String, Int} - Badge’s content as string; overrides default slot if specified ex. "John Doe" 22

    • align::String - Sets vertical-align CSS attribute

    • outline::Bool - Use 'outline' design (colored text and borders only)

  2. Style

    • color::String - Color name for component from the Color Palette ex. "primary" "teal-10"

    • textcolor::String - Overrides text color (if needed); Color name from the Color Palette ex. "primary" "teal-10"

    • rounded::Bool - Makes a rounded shaped badge

Banners

banner(content::String = "", args...; buttons::Vector{String} = String[], icon::Union{String,Nothing} = nothing, kwargs...)

The banner component creates a banner element to display a prominent message and related optional actions.

According to the Material Design spec, the banner should be “displayed at the top of the screen, below a top app bar” - but of course you can put one anywhere that makes sense, even in a dialog


Examples


View

julia> banner("Unfortunately, the credit card did not go through, please try again.", class="bg-primary text-white", [
          template("", "v-slot:action", [
            btn("Dismiss", flat=true, color="white"),
            btn("Update Credit Card", flat=true, color="white")
          ])
       ])

julia> banner("Could not retrieve travel data.", rounded=true, class="bg-grey-3", [
          template("", "v-slot:avatar", [
            imageview(src="https://cdn.quasar.dev/img/mountains.jpg", style="width: 100px; height:64px")
          ]),
          template("", "v-slot:action", [
            btn("Retry", flat=true, color="white")
          ])
       ])

Arguments


  1. Content

    • inlineactions::Bool - Display actions on same row as content

  2. Style

    • dense::Bool - Dense mode; occupies less space

    • rounded::Bool - Applies a small standard border-radius for a squared shape of the component

    • dark::Bool - Notify the component that the background is a dark color

Bignumbers

  bignumber(label::Union{String,Symbol} = "", number::Union{Symbol,Number,Nothing} = nothing, args...; kwargs...)

Renders a Big Number UI element.

Arguments

  • label::Union{String,Symbol}

  • number::Union{String,Symbol,Nothing,String}

  • icon::Union{String,Symbol}

  • color::Union{String,Symbol} = "positive"|"negative"

  • arrow::Union{String,Symbol} = "up"|"down"

Buttons

Stipple has a component called btn which is a button with a few extra useful features. For instance, it comes in two shapes: rectangle (default) and round. It also has the material ripple effect baked in (which can be disabled).

The button component also comes with a spinner or loading effect. You would use this for times when app execution may cause a delay and you want to give the user some feedback about that delay. When used, the button will display a spinning animation as soon as the user clicks the button.

When not disabled or spinning, btn emits a @click event, as soon as it is clicked or tapped.

Examples

julia> btn("Move Left", color = "primary", icon = "mail", @click("press_btn = true"))

julia> btn("Go to Hello World", color = "red", type = "a", href = "hello", icon = "map", iconright = "send")

julia> btn("Connect to server!", color="green", textcolor="black", @click("btnConnect=!btnConnect"), [
          tooltip(contentclass="bg-indigo", contentstyle="font-size: 16px",
          style="offset: 10px 10px",  "Ports bounded to sockets!")]
       )

Arguments


  1. Behavior

    • loading::Bool - Put button into loading state (displays a spinner — can be overridden by using a 'loading' slot)

    • percentage::Union{Int, Float64} - Percentage (0.0 < x < 100.0); To be used along 'loading' prop; Display a progress bar on the background ex. 23

    • darkpercentage::Bool - Progress bar on the background should have dark color; To be used along with 'percentage' and 'loading' props

  2. Content

    • label::Union{String, Int} - The text that will be shown on the button ex. Button Label

    • icon::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. map ion-add img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg img:path/to/some_image.png

    • iconright::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. map ion-add img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg img:path/to/some_image.png

    • nocaps::Bool - Avoid turning label text into caps (which happens by default)

    • nowrap::Bool - Avoid label text wrapping

    • align::String - Label or content alignment default. center accepted values. left right center around between evenly

    • stack::Bool - Stack icon and label vertically instead of on same line (like it is by default)

    • stretch::Bool - When used on flexbox parent, button will stretch to parent’s height

  3. General

  4. Navigation

  5. State

    • loading::Bool - Put button into loading state (displays a spinner — can be overridden by using a 'loading' slot)

    • 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. 16px 2rem xs md

    • ripple::Union{Bool, Dict} - Configure material ripple (disable it by setting it to 'false' or supply a config object) default. true ex. false { "early" => true, "center" => true, "color" => "teal", "keyCodes" => [] }

    • outline::Bool - Use outline design

    • flat::Bool - Use flat design

    • unelevated::Bool - Remove shadow

    • rounded::Bool - Applies a more prominent border-radius for a squared shape button

    • push::Bool - Use 'push' design

    • glossy::Bool - Applies a glossy effect

    • fab::Bool - Makes button size and shape to fit a Floating Action Button

    • fabmini::Bool - Makes button size and shape to fit a small Floating Action Button

    • padding::String - Apply custom padding (vertical [horizontal]); Size in CSS units, including unit name or standard size name (none|xs|sm|md|lg|xl); Also removes the min width and height when set

    • color::String - Color name for component from the Color Palette eg. primary teal-10

    • textcolor::String - Overrides text color (if needed); Color name from the Color Palette eg. primary teal-10

    • dense::Bool - Dense mode; occupies less space

    • round::Bool - Makes a circle shaped button

btndropdown is a very convenient dropdown button. Goes very well with list as dropdown content, but it’s by no means limited to it.

In case you are looking for a dropdown “input” instead of “button” use Select instead.

Examples

julia> btndropdown(label = "Dropdown Button", color = "primary", [
            list([
              item("Spain", clickable = true, vclosepopup = true, @click("first_item = true")),
              item("USA", clickable = true, vclosepopup = true, @click("second_item = true")),
              item("Netherlands", clickable = true, vclosepopup = true, @click("third_item = true"))
            ]),
       ])

Arguments


  1. Behavior

    • loading::Bool - Put button into loading state (displays a spinner — can be overridden by using a 'loading' slot)

    • split::Bool - Split dropdown icon into its own button

    • disablemainbtn::Bool - Disable main button (useful along with 'split' prop)

    • disabledropdown::Bool - Disables dropdown (dropdown button if using along 'split' prop)

    • persistent::Bool - Allows the menu to not be dismissed by a click/tap outside of the menu or by hitting the ESC key

    • autoclose::Bool - Allows any click/tap in the menu to close it; Useful instead of attaching events to each menu item that should close the menu on click/tap

  2. Content

    • label::Union{String, Int} - The text that will be shown on the button ex. "Button Label"

    • icon::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. "map" "ion-add" "img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg" "img:path/to/some_image.png"

    • iconright::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. "map" "ion-add" "img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg" "img:path/to/some_image.png"

    • nocaps::Bool - Avoid turning label text into caps (which happens by default)

    • nowrap::Bool - Avoid label text wrapping

    • align::String - Label or content alignment default. center ex. "left" "right" "center" "around" "between" "evenly"

    • stack::Bool - Stack icon and label vertically instead of on same line (like it is by default)

    • stretch::Bool - When used on flexbox parent, button will stretch to parent’s height

    • split::Bool - Split dropdown icon into its own button

    • dropdownicon::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. "map" "ion-add" "img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg" "img:path/to/some_image.png"

  3. General

  4. Navigation

  5. Position

    • cover::Bool - Allows the menu to cover the button. When used, the 'menu-self' and 'menu-fit' props are no longer effective

    • menuanchor::String - Two values setting the starting position or anchor point of the menu relative to its target default. "bottom end" ex. "top start" "bottom start" "top end" "bottom end" "right start" "right end" "left start" "left end"

    • menuself::String - Two values setting the menu’s own position relative to its target default. "top end" ex. "top start" "bottom start" "top end" "bottom end" "right start" "right end" "left start" "left end"

    • menuoffset::Vector - An array of two numbers to offset the menu horizontally and vertically in pixels ex. [8,8] [5,10]

  6. State

    • loading::Bool - Put button into loading state (displays a spinner — can be overridden by using a 'loading' slot)

    • disable::Bool - Put compontent in disabled state

  7. Style

    • size::String - Size in CSS units or percentage, ex. "25px" "2.5em" "md" "xs"

    • ripple::Union{Bool, Dict} - Configure material ripple (disable it by setting it to 'false' or supply a config object) default. true ex. false { "early" => true, "center" => true, "color" => "teal", "keyCodes" => []}

    • outline::Bool - Use 'outline' design

    • flat::Bool - Use 'flat' design

    • unelevated::Bool - Remove shadow

    • rounded::Bool - Applies a more prominent border-radius for a squared shape button

    • push::Bool - Use 'push' design

    • glossy::Bool - Applies a glossy effect

    • fab::Bool - Makes button size and shape to fit a Floating Action Button

    • fabmini::Bool - Makes button size and shape to fit a Floating Action Button Mini

    • padding::String - Apply custom padding (vertical [horizontal]); Size in CSS units, including unit name or standard size name (none|xs|sm|md|lg|xl); Also removes the min width and height when set ex. "16px","2rem" ,"xs" ,"md lg" ,"2px 2px 5px 7px"

    • color::String - Color name for component from the Quasar Color Palette ex. "primary" "teal-10"

    • textcolor::String - Overrides text color (if needed); Color name from the Quasar Color Palette ex. "white" "primary" "teal-10"

    • dense::Bool - Dense mode; occupies less space

    • noiconanimation::Bool - Disables the rotation of the dropdown icon when state is toggled

    • contentstyle::Union{Vector, String, Dict} - Style definitions to be attributed to the menu ex. {"background-color" => "#ff0000"} contentclass!="{ 'my-special-class': <condition> }"

    • contentclass::Union{Vector, String, Dict} - Class definitions to be attributed to the menu ex. "my-special-class" contentclass!="{ 'my-special-class': <condition> }"

You can conveniently group btn and btndropdown using btngroup. Be sure to check those component’s respective pages to see their props and methods.


Arguments


  1. Content

    • spread::Bool - Spread horizontally to all available space

    • stretch::Bool - When used on flexbox parent, buttons will stretch to parent’s height

  2. Style

    • outline::Bool - Use 'outline' design for buttons

    • flat::Bool - Use 'flat' design for buttons

    • unelevated::Bool - Remove shadow from buttons

    • rounded::Bool - Applies a more prominent border-radius for squared shape buttons

    • push::Bool - Use 'push' design for buttons

    • glossy::Bool - Applies a glossy effect

Cards

  card(args...; kwargs...)

Card component is a great way to display important pieces of grouped content. The Card component is intentionally lightweight and essentially a containing element that is capable of “hosting” any other component that is appropriate.


Examples


Model

julia> @vars CardModel begin
          lorem::R{String} = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
          url::R{String} = "https://cdn.quasar.dev/img/parallax2.jpg"
       end

View

julia> card(class="my-card", [
          imageview(src=:url, basic=true, [
            Html.div("Title", class="absolute-bottom text-h6")
          ]),
          card_section("{{lorem}}")
       ])

Arguments


  1. Content * tag::String - HTML tag to render default "div" ex. "div" "form"

  2. Style * dark::Bool - Notify the component that the background is a dark color * square::Bool - Removes border-radius so borders are squared * flat::Bool - Applies a 'flat' design (no default shadow) * bordered::Bool - Applies a default border to the component


Examples


card_actions()

Model

julia> @vars CardModel begin
          lorem::R{String} = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
       end

View

julia> card(class="my-card bg-secondary text-white", [
          card_section([
            Html.div("Our Changing Planet", class="text-h6"),
            Html.div("by John Doe", class="text-subtitle2")
          ]),
          card_section("{{ lorem }}"),
          card_actions([
            btn(flat=true, "Action 1"),
            btn(flat=true, "Action2")
          ])
        ])

Arguments


  • align::String - Specify how to align the actions ("left", "center", "right", "between", "around", "evenly", "stretch")

  • vertical:Bool - Display actions one below the other

  card_section(args...; kwargs...)

Examples


View

julia> card(class="text-white", style="background: radial-gradient(circle, #35a2ff 0%, #014a88 100%); width: 30%", [
          card_section("lorLorem Ipsum is simply dummy text of the printing
          and typesetting industry")
       ])

Arguments


  • tag::String - HTML tag to render ex. "div", "form"

  • horizontal::Bool - Display a horizontal section (will have no padding and can contain other card_section)

Checkboxes

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

The checkbox component is another basic element for user input. You can use this to supply a way for the user to toggle an option.


Examples


Model

julia> @vars CheckboxModel begin
          valone::R{Bool} = true
       end

View

julia> checkbox(label = "Apples", fieldname = :valone, dense = true, size = "xl")

Arguments


  1. Behaviour

    • name::String - Used to specify the name of the control; Useful if dealing with forms submitted directly to a URL

    • indeterminatevalue::Union{String, Float64, Int, Bool} - What model value should be considered as 'indeterminate'?

    • toggleorder::String - Determines toggle order of the two states ('t' stands for state of true, 'f' for state of false); If 'toggle-indeterminate' is true, then the order is: indet -> first state -> second state -> indet (and repeat), otherwise: indet -> first state -> second state -> first state -> second state -> …​ ex. "tf" "ft"

    • toggleindeterminate::Bool - When user clicks/taps on the component, should we toggle through the indeterminate state too?

    • keepcolor::Bool - Should the color (if specified any) be kept when the component is unticked/ off?

  2. General

    • tabindex::Union{Int, String} - Tabindex HTML attribute value

  3. Label

    • label::Union{String,Symbol} - Label to display along the component

    • leftlabel::Bool - Label (if any specified) should be displayed on the left side of the component

  4. Model

    • fieldname::Symbol - Model of the component

    • val::Union{String, Float64, Int, Bool} - Works when model ('value') is Array. It tells the component which value should add/remove when ticked/unticked

    • truevalue::Union{Int, Float64, String} - What model value should be considered as checked/ticked/on?

    • falsevalue::Union{Int, Float64, String} - What model value should be considered as unchecked/unticked/off?

  5. State

    • 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. "16px" "2rem" "xs" "md"

    • color::String - Color name for component from the Color Palette eg. "primary" "teal-10"

    • dark::Bool - Notify the component that the background is a dark color

    • dense::Bool - Dense mode; occupies less space

Chips

  chip(args...; kwargs...)

The chip component is basically a simple UI block entity, representing for example more advanced underlying data, such as a contact, in a compact way.

Chips can contain entities such as an avatar, text or an icon, optionally having a pointer too. They can also be closed or removed if configured so.


Examples


View

julia> chip("Add to calendar", icon="event")

Arguments


  1. Content

    • icon::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. "map" "ion-add" "img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg" "img:path/to/some_image.png"

    • iconright::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. "map" "ion-add" "img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg" "img:path/to/some_image.png"

    • iconremove::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. "map" "ion-add" "img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg" "img:path/to/some_image.png"

    • iconselected::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. "map" "ion-add" "img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg" "img:path/to/some_image.png"

    • label::Union{String, Int} - Chip’s content as string; overrides default slot if specified ex. "Joe Doe" "Book"

  2. General

    • tabindex::Union{Int, String} - Tabindex HTML attribute value ex. 0 100

  3. Model

    • value::Bool - Model of the component determining if chip should be rendered or not default. true

    • selected::Bool - Model for chip if it’s selected or not NOTE. ".sync" modifier required!

  4. State

    • clickable::Bool - Is chip clickable? If it’s the case, then it will add hover effects and emit 'click' events

    • removable::Bool - Is chip removable? If it’s the case, then it will add a close button and emit 'remove' events

    • disable::Bool - Put component in disabled mode

  5. Style

    • ripple::Union{Bool, Dict} - Configure material ripple (disable it by setting it to 'false' or supply a config object) default. true ex. false { early: true, center: true, color: 'teal', keyCodes: [] }

    • dense::Bool - Dense mode; occupies less space

    • size::String - chip size name or a CSS unit including unit name ex. "xs" "sm" "md" "lg" "xl" "1rem"

    • dark::Bool - Notify the component that the background is a dark color

    • color::String - Color name for component from the Color Palette eg. "primary" "teal-10"

    • square::Bool - Sets a low value for border-radius instead of the default one, making it close to a square

    • outline::Bool - Display using the 'outline' design

Datepickers

DateRange

Represents a date interval, between start and stop, with a 1 day step.

datepicker()

Renders a date picker (calendar) input element. If the fieldname references a Vector{Date}, the multiple keyword parameter must be passed as true. If the fieldname references a DateRange, the range keyword parameter must be passed as true. If the fieldname references a Vector{DateRange}, both the multiple and the range keyword parameters must be passed as true.


Examples


Model

julia> @vars DatePickers begin
        date::R{Date} = today() + Day(30)
        dates::R{Vector{Date}} = Date[today()+Day(10), today()+Day(20), today()+Day(30)]
        daterange::R{DateRange} = DateRange(today(), (today() + Day(3)))
        dateranges::R{Vector{DateRange}} = [
          DateRange(today(), (today() + Day(3))),
          DateRange(today() + Day(7), (today() + Day(10))),
          DateRange(today() + Day(14), (today() + Day(17))),
        ]
        proxydate::R{Date} = today()
        inputdate::R{Date} = today()
      end

View

julia> datepicker(:date)
julia> datepicker(:dates, multiple = true)
julia> datepicker(:daterange, range = true)
julia> datepicker(:dateranges, range = true, multiple = true)

Arguments


  1. Behavior

    • name::String - Used to specify the name of the control; Useful if dealing with forms submitted directly to a URL ex. "car_id"

    • landscape::Bool - Display the component in landscape mode

    • yearsinmonthview::Bool - Show the years selector in months view

  2. Content

    • title::String - When specified, it overrides the default header title; Makes sense when not in 'minimal' mode ex. "Birthday"

    • subtitle::String - When specified, it overrides the default header subtitle; Makes sense when not in 'minimal' mode ex. "John Doe"

    • todaybtn::Bool - Display a button that selects the current day

    • minimal::Bool - Don’t display the header

  3. Selection

    • navminyearmonth::String - Lock user from navigating below a specific year+month (in YYYY/MM format); This prop is not used to correct the model; You might want to also use 'default-year-month' prop ex. "2020/07"

    • navmaxyearmonth::String - Lock user from navigating above a specific year+month (in YYYY/MM format); This prop is not used to correct the model; You might want to also use 'default-year-month' prop ex. "2020/10"

    • nounset::Bool - Remove ability to unselect a date; It does not apply to selecting a range over already selected dates

    • multiple::Bool - Allow multiple selection; Model must be Array

    • range::Bool - Allow range selection; Partial compatibility with 'options' prop: selected ranges might also include 'unselectable' days

  4. State

    • readonly::Bool - Put component in readonly mode

    • disable::Bool - Put component in disabled mode

  5. Style

    • color::String - Color name for component from the Quasar Color Palette ex. "primary" "teal-10"

    • textcolor::String - Overrides text color (if needed); Color name from the Quasar Color Palette ex. "primary" "teal-10"

    • dark::Bool - Notify the component that the background is a dark color

    • square::Bool - Removes border-radius so borders are squared

    • flat::Bool - Applies a 'flat' design (no default shadow)

    • bordered::Bool - Applies a default border to the component

    • eventcolor::String - Color name (from the Quasar Color Palette); If using a function, it receives the date as a String and must return a String (color for the received date); If using a function then for best performance, reference it from your scope and do not define it inline ex. "teal-10" eventcolor!="(date) => date[9] % 2 === 0 ? 'teal' : 'orange'"

Dialogs

dialog()

The dialog` component is a great way to offer the user the ability to choose a specific action or list of actions. They also can provide the user with important information, or require them to make a decision (or multiple decisions).

Dialogs can also be used as a globally available method for more basic use cases, like the native JS alert(), prompt(), etc.

Examples


Model

julia> @vars DialogModel begin
         show_dialog::R{Bool} = false
       end

View

julia> Html.div(class="q-pa-md q-gutter-sm", [
        btn("Alert", color="primary", @click("show_dialog = true")),
        StippleUI.dialog(:show_dialog, [
          card([
            card_section(Html.div(class="text-h6", "Alert")),
            card_section(class="q-pt-none", "Lorem ipsum dolor sit amet consectetur adipisicing elit.
            Rerum repellendus sit voluptate voluptas eveniet porro. Rerum blanditiis perferendis totam,
            ea at omnis vel numquam exercitationem aut, natus minima, porro labore.")
          ])
        ])
      ])

Arguments


  1. Behaviour

    • persistent::Bool - User cannot dismiss Dialog if clicking outside of it or hitting ESC key; Also, an app route change won’t dismiss it

    • noesc::Bool - User cannot dismiss Dialog by hitting ESC key; No need to set it if 'persistent' property is also set

    • nobackdrop::Bool - User cannot dismiss Dialog by clicking outside of it; No need to set it if 'persistent' property is also set

    • autoclose::Bool - Any click/tap inside of the dialog will close it

    • transitionshow::String - One of the embedded transitions eg. "fade", "slide-down"

    • transitionhide::String - One of the embedded transitions eg. "fade", "slide-down"

    • norefocus::Bool - (Accessibility) When Dialog gets hidden, do not refocus on the DOM element that previously had focus

    • nofocus::Bool - (Accessibility) When Dialog gets shown, do not switch focus on it

  2. Content

    • seamless::Bool - Put Dialog into seamless mode; Does not use a backdrop so user is able to interact with the rest of the page too

    • maximized::Bool - Put Dialog into maximized mode

    • fullwidth::Bool - Dialog will try to render with same width as the window

    • fullheight::Bool - Dialog will try to render with same height as the window

    • position::String - Stick dialog to one of the sides ("top", "right", "bottom" or "left")

  3. Style

    • contentclass::Union{Array, String} - Class definitions to be attributed to the content eg. "my-special-class" :content-class="{ 'my-special-class': <condition> }"

    • contentstyle::Union{Array, String} - Style definitions to be attributed to the content eg. "background-color: #ff0000" :content-style="{ color: '#ff0000' }"

    • square::Bool - Forces content to have squared borders

Drawers

Editors

editor(fieldname, args…​; kwargs…​)

Component is a WYSIWYG (“what you see is what you get”) editor component that enables the user to write and even paste HTML.


Examples


Model

julia> @vars EditorModel begin
          s_editor::R{String} = "What you see is <b>what</b> you get."
       end

View

julia> editor(:s_editor, minheight="5rem")

julia> StippleUI.form( autocorrect="off", autocapitalize="off", autocomplete="off", spellcheck="false", [
          editor(:s_editor)
       ])

Arguments


  1. Behaviour

    • fullscreen::Bool - Fullscreen mode (Note".sync" modifier required!) Example. :fullscreen.sync="isFullscreen"

    • noroutefullscreenexit::Bool - Changing route app won’t exit fullscreen

    • paragraphtag::String - Paragraph tag to be used Example. div, p

  2. Content

    • placeholder::String - Text to display as placeholder ex. Type your story here...

  3. Model

    • value::String [required!] - Reactive Model of the component

  4. State

    • readonly::Bool - Put component to readonly mode

    • disable::Bool - Disable component

  5. Style * square::Bool - Removes border-radius so borders are squared * minheight::String - Minimum height of the component default. 10rem ex. 15rem 50vh * flat::Bool - Applies a 'flat' design (no borders) * dark::Bool - Notify the component that the background is a dark color * maxheight::String - CSS unit for maximum height of the input area ex. 100px 90vh * height::String - CSS value to set the height of the editable area ex. 100px 90vh * toolbaroutline::Bool - Toolbar buttons are rendered "outlined" * toolbarpush::Bool - Toolbar buttons are rendered as a "push-button" type * toolbarrounded::Bool - Toolbar buttons are rendered "rounded" * contentstyle::Dict - Object with CSS properties and values for styling the container of editor ex. contentstyle!="{ backgroundColor: '#C0C0C0' }" * contentclass::Union{Dict, Vector, String} - CSS classes for the input area ex. my-special-class contentclass!="{ 'my-special-class': <condition> }"

Forminputs

filefield( label::Union{String, Symbol} = "", fieldname::Union{Symbol,Nothing} = nothing, args…​; kwargs…​)

numberfield( label::Union{String, Symbol} = "", fieldname::Union{Symbol,Nothing} = nothing, args...; content::Union{String,Vector,Function} = "", kwargs...)
textarea(label::Union{String,Symbol} = "", fieldname::Union{Symbol,Nothing} = nothing, args...; content::Union{String,Vector,Function} = "", kwargs...)
textfield(fieldname, args...; kwargs...)

Examples


Model

julia> @vars TextField begin
          name::R{String} = ""
       end

View

julia> textfield("What's your name *", :name, name = "name", @iif(:warin), :filled, hint = "Name and surname", "lazy-rules",
          rules = "[val => val && val.length > 0 || 'Please type something']"
       )

Arguments


  1. General * type::String - Must be one of the following: text (default), textarea, email, tel, number, password and url. This is important as it determines the keyboard type popping up on mobile devices.

  2. Behaviour * name::String - Used to specify the name of the control; Useful if dealing with forms; If not specified, it takes the value of 'for' prop, if it exists ex. car_id * mask::String - Custom mask or one of the predefined mask names ex. date datetime time fulltime phone card * fillmask::Union{Bool, String} - Fills string with specified characters (or underscore if value is not string) to fill mask’s length ex. true 0 _ * reversefillmask::Bool - Fills string from the right side of the mask * unmaskedvalue::Bool - Model will be unmasked (won’t contain tokens/separation characters) * error::Bool - Does field have validation errors? * rules::Vector - Array of Functions/Strings; If String, then it must be a name of one of the embedded validation rules ex. rules!="[ 'fulltime' ]" rules!="[ val => val.length <= 3 || 'Please use maximum 3 characters' ]" * reactiverules::Bool - By default a change in the rules does not trigger a new validation until the model changes; If set to true then a change in the rules will trigger a validation; Has a performance penalty, so use it only when you really need it * lazyrules::Union{Bool, String} - If set to boolean true then it checks validation status against the 'rules' only after field loses focus for first time; If set to 'ondemand' then it will trigger only when component’s validate() method is manually called or when the wrapper form submits itself true false ondemand * loading::Bool - Signals the user a process is in progress by displaying a spinner; Spinner can be customized by using the 'loading' slot. * clearable::Bool - Appends clearable icon when a value (not undefined or null) is set; When clicked, model becomes null * autofocus::Bool - Focus field on initial component render * for::String - Used to specify the 'id' of the control and also the 'for' attribute of the label that wraps it; If no 'name' prop is specified, then it is used for this attribute as well ex. myFieldsId

  3. Content * errormessage::String - Validation error message (gets displayed only if 'error' is set to 'true') ex. Username must have at least 5 characters * noerroricon::Bool - Hide error icon when there is an error * label::Union{String,Symbol} - A text label that will “float” up above the input field, once the field gets focus ex. Username * stacklabel::Bool - Label will be always shown above the field regardless of field content (if any) * hint::String - Helper (hint) text which gets placed below your wrapped form component ex. Fill in between 3 and 12 characters * hidehint::Bool - Hide the helper (hint) text when field doesn’t have focus * prefix::String - Prefix ex. $ * suffix::String - Suffix ex. @gmail.com * loading::Bool - Signals the user a process is in progress by displaying a spinner; Spinner can be customized by using the 'loading' slot. * clearable::Bool - Appends clearable icon when a value (not undefined or null) is set; When clicked, model becomes null * clearicon::String - Custom icon to use for clearable icon; If not specified, then it uses the default icon * labelslot::Bool - Enables label slot; You need to set it to force use of the 'label' slot if the 'label' prop is not set * bottomslots::Bool - Enables bottom slots ('error', 'hint', 'counter') * counter::Bool - Show an automatic counter on bottom right * shadowtext::String - Text to be displayed as shadow at the end of the text in the control; Does NOT applies to type=file * autogrow::Bool - Make field autogrow along with its content (uses a textarea)

  4. State * disable::Bool - Put component in disabled mode * readonly::Bool - Put component in readonly mode

  5. Style * labelcolor::String - Color name for the label from the Color Palette; Overrides the 'color' prop; The difference from 'color' prop is that the label will always have this color, even when field is not focused ex. primary teal * color::String - Color name for component from the Color Palette * bgcolor::String - Color from Color Palette * dark::Bool - Notify the component that the background is a dark color * filled::Bool - Use 'filled' design for the field * outline::Bool - Use 'outlined' design for the field * borderless::Bool - Use 'borderless' design for the field * standout::Union{Bool, String} - Use 'standout' design for the field; Specifies classes to be applied when focused (overriding default ones) ex. standout standout="bg-primary text-white" * hidebottomspace::Bool - Do not reserve space for hint/error/counter anymore when these are not used; As a result, it also disables the animation for those; It also allows the hint/error area to stretch vertically based on its content * rounded::Bool - Applies a small standard border-radius for a squared shape of the component * square::Bool - Remove border-radius so borders are squared; Overrides 'rounded' prop * dense::Bool - Dense mode; occupies less space * itemaligned::Union{Vector, String, Dict} - Match inner content alignment to that of item * inputclass::Union{Vector, String, Dict} - Class definitions to be attributed to the underlying input tag ex. my-special-class inputclass!="{ 'my-special-class': <condition> }" * inputstyle::Union{Vector, String, Dict} - Style definitions to be attributed to the underlying input tag ex. background-color: #ff0000 inputstyle!="{ backgroundColor: #ff0000 }"

  6. Model * debounce::Union{String, Int} - Debounce amount (in milliseconds) when updating model ex. 0 500 * maxlength::Union{String, Int} - Specify a max length of model ex. 12

Forms

form(args...; noresetfocus::Bool = false, kwargs...)

The form component renders a <form> DOM element and allows you to easily validate child form components (like input, select or your field wrapped components) that have the internal validation (NOT the external one) through rules associated with them.


Examples


Model

julia> @vars FormModel begin
          name::R{String} = ""
          age::R{Int} = 0
          warin::R{Bool} = true
       end

View

julia> StippleUI.form(action = "/sub", method = "POST", [
          textfield("What's your name *", :name, name = "name", @iif(:warin), :filled, hint = "Name and surname", "lazy-rules",
            rules = "[val => val && val.length > 0 || 'Please type something']"
          ),
          numberfield("Your age *", :age, name = "age", "filled", :lazy__rules,
            rules = "[val => val !== null && val !== '' || 'Please type your age',
              val => val > 0 && val < 100 || 'Please type a real age']"
          ),
          btn("submit", type = "submit", color = "primary")
       ])

Arguments


  • autofocus::Bool - Focus first focusable element on initial component render

  • noerrorfocus::Bool - Do not try to focus on first component that has a validation error when submitting form

  • noresetfocus::Bool - Do not try to focus on first component when resetting form

  • greedy::Bool - Validate all fields in form (by default it stops after finding the first invalid field with synchronous validation)

Headings

Icons

icon(name::Union{String,Symbol}, args...; content::Union{String,Vector,Function} = "", kwargs...)

Furthermore you can add support by yourself for any icon lib.


Examples


View

julia> icon("font_download", class="text-primary", style="font-size: 32px;")
julia> icon("warning", class="text-red", style="font-size:4rem;")
julia> icon("format_size", style="color: #ccc; font-size: 1.4em;")
julia> icon("print", class="text-teal", style="font-size: 4.4em;")
julia> icon("today", class="text-orange", style="font-size: 2em;")
julia> icon("style", style="font-size: 3em;")

Arguments


  1. Content

    • tag::String - HTML tag to render, unless no icon is supplied or it’s an svg icon ex. div i

    • left::Bool - Useful if icon is on the left side of something: applies a standard margin on the right side of Icon

    • right::Bool - Useful if icon is on the right side of something: applies a standard margin on the left side of Icon

  2. Model

    • name::String - Icon name; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. map ion-add img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg img:path/to/some_image.png

  3. Style

    • size::String - Size in CSS units, including unit name or standard size name 16px 2rem xs md

    • color::String - Color name for component from the Color Palette eg. primary teal-10

Imageviews

  imageview(args...; kwargs...)

The imageview component makes working with images (any picture format) easy and also adds a nice loading effect to it along with many other features (example: the ability to set an aspect ratio).


Examples


Model

julia> @vars Model begin
          url::R{String} = "https://placeimg.com/500/300/nature"
       end

View

julia> imageview(src = :url, spinnercolor = "white", style = "height: 140px; max-width: 150px" )
julia> imageview(src = :url, style = "height: 140px; max-width: 150px", [
          template("", "v-slot:loading", [spinner(:gears, color = "white", wrap = StippleUI.NO_WRAPPER)]),
       ])

Arguments


  1. Behaviour * transition::String - One of embedded transitions ex. fade slide-down * nativecontextmenu::Bool - Enable the native context menu of the image

  2. Content * ratio::Union{String, Int} - Force the component to maintain an aspect ratio ex. ratio!="4/3" (Number format) ratio!="16/9" (String format) ratio="1" * alt::String - Specifies an alternate text for the image, if the image cannot be displayed ex. Two cats * basic::Bool - Do not use transitions; faster render * contain::Bool - Make sure that the image getting displayed is fully contained, regardless if additional blank space besides the image is needed on horizontal or vertical

  3. Model * src::String - Path to image ex. (public folder) src="img/something.png" (assets folder) src="~assets/my-img.gif" (URL) src="https://placeimg.com/500/300/nature" * srcset::String - Same syntax as image:[] srcset attribute. ex. elva-fairy-320w.jpg 320w, elva-fairy-480w.jpg 480w * sizes::String - Same syntax as image:[] sizes attribute. ex. (max-width: 320px) 280px, (max-width: 480px) 440px, 800px * width::String - Forces image width; Must also include the unit (px or %) ex. 280px 70% * height::String - Forces image height; Must also include the unit (px or %) ex. 280px 70% * placeholdersrc::String - While waiting for your image to load, you can use a placeholder image ex. (public folder) src="img/something.png" (assets folder) src="~assets/my-img.gif" (URL) src="https://placeimg.com/500/300/nature"

  4. Style

    • color::String - Color name for component from the Color Palette eg. primary teal-10

    • imgclass::Union{Vector, String, Dict} - Class definitions to be attributed to the container of image; Does not apply to the caption ex. my-special-class imgclass!="{ 'my-special-class': <condition> }"

    • imgstyle::Dict - Apply CSS to the container of the image; Does not apply to the caption ex. imgstyle!="{ transform: 'rotate(45deg)' }"

    • spinnercolor::String - Color name for default Spinner (unless using a 'loading' slot) primary teal-10

    • spinnersize::String - Size in CSS units, including unit name, for default Spinner (unless using a 'loading' slot) ex. 16px 2rem

Innerloaders

Intersections

Knobs

  knob(range::AbstractRange{T} where T <: Real, fieldname::Union{Symbol,Nothing} = nothing, args...; kwargs...)

Renders a knob input element.

Layouts

Lists

  item(args...; kwargs...)

Arguments


  1. Content

    • tag::String - HTML tag to render; Suggestion: use 'label' when encapsulating a checkbox/radio/toggle so that when user clicks/taps on the whole item it will trigger a model change for the mentioned components ex. a label div

    • insetlevel::Int - Apply an inset; Useful when avatar/left side is missing but you want to align content with other items that do have a left side, or when you’re building a menu ex. insetlevel!="1"

  2. General

    • tabindex::Union{Int, String} - Tabindex HTML attribute value ex. 0 100

  3. Navigation

  4. State

    • disable::Bool - Put component in disabled mode

    • active::Bool - Put item into 'active' state

    • clickable::Bool - Is item clickable? If it’s the case, then it will add hover effects and emit 'click' events

    • manualfocus::Bool - Put item into a manual focus state; Enables 'focused' prop which will determine if item is focused or not, rather than relying on native hover/focus states

    • focused::Bool - Determines focus state, ONLY if 'manual-focus' is enabled / set to true

  5. Style

    • dark::Bool - Notify the component that the background is a dark color

    • dense::Bool - Dense mode; occupies less space

  item_label(args...; kwargs...)

Arguments


  1. Behaviour

    • lines::Union{Int, String} - Apply ellipsis when there’s not enough space to render on the specified number of lines; ex. 1 3 lines!="2"

  2. Content

    • overline::Bool - Renders an overline label

    • caption::Bool - Renders a caption label

    • header::Bool - Renders a header label

    • lines::Union{Int, String} - Apply ellipsis when there’s not enough space to render on the specified number of lines; 1 3 lines!="2"

  item_section(args...; kwargs...)

Arguments


  • avatar::Bool - Render an avatar item side (does not needs 'side' prop to be set)

  • thumbnail::Bool - Render a thumbnail item side (does not needs 'side' prop to be set)

  • side::Bool - Renders as a side of the item

  • top::Bool - Align content to top (useful for multi-line items)

  • nowrap::Bool - Do not wrap text (useful for item’s main content)

  list(args...; kwargs...)

The list and item are a group of components which can work together to present multiple line items vertically as a single continuous element. They are best suited for displaying similar data types as rows of information, such as a contact list, a playlist or menu. Each row is called an Item. item can also be used outside of a list too.


Examples


View

julia>  list(bordered=true, separator=true, [
          item(clickable=true, vripple=true, [
            itemsection("Single line item")
          ]),

          item(clickable=true, vripple=true, [
            itemsection([
              itemlabel("Item with caption"),
              itemlabel("Caption", caption=true)
            ])
          ]),

          item(clickable=true, vripple=true, [
            itemsection([
              itemlabel("OVERLINE", overline=true),
              itemlabel("Item with caption")
            ])
          ])
        ])

Arguments


  1. Content

    • separator::Bool - Applies a separator between contained items

    • padding:Bool - Applies a material design-like padding on top and bottom

  2. Style

    • bordered::Bool - Applies a default border to the component

    • dense::Bool - Dense mode; occupies less space

    • dark::Bool - Notify the component that the background is a dark color

  menu(fieldname::Union{Symbol,Nothing} = nothing, args...; content::Union{String,Vector} = "", kwargs...)

The menu component is a convenient way to show menus. Goes very well with list as dropdown content, but it’s by no means limited to it.


Examples


View

julia> btn("Basic Menu", color="primary", [StippleUI.menu( [p("Hello")])

Arguments


  1. Behaviour

    • target::Union{Bool, String} - Configure a target element to trigger component toggle; 'true' means it enables the parent DOM element, 'false' means it disables attaching events to any DOM elements; By using a String (CSS selector) or a DOM element it attaches the events to the specified DOM element (if it exists) default value. true ex. target!=false target!=".my-parent"

    • noparentevent::Bool - Skips attaching events to the target DOM element (that trigger the element to get shown)

    • contextmenu::Bool - Allows the component to behave like a context menu, which opens with a right mouse click (or long tap on mobile)

    • scrolltarget::Union{String} - CSS selector or DOM element to be used as a custom scroll container instead of the auto detected one ex. scrolltarget=".scroll-target-class" scrolltarget="#scroll-target-id" scrolltarget="body"

  2. Position

    • fit::Bool - Allows the menu to match at least the full width of its target

    • cover::Bool - Allows the menu to cover its target. When used, the 'self' and 'fit' props are no longer effective

    • anchor::String - Two values setting the starting position or anchor point of the menu relative to its target ex. anchor="top left" anchor="bottom right" anchor="center"

    • self::String - Two values setting the menu’s own position relative to its target ex. self="top left" self="bottom right" self="center"

    • offset::Vector - An array of two numbers to offset the menu horizontally and vertically in pixels ex. [8, 8] [5, 10]

  3. Style

    • contentclass::Union{Vector, String, Dict} - Class definitions to be attributed to the content ex. my-special-class contentclass!="{ 'my-special-class': <condition> }"

    • contentstyle::Union{Vector, String, Dict} - Style definitions to be attributed to the content ex. backgroundcolor: #ff0000 contentstyle!="{ color: '#ff0000' }"

    • dark::Bool - Notify the component that the background is a dark color

    • square::Bool - Forces content to have squared borders

    • maxheight::String - The maximum height of the menu; Size in CSS units, including unit name ex. 16px 2rem

    • maxwidth::String - The maximum width of the menu; Size in CSS units, including unit name ex. 16px 2rem

Popupproxies

  popup_proxy(fieldname::Union{Symbol,Nothing} = nothing, args...; content::Union{String,Vector,Function} = "", kwargs...)

popupproxy should be used when you need either a menu (on bigger screens) or a dialog (on smaller screens) to be displayed. It acts as a proxy which picks either of the two components to use. popupproxy also handles context-menus.


Examples


View

julia> btn("Handles click", push=true, color="primary", [
          popupproxy([
            banner("You have lost connection to the internet. This app is offline.", [
              template("", "v-slot:avatar", [
                icon("signal_wifi_off", color="Primary")
              ])
            ])
          ])
       ])

Arguments


  1. Behaviour

    • target::Union{Bool, String} - Configure a target element to trigger component toggle; 'true' means it enables the parent DOM element, 'false' means it disables attaching events to any DOM elements; By using a String (CSS selector) or a DOM element it attaches the events to the specified DOM element (if it exists) ex. true ex. target!=false target!=".my-parent"

    • noparentevent::Bool - Skips attaching events to the target DOM element (that trigger the element to get shown)

    • contextmenu::Bool - Allows the component to behave like a context menu, which opens with a right mouse click (or long tap on mobile)

    • breakpoint::Union{Int, String} - Breakpoint (in pixels) of window width/height (whichever is smaller) from where a Menu will get to be used instead of a Dialog ex. 992 breakpoint!="1234"

Radios

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.


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


  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. 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 color

    • dense::Bool - Dense mode; occupies less space

Ranges

range(range::AbstractRange{<:Union{Symbol, String, Real}}, fieldname::Union{Symbol,Nothing} = nothing, args...; lazy = false, kwargs...)

The range component is a great way to offer the user the selection of a sub-range of values between a minimum and maximum value, with optional steps to select those values. An example use case for the Range component would be to offer a price range selection


Examples


Model

julia> @vars RangeModel begin
         range_data::R{RangeData{Int}} = RangeData(18:80)
       end

View

julia> range(18:1:90,
          :range_data;
          label=true,
          color="purple",
          labelalways=true,
          labelvalueleft=Symbol("'Min age: ' + range_data.min"),
          labelvalueright=Symbol("'Max age: ' + range_data.max")
       )

Arguments


  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

    • snap::Bool - Snap on valid values, rather than sliding freely; Suggestion: use with 'step' property

    • reverse::Bool - Work in reverse (changes direction)

    • vertical::Bool - Display in vertical direction

    • labelalways::Bool - Always display the label

  2. Content

    • label::Bool - Popup a label when user clicks/taps on the slider thumb and moves it

    • markers::Union{Bool, Int} - Display markers on the track, one for each possible value for the model or using a custom step (when specifying a Number) ex. markers markers="5"

    • dragrange::Bool - User can drag range instead of just the two thumbs

    • dragonlyrange::Bool - User can drag only the range instead and NOT the two thumbs

  3. General

    • tabindex::Union{Int, String} - Tabindex HTML attribute value ex. 0 100

  4. Labels

    • labelcolorleft::String - Color name for left label background from the Color Palette ex. primary teal-10

    • labeltextcolorleft::String - Color name for left label text from the Color Palette ex. primary teal-10

    • labelcolorright::String - Color name for right label background from the Color Palette ex. primary teal-10

    • labeltextcolorright::String - Color name for right label text from the Color Palette ex. primary teal-10

    • labelvalueleft::Union{String, Int} - Override default label for min value ex. labelvalueleft="model.min + 'px'"

    • labelvalueright::Union{String, Int} - Override default label for max value ex. labelvalueright="model.max + 'px'"

  5. Model

    • range::AbstractRange{T} - The range of values to select from min:step:max, symbols or strings can be used to reference model fields, e.g. range("min":2:"max", :myvalue)

    • lazy::Bool - If true, update the value of the model field only upon release of the slider

  6. State

    • disable::Bool - Put component in disabled mode

    • readonly::Bool - Put component in readonly mode

  7. Style

    • color::String - Color name for component from the Color Palette ex. primary teal-10

    • labelcolor::String - Color name for component from the Color Palette ex. primary teal-10

    • thumbpath::String - Set custom thumb svg path ex. M5 5 h10 v10 h-10 v-10

    • dark::Bool - Notify the component that the background is a dark color

    • dense::Bool - Dense mode; occupies less space

slider(range::AbstractRange{<:Union{Symbol, String, Real}}, fieldname::Union{Symbol,Nothing} = nothing, args...; lazy = false, kwargs...)

The slider is a great way for the user to specify a number value between a minimum and maximum value, with optional steps between valid values. The slider also has a focus indicator (highlighted slider button), which allows for keyboard adjustments of the slider.

Examples


View

julia> slider(1:5:100)

Arguments


  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

    • snap::Bool - Snap on valid values, rather than sliding freely; Suggestion: use with 'step' property

    • reverse::Bool - Work in reverse (changes direction)

    • vertical::Bool - Display in vertical direction

    • labelalways::Bool - Always display the label

  2. Content

    • label::Bool - Popup a label when user clicks/taps on the slider thumb and moves it

    • markers::Union{Bool, Int} - Display markers on the track, one for each possible value for the model or using a custom step (when specifying a Number) ex. markers markers="5"

    • dragrange::Bool - User can drag range instead of just the two thumbs

    • dragonlyrange::Bool - User can drag only the range instead and NOT the two thumbs

  3. General

    • tabindex::Union{Int, String} - Tabindex HTML attribute value ex. 0 100

  4. Labels

    • labelcolorleft::String - Color name for left label background from the Color Palette ex. primary teal-10

    • labeltextcolorleft::String - Color name for left label text from the Color Palette ex. primary teal-10

    • labelcolorright::String - Color name for right label background from the Color Palette ex. primary teal-10

    • labeltextcolorright::String - Color name for right label text from the Color Palette ex. primary teal-10

    • labelvalueleft::Union{String, Int} - Override default label for min value ex. labelvalueleft="model.min + 'px'"

    • labelvalueright::Union{String, Int} - Override default label for max value ex. labelvalueright="model.max + 'px'"

  5. Model

    • range::AbstractRange{T} - The range of values to select from min:step:max, symbols or strings can be used to reference model fields, e.g. range("min":2:"max", :myvalue)

    • lazy::Bool - If true, update the value of the model field only upon release of the slider

  6. State

    • disable::Bool - Put component in disabled mode

    • readonly::Bool - Put component in readonly mode

  7. Style

    • color::String - Color name for component from the Color Palette ex. primary teal-10

    • labelcolor::String - Color name for component from the Color Palette ex. primary teal-10

    • thumbpath::String - Set custom thumb svg path ex. M5 5 h10 v10 h-10 v-10

    • dark::Bool - Notify the component that the background is a dark color

    • dense::Bool - Dense mode; occupies less space

Ratings

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> @vars RatingModel begin
          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. map ion-add img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg img: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. map ion-add img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg img: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. map ion-add img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg img:path/to/some_image.png

  3. Label

    • max::Union{Int, String} - Number of icons to display ex. 3 max="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. 16px 2rem md xs

    • 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. primary primary teal-10 ["accent", "grey-7"]

    • colorselected::Union{String, Vector} - Color name from the Quasar Palette for selected icons primary teal-10

    • colorhalf::Union{String, Vector} - Color name from the Color Palette ex. primary teal-10

    • nodimming::Bool - Does not lower opacity for unselected icons

Scrollareas

  scrollarea(args...; kwargs...)

The scrollarea component offers a neat way of customizing the scrollbars by encapsulating your content. Think of it as a DOM element which has overflow: auto, but with your own custom styled scrollbar instead of browser’s default one and a few nice features on top.


Examples


View

julia> StippleUI.scrollarea(style="height: 200px; max-width: 300px;", [
          Html.div("Stipple is a reactive UI library for building interactive
          data applications in pure Julia. It uses Genie.jl (on the server side)
          and Vue.js (on the client). Stipple uses a high performance MVVM
          architecture, which automatically synchronizes the state two-way
          (server -> client and client -> server) sending only JSON data over
          the wire. The Stipple package provides the fundamental communication
          layer, extending Genie's HTML API with a reactive component.")
       ])

Arguments


  1. Behaviour

    • visible::Bool - Manually control the visibility of the scrollbar; Overrides default mouse over/leave behavior

    • delay::Union{Int, String} - When content changes, the scrollbar appears; this delay defines the amount of time (in milliseconds) before scrollbars disappear again (if component is not hovered) default 1000 ex. 500 delay!="500

    • horizontal::Bool - Changes the default axis to horizontal instead of vertical (which is default) for getScrollPosition, getScrollPercentage, setScrollPosition, and setScrollPercentage

  2. General

    • tabindex::Union{Int, String} - Tabindex HTML attribute value 0 100

  3. Style

    • dark::Bool - Notify the component that the background is a dark color

    • barstyle::Union{Vector, String, Dict} - Object with CSS properties and values for custom styling the scrollbars (both vertical and horizontal) ex. barstyle!="{ borderRadius: '5px', background: 'red', opacity: 1 }"

    • contentstyle::Union{Vector, String, Dict} - Object with CSS properties and values for styling the container of scrollarea

Selects

select(fieldname::Symbol, args...; options::Symbol, kwargs...)

Examples


Model

julia> @vars SelectModel begin
          model::R{Vector{String}} = []
          networks::R{Vector{String}} = ["Google", "Facebook", "Twitter", "Pinterest", "Reddit"]
       end

View

julia> select(:model, options= :networks, useinput=true, multiple=true, clearable = true, filled = true, counter = true, usechips = true, label="Social Networks")

Arguments


  1. Behaviour

    • name::String - Used to specify the name of the control; Useful if dealing with forms; If not specified, it takes the value of 'for' prop, if it exists ex. car-id car-id

    • virtualscrollhorizontal::Bool - Make virtual list work in horizontal mode

    • error::Bool - Does field have validation errors?

    • rules::Vector - Array of Functions/Strings; If String, then it must be a name of one of the embedded validation rules rules="[ val => val.length <= 3 || 'Please use maximum 3 characters' ]"

    • reactiverules::Bool - By default a change in the rules does not trigger a new validation until the model changes; If set to true then a change in the rules will trigger a validation; Has a performance penalty, so use it only when you really need it

    • lazyrules::Union{Bool, String} - If set to boolean true then it checks validation status against the 'rules' only after field loses focus for first time; If set to 'ondemand' then it will trigger only when component’s validate() method is manually called or when the wrapper form submits itself ex. (Boolean) true (Boolean) false ondemand

    • loading::Bool - Signals the user a process is in progress by displaying a spinner; Spinner can be customized by using the 'loading' slot.

    • clearable::Bool - Appends clearable icon when a value (not undefined or null) is set; When clicked, model becomes null

    • autofocus::Bool - Focus field on initial component render

    • for::String - Used to specify the 'id' of the control and also the 'for' attribute of the label that wraps it; If no 'name' prop is specified, then it is used for this attribute as well myFieldsId

    • hidedropdownicon::Bool - Hide dropdown icon

    • fillinput::Bool - Fills the input with current value; Useful along with 'hideselected'; Does NOT works along with 'multiple' selection

    • newvaluemode::String - Enables creation of new values and defines behavior when a new value is added: 'add' means it adds the value (even if possible duplicate), 'add-unique' adds only unique values, and 'toggle' adds or removes the value (based on if it exists or not already); When using this prop then listening for newvalue becomes optional (only to override the behavior defined by newvaluemode) ex. add add-unique toggle

    • autocomplete::String - Autocomplete attribute for field ex. autocomplete="country"

    • transitionshow::String - Transition when showing the menu/dialog; One of embedded transitions ex. fade slide-down

    • transitionhide::String - Transition when hiding the menu/dialog; One of embedded transitions ex. fade slide-down

    • behavior::String - Overrides the default dynamic mode of showing as menu on desktop and dialog on mobiles default menu dialog

  2. Content

    • tablecolspan::Union{Int, String} - The number of columns in the table (you need this if you use table-layout: fixed) ex. tablecolspan="12"

    • errormessage::String - Validation error message (gets displayed only if 'error' is set to 'true') ex. Username must have at least 5 characters

    • noerroricon::Bool - Hide error icon when there is an error

    • label::Union{String,Symbol} - A text label that will “float” up above the input field, once the field gets focus ex. Username

    • stacklabel::Bool - Label will be always shown above the field regardless of field content (if any)

    • hint::String - Helper (hint) text which gets placed below your wrapped form component ex. Fill in between 3 and 12 characters

    • hidehint::Bool - Hide the helper (hint) text when field doesn’t have focus

    • prefix::String - Prefix ex. $

    • suffix::String - Suffix ex. @gmail.com

    • loading::Bool - Signals the user a process is in progress by displaying a spinner; Spinner can be customized by using the 'loading' slot.

    • clearable::Bool - Appends clearable icon when a value (not undefined or null) is set; When clicked, model becomes null

    • clearicon::String - Custom icon to use for the clear button when using along with 'clearable' attribute ex. close

    • labelslot::Bool - Enables label slot; You need to set it to force use of the 'label' slot if the 'label' prop is not set

    • bottomslots::Bool - Enables bottom slots ('error', 'hint', 'counter')

    • counter::Bool - Show an automatic counter on bottom right

    • dropdownicon::String - Icon name; ; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. map ion-add img=https://cdn.quasar.dev/logo/svg/quasar-logo.svg img=path/to/some_image.png

    • useinput::Bool - Use an input tag where users can type

    • inputdebounce::Union{Int, String} - Debounce the input model update with an amount of milliseconds ex. 500 600

  3. General

    • tabindex::Union{Int, String} - Tabindex HTML attribute value ex. 0 100

  4. Model

    • multiple::Bool - Allow multiple selection; Model must be Array

    • emitvalue::Bool - Update model with the value of the selected option instead of the whole option

  5. Options

    • options::Vector - Available options that the user can select from. For best performance freeze the list of options ex. options=[ 'BMW', 'Samsung Phone' ]

    • optionvalue::String - Property of option which holds the 'value'; If using a function then for best performance, reference it from your scope and do not define it inline ex. optionvalue=modelNumber optionvalue="(item) => item === null ? null : item.modelNumber"

    • optionlabel::Union{String,Symbol} - Property of option which holds the 'label'; If using a function then for best performance, reference it from your scope and do not define it inline ex. optionlabel=itemName optionlabel="(item) => item === null ? null : item.itemName"

    • optiondisable::String - Property of option which tells it’s disabled; The value of the property must be a Boolean; If using a function then for best performance, reference it from your scope and do not define it inline ex. optiondisable=cannotSelect optiondisable="(item) => item === null ? null : item.cannotSelect"

    • optionsdense::Bool - Dense mode for options list; occupies less space

    • optionsdark::Bool - Options menu will be colored with a dark color

    • optionsselectedclass::String - CSS class name for options that are active/selected; Set it to an empty string to stop applying the default (which is text-* where * is the 'color' prop value) ex. text-orange

    • optionssanitize::Bool - Force use of textContent instead of innerHTML to render options; Use it when the options might be unsafe (from user input); Does NOT apply when using 'option' slot!

    • optionscover::Bool - Expanded menu will cover the component (will not work along with useinput attribute for obvious reasons)

    • menushrink::Bool - Allow the options list to be narrower than the field (only in menu mode)

    • mapoptions::Bool - Try to map labels of model from options Vector; has a small performance penalty; If you are using emit-value you will probably need to use map-options to display the label text in the select field rather than the value; Refer to the 'Affecting model' section above

  6. Position

    • menuanchor::String - Two values setting the starting position or anchor point of the options list relative to the field (only in menu mode) ex. top left top middle top right top start top end center left center middle center right center start center end bottom left bottom middle bottom right bottom start bottom end

    • menuself::String - Two values setting the options list’s own position relative to its target (only in menu mode) ex. top left etc

    • menuoffset::Vector - An array of two numbers to offset the options list horizontally and vertically in pixels (only in menu mode) ex. [8, 8]

  7. Selection

    • multiple::Bool - Allow multiple selection; Model must be Array

    • displayvalue::Union{Int, String} - Override default selection string, if not using selected slot/scoped slot and if not using usechips attribute

    • displayvaluesanitize::Bool - Force use of textContent instead of innerHTML to render selected option(s); Use it when the selected option(s) might be unsafe (from user input); Does NOT apply when using selected or selecteditem slots!

    • hideselected::Bool - Hides selection; Use the underlying input tag to hold the label (instead of showing it to the right of the input) of the selected option; Only works for non multiple Selects

    • maxvalues::Union{Int, String} - Allow a maximum number of selections that the user can do ex. 5

    • usechips::Bool - Use chip component to show what is currently selected

  8. State

    • disable::Bool - Put component in disabled mode

    • readonly::Bool - Put component in readonly mode

  9. Style

    • labelcolor::String - Color name for the label from the Color Palette; Overrides the color prop; The difference from color prop is that the label will always have this color, even when field is not focused ex. primary teal-10

    • color::String - Color name for component from the Color Palette

    • bgcolor::String - Background color name for component from the Color Palette

    • dark::Bool - Notify the component that the background is a dark color

    • filled::Bool - Use filled design for the field

    • outlined::Bool - Use outlined design for the field

    • borderless::Bool - Use borderless design for the field

    • standout::Union{Bool, String} - Use 'standout' design for the field; Specifies classes to be applied when focused (overriding default ones) ex. standout standout="bg-primary text-white"

    • hidebottomspace::Bool - Do not reserve space for hint/error/counter anymore when these are not used; As a result, it also disables the animation for those; It also allows the hint/error area to stretch vertically based on its content

    • rounded::Bool - Applies a small standard border-radius for a squared shape of the component

    • square::Bool - Remove border-radius so borders are squared; Overrides rounded prop/attribute

    • dense::Bool - Dense mode; occupies less space

    • itemaligned::Bool - Match inner content alignment to that of item component

    • popupcontentclass::String - Class definitions to be attributed to the popup content ex. my-special-class

    • popupcontentstyle::Union{Vector, String, Dict} - Style definitions to be attributed to the popup content ex. background-color: #ff0000 popupcontentstyle!="{ backgroundColor: '#ff0000' }"

    • inputclass::Union{Vector, String, Dict} - Class definitions to be attributed to the underlying input tag ex. my-special-class inputclass!="{ 'my-special-class': <condition> }"

    • inputstyle::Union{Vector, String, Dict} - Style definitions to be attributed to the underlying input tag ex. background-color: #ff0000 inputstyle!="{ backgroundColor: '#ff0000' }"

  10. Virtual-scroll

    • virtualscrollslicesize::Union{Int, String} - Minimum number of items to render in the virtual list ex. virtualscrollslicesize="60" 30

    • virtualscrollsliceratiobefore::Union{Int, String} - Ratio of number of items in visible zone to render before it ex. virtualscrollsliceratiobefore="30" 30

    • virtualscrollsliceratioafter::Union{Int, String} - Ratio of number of items in visible zone to render after it ex. virtualscrollsliceratioafter="0.3"

    • virtualscrollitemsize::Union{Int, String} - Default size in pixels (height if vertical, width if horizontal) of an item; This value is used for rendering the initial list; Try to use a value close to the minimum size of an item ex. virtualscrollitemsize="48"

    • virtualscrollstickysizestart::Union{Int, String} - Size in pixels (height if vertical, width if horizontal) of the sticky part (if using one) at the start of the list; A correct value will improve scroll precision ex. 0 virtualscrollstickysizestart="23

    • virtualscrollstickysizeend::Union{Int, String} - Size in pixels (height if vertical, width if horizontal) of the sticky part (if using one) at the end of the list; A correct value will improve scroll precision ex. 0

    • tablecolspan::Union{Int, String} - The number of columns in the table (you need this if you use table-layout: fixed) ex. tablecolspan="3"

Separators

  separator(args...; kwargs...)

The separator component is used to separate sections of text, other components, etc…​ It creates a colored line across the width of the parent. It can be horizontal or vertical.

Skeletons

skeleton(args...; kwargs...)

The skeleton is a component for displaying a placeholder preview of your content before you load the actual page data. It’s a nice way of informing the user of what to expect from the page before it is fully loaded and increases the perceived performance. It can be used to incrementally display information on screen as data is being fetched.


Examples


View

julia> skeleton(type="QAvatar")
])

Arguments


  1. Content

    • tag::String - HTML tag to render. Defaults to "div". Examples "div" "span"

    • type::String - Type of skeleton placeholder. Defaults to "rect". Accepted values are "rect" "circle" "QBadge" "QChip" "QRadio" etc

  2. Style

    • dark::Bool - Whether to use a dark skeleton.

    • animation::String - The animation effect of the skeleton placeholder. Defaults: "wave" | Examples. "pulse" "fade" "blink" "none" "pulse-x"

    • square::Bool - Removes border-radius so borders are squared

    • bordered::Bool - Applies a default border to the component

    • size::String - Size in CSS units, including unit name; Overrides 'height' and 'width' props and applies the value to both height and width

    • width::String - Width in CSS units, including unit name; Apply custom width; Use this prop or through CSS; Overridden by 'size' prop if used

    • height::String - Height in CSS units, including unit name; Apply custom height; Use this prop or through CSS; Overridden by 'size' prop if used. Examples "16px" "2em"

Spaces

Spinners

spinner(spinner_type::Union{String,Symbol} = "", args...; kwargs...)

A spinner is used to show the user a timely process is currently taking place. It is an important UX feature, which gives the user the feeling the system is continuing to work for longer term activities, like grabbing data from the server or some heavy calculations.


Examples


Model

julia> @vars SpinnerModel begin
          box::R{String} = "box"
          comment::R{String} = "comment"
          hourglass::R{String} = "hourglass"
       end

View

julia> spinner(color="primary", size="3em")
julia> spinner(:box, color="orange",size="5.5em")
julia> spinner(:comment, color="green",size="3em")
julia> spinner(:hourglass, color="purple", size="4em")

Arguments


  • 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

  • thickness::Int - Override value to use for stroke-width ex. 5

Splitters

splitter(fieldname::Symbol, args...; kwargs...)

Examples


Model

julia> @vars SplitterModel begin
            splitterM::R{Int} = 50
       end

View

julia> splitter(:splitterM, style="height: 400px", [
        template("", "v-slot:before", [
          Html.div(class="q-pa-md", [
            Html.div("Before", class="text-h4 q-mb-md"),
            Html.div("{{ n }}. Lorem ipsum dolor sit, amet consectetur adipisicing elit.
               Quis praesentium cumque magnam odio iure quidem, quod illum numquam possimus
               obcaecati commodi minima assumenda consectetur culpa fuga nulla ullam. In, libero.",
              class = "q-my-md",
              @recur(:"n in 20"), key! = "n")
          ])
        ]),
        template("", "v-slot:after", [
          Html.div(class="q-pa-md", [
            Html.div("After", class="text-h4 q-mb-md")
              Html.div("{{ n }}. Lorem ipsum dolor sit, amet consectetur adipisicing elit.
               Quis praesentium cumque magnam odio iure quidem, quod illum numquam possimus
               obcaecati commodi minima assumenda consectetur culpa fuga nulla ullam. In, libero.",
              class = "q-my-md",
              @recur(:"n in 20"), key! = "n")
          ])
        ])
       ])

Arguments


  1. Content

    • horizontal::Bool - Allows the splitter to split its two panels horizontally, instead of vertically

    • limits::Vector - An array of two values representing the minimum and maximum split size of the two panels; When 'px' unit is set then you can use Infinity as the second value to make it unbound on the other side

  2. Model

    • reverse::Bool - Apply the model size to the second panel (by default it applies to the first)

    • unit::String - CSS unit for the model

    • emitimmediately::Bool - Emit model while user is panning on the separator

    • limits::Vector - An array of two values representing the minimum and maximum split size of the two panels; When 'px' unit is set then you can use Infinity as the second value to make it unbound on the other side

  3. State

    • disable::Bool - Put component in disabled mode

  4. Style

    • classbefore::Union{Vector,String,Dict} - Class definitions to be attributed to the 'before' panel ex. "bg-deep-orange"

    • classafter::Union{Vector,String,Dict} - Class definitions to be attributed to the 'after' panel ex. "bg-deep-orange"

    • separatorclass::Union{Vector,String,Dict} - Class definitions to be attributed to the splitter separator ex. "bg-deep-orange"

    • separatorstyle::Union{Vector,String,Dict} - Style definitions to be attributed to the splitter separator ex. "border-color: #ff0000;"

    • dark::Bool - Applies a default lighter color on the separator; To be used when background is darker; Avoid using when you are overriding through separator-class or separator-style props

Stippleui

Tables

Column(name::String, args...)

Examples


julia> Column("x2", align = :right)

Arguments


  • required::Bool - if we use visiblecolumns, this col will always be visible

  • label::String - label for header

  • align::Symbol - alignment for cell

  • field::String - row Object property to determine value for this column ex. name

  • sortable::Bool - tell table you want this column sortable

DataTable(data::T, opts::DataTableOptions)

Examples


julia> df = DataFrame(a = sin.(-π:π/10:π), b = cos.(-π:π/10:π), c = string.(rand(21)))
julia> dt = DataTable(df)

or

julia> using TypedTables
julia> t = Table(a = [1, 2, 3], b = [2.0, 4.0, 6.0])
julia> dt = DataTable(t)

or

julia> using Tables
julia> Tables.table([1 2 3; 3 4 5], header = ["a", "b", "c"])
julia> dt = DataTable(t1)
DataTableOptions(addid::Bool, idcolumn::String, columns::Union{Vector{Column},Nothing}, columnspecs::Dict{Union{String, Regex}, Dict{Symbol, Any}})

Examples


julia> DataTableOptions(columns = [Column("x1"), Column("x2", align = :right)])

Columnspecs

Usage for formating columns

julia> import Stipple.opts
julia> df = DataFrame(a = sin.(-π:π/10:π), b = cos.(-π:π/10:π), c = string.(rand(21)))
julia> dt = DataTable(df)
julia> dt.opts.columnspecs[r"^(a|b)$"] = opts(format = jsfunction(raw"(val, row) => `${100*val.toFixed(3)}%`"))
julia> model.table[] = dt
DataTablePagination(sort_by::Symbol, descending::Bool, page::Int, row_per_page::Int)

Examples


julia> DataTablePagination(rows_per_page=50)
table(fieldname::Symbol, args...; kwargs...)

Examples


Model

julia> @vars TableModel begin
          data::R{DataTable} = DataTable(DataFrame(rand(100000,2), ["x1", "x2"]), DataTableOptions(columns = [Column("x1"), Column("x2", align = :right)]))
          data_pagination::DataTablePagination = DataTablePagination(rows_per_page=50)
       end

View

julia> table(title="Random numbers", :data; pagination=:data_pagination, style="height: 350px;")
columns(t::T)::Vector{Column} where {T<:DataTable}
julia> columns = [Column("x1"), Column("x2", align = :right)]
rowselection(dt::DataTable, rows, cols = Colon(), idcolumn = dt.opts.addid ? dt.opts.idcolumn : "__id")

Build a table selection based on row numbers.

Standard behavior of Quasar is to include all columns in the selection.

For large tables it might be sufficient to include only the index, when no other use of the selection value is made. This is achieved by setting cols to nothing

rowselection(dt, 3)
rowselection(dt, 2:5)
rowselection(dt, [2, 4, 7])
rowselection(dt, :, nothing)
rowselection(dt::DataTable, idcolumn::Union{String, Symbol}, values, cols = Colon())

Build a table selection based on an index and a value / list of values.

rowselection(dt, "a", [1, 3])
rowselection(dt, "a", 2:9)
rowselection(dt::DataTable, idcolumn::Union{String, Symbol}, f::Function, cols = Colon())

Build a table selection based on a function.

rowselection(dt, "a", iseven)
rowselection(dt, "a", x -> x > 3)
rowselection(dt::DataTable, idcolumn::Union{String, Symbol}, regex::Regex, cols = Colon())

Build a table selection based on a Regex.

rowselection(t, "b", r"hello|World")
selectrows!(model::ReactiveModel, tablefield::Symbol, selectionfield::Symbol = Symbol(tablefield, "_selection"), args...)
selectrows!(dt::R{<:DataTable}, dt_selection::R, args...)

Select table rows of a model based on selection criteria. More information on selection syntax can be found in rowselection

@vars TableDemo begin
    @mixin table::TableWithPaginationSelection
end

model = init(TableDemo)
model.table[] = DataTable(DataFrame(a = [1, 2, 4, 6, 8, 10], b = ["Hello", "world", ",", "hello", "sun", "!"]))

selectrows!(model, :table, [1, 2, 6]) # assumes the existence of a field `:table_selection`
selectrows!(model.table, model.table_selection, "b", r"hello|World"i)
selectrows!(model, :table, :table_selection, "a", iseven)

Tabpanels

tabpanel(args...; kwargs...)

Tab panels are a way of displaying more information using less window real estate.


Examples


Model

julia>

View

julia>

Arguments


  1. General

    • name::Union{Any} - Panel name

  2. State

    • disable::Bool - Put component in disabled mode

  3. Style

    • dark::Bool - Notify the component that the background is a dark color

tabpanelgroup(args...; kwargs...)

tabpanelgroup are a way of displaying more information using less window real estate.


Examples


Model

julia> @vars TabPanelModel begin
            gpanel::R{String} = "panel"
       end

View

julia> Html.div(class="q-pa-md", [
          Html.div(class="q-gutter-y-md", style="max-width: 350px", [
             tabpanelgroup(:gpanel, animated=true, swipeable=true, infinite=true,
                   class="bg-purple text-white shadow-2 rounded-borders", [
                   tabpanel("Lorem ipsum dolor sit amet consectetur
                    adipisicing elit.", name="mails", [
                   Html.div("Mails", class="text-h6")
             ]),

             tabpanel("Lorem ipsum dolor sit amet consectetur
                  adipisicing elit.", name="alarms", [
                        Html.div("Alarms", class="text-h6")
             ]),

             tabpanel("Lorem ipsum dolor sit amet consectetur
                  adipisicing elit.", name="movies", [
                        Html.div("Movies", class="text-h6")
                  ]),
             ])
          ])
       ])

Arguments


  1. Behaviour

    • keepalive::Bool - Equivalent to using Vue’s native component on the content

    • keepaliveinclude::Union{String,Vector} - Equivalent to using Vue’s native include prop for ; Values must be valid Vue component names (e.g. "a,b" "/a|b/" ['a', 'b'])

    • keepaliveexclude::Union{String,Vector} - Equivalent to using Vue’s native exclude prop for ; Values must be valid Vue component names (e.g. "a,b" "/a|b/" ['a', 'b'])

    • keepalivemax::Int - Equivalent to using Vue’s native max prop for (e.g. 2)

    • animated::Bool - Enable transitions between panel (also see 'transition-prev' and 'transition-next' props)

    • infinite::Bool - Makes component appear as infinite (when reaching last panel, next one will become the first one)

    • swipeable::Bool - Enable swipe events (may interfere with content’s touch/mouse events)

    • vertical::Bool - Default transitions and swipe actions will be on the vertical axis

    • transitionprev::String - One of Quasar’s embedded transitions (has effect only if 'animated' prop is set) (e.g. "fade" "slide-down")

    • transitionnext::String - One of Quasar’s embedded transitions (has effect only if 'animated' prop is set) (e.g. "fade" "slide-down")

Tabs

  tab(args...; kwargs...)

tabs are a way of displaying more information using less window real estate.


Examples


View

julia> tab(name="photos", icon="photos", label="Photos")

Arguments


  1. Content

    • icon::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it). Examples. "map" "ion-add" "img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg" "img:path/to/some_image.png"

    • label::Union{Int,String} - A number or string to label the tab. Example. "Home"

    • alert::Union{Bool,String} - Adds an alert symbol to the tab, notifying the user there are some updates; If its value is not a Boolean, then you can specify a color. Example. "alert"

    • nocaps::Bool - Turns off capitalizing all letters within the tab (which is the default)

  2. General

    • name::Union{Int,String} - Panel name. Examples. "home" name! ="1"

    • tabindex::Union{Int,String} - Tabindex HTML attribute value. Examples. 0 100

  3. State

    • disable::Bool - Put component in disabled mode

  4. Style

    • ripple::Union{Bool,Dict} - Configure material ripple (disable it by setting it to 'false' or supply a config object). Examples. false """{"early" => true, "center" => true, "color" => "teal", "keyCodes" => []}"""

    • contentclass::String - Class definitions to be attributed to the content wrapper. "my-special-class"

  tabgroup(fieldname::Union{Symbol,Nothing} = nothing, args...; kwargs...)

The menu component is a convenient way to show menus. Goes very well with list as dropdown content, but it’s by no means limited to it.

Examples


Model

julia> @vars TabModel begin
          tab_m::R{String} = "tab"
       end

View

julia> tabgroup(:tab_m, inlinelabel=true, class="bg-primary text-white shadow-2", [
          tab(name="photos", icon="photos", label="Photos"),
          tab(name="videos", icon="slow_motion_video", label="Videos"),
          tab(name="movies", icon="movie", label="Movies")
       ])

Arguments


  1. Behaviour

    • target::Union{Bool, String} - Breakpoint (in pixels) of tabs container width at which the tabs automatically turn to a justify alignment. Default. 600 | Example. breakpoint! ="500"

  2. Content

    • vertical::Bool - Use vertical design (tabs one on top of each other rather than one next to the other horizontally)

    • outsidearrows::Bool - Reserve space for arrows to place them on each side of the tabs (the arrows fade when inactive)

    • mobilearrows::Bool - Force display of arrows (if needed) on mobile

    • align::String - Horizontal alignment the tabs within the tabs container. Default: center | Accepted Values: left, center, right justify | Example. right

    • breakpoint::Union{Int, String} - Breakpoint (in pixels) of tabs container width at which the tabs automatically turn to a justify alignment. Default: 600 | Example. breakpoint! = "500"

    • lefticon::String - The name of an icon to replace the default arrow used to scroll through the tabs to the left, when the tabs extend past the width of the tabs container. Example: arrow_left

    • righticon::String - The name of an icon to replace the default arrow used to scroll through the tabs to the right, when the tabs extend past the width of the tabs container. Example: arrow_right

    • stretch::Bool - When used on flexbox parent, tabs will stretch to parent’s height

    • shrink::Bool - By default, tabs is set to grow to the available space; However, you can reverse that with this prop; Useful (and required) when placing the component in a toolbar

    • switchindicator::Bool - Switches the indicator position (on left of tab for vertical mode or above the tab for default horizontal mode)

    • narrowindicator::Bool - Allows the indicator to be the same width as the tab’s content (text or icon), instead of the whole width of the tab

    • inlinelabel::Bool - Allows the text to be inline with the icon, should one be used

    • nocaps::Bool - Turns off capitalizing all letters within the tab (which is the default)

  3. Style

    • activeclass::String - The class to be set on the active tab

    • activecolor::String - The color to be attributed to the text of the active tab. Examples. teal-10 primary

    • activecolorbg::String - The color to be attributed to the background of the active tab. Examples. teal-10 primary

    • indicatorcolor::String - The color to be attributed to the indicator (the underline) of the active tab. Examples. teal-10 primary

    • contentclass::String - Class definitions to be attributed to the content wrapper

    • dense::Bool - Dense mode; occupies less space

Timelines

  timeline(args...; kwargs...)

The timeline component displays a list of events in chronological order. It is typically a graphic design showing a long bar labelled with dates alongside itself and usually events. Timelines can use any time scale, depending on the subject and data.


Examples


View

julia> Html.div(class="q-px-lg q-pb-md", [
            timeline(color="secondary", [
            timelineentry("Timeline Heading", heading=true),
            timelineentry(title="Event Title", subtitle="February 22, 1986", [
            Html.div("Lorem ipsum dolor sit amet, consectetur adipisicing elit,
                  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
                  nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
                  reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
                  Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
                  deserunt mollit anim id est laborum.")
            ]),
            timelineentry(title="Event Title", subtitle="February 21, 1986", icon="delete",[
            Html.div("Lorem ipsum dolor sit amet, consectetur adipisicing elit,
                  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
                  nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
                  reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
                  Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
                  deserunt mollit anim id est laborum.")
            ]),
            timelineentry(title="Event Title",
            subtitle="February 22, 1986",
            avatar="https://cdn.quasar.dev/img/avatar2.jpg", [
            Html.div("Lorem ipsum dolor sit amet, consectetur adipisicing elit,
                  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
                  nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
                  reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
                  Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
                  deserunt mollit anim id est laborum.")
            ])
            ])
       ])

Arguments


  1. Behavior

    • side::String - Side to place the timeline entries in dense and comfortable layout; For loose layout it gets overridden by timelineentry side prop. (default: "right") | ex. "left" | "right"

    • layout::String - Layout of the timeline. Dense keeps content and labels on one side. Comfortable keeps content on one side and labels on the opposite side. Loose puts content on both sides. (default: "dense") | ex. "comfortable" | "loose" | "dense"

  2. Style

    • color::String - Color name for component from the Quasar Color Palette. ex. "primary" | "teal-10"

    • dark::Bool - Notify the component that the background is a dark color

  timelineentry(args...; kwargs...)

Examples


View

julia> timelineentry(title="Event Title", subtitle="February 21, 1986", icon="delete",[
            Html.div("Lorem ipsum dolor sit amet, consectetur adipisicing elit,
                  sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
                  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
                  nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
                  reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
                  Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
                  deserunt mollit anim id est laborum.")
       ])

Arguments


  1. Behavior

    • side::String - Side to place the timeline entry; Works only if timeline layout is loose. (default: "right") | ex. "left" | "right"

  2. Content

    • tag::String - Tag to use, if of type 'heading' only. (default: "h3") | ex. "h1" | "h2" | "h3" | "h4" | "h5" | "h6"

    • heading::Bool - Defines a heading timeline item

    • icon::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it). (ex. "map" | "ion-add")

    • avatar::String - URL to the avatar image; Icon takes precedence if used, so it replaces avatar.

    • title::String - Title of timeline entry; Is overridden if using 'title' slot

    • subtitle::String - Subtitle of timeline entry; Is overridden if using 'subtitle' slot

    • body::String - Body content of timeline entry; Use this prop or the default slot

  3. Style

    • color::String - Color name for component from the Quasar Color Palette

Toggles

toggle(label::Union{String,Symbol}, fieldname::Union{Symbol,Nothing}, args...; kwargs...)

The toggle component is another basic element for user input. You can use this for turning settings, features or true/false inputs on and off.


Examples


Model

julia> @vars ToggleModel begin
          value::R{Bool} = false
          selection::R{Vector{String}} = ["yellow", "red"]
       end

View

julia> toggle("Blue", color="blue", :selection, val="blue")
julia> toggle("Yellow", color="yellow", :selection, val="yellow")
julia> toggle("Green", color="green", :selection, val="green")
julia> toggle("Red", color="red", :selection, val="red")

Arguments


  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"

    • indeterminatevalue::Union{Int, Float64, String, Bool} - What model value should be considered as 'indeterminate'? default value: null ex. 0 "not_answered"

    • toggleorder::String - Determines toggle order of the two states ('t' stands for state of true, 'f' for state of false); If 'toggle-indeterminate' is true, then the order is: indet -> first state -> second state -> indet (and repeat), otherwise: indet -> first state -> second state -> first state -> second state -> …​ default "tf" ex. "tf" "ft"

    • toggleindeterminate::Bool - When user clicks/taps on the component, should we toggle through the indeterminate state too?

    • keepcolor::Bool - Should the color (if specified any) be kept when the component is unticked/ off?

  2. Content

    • icon::String - Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it) ex. map ion-add img:https://cdn.quasar.dev/logo/svg/quasar-logo.svg img:path/to/some_image.png *

  3. General

    • tabindex::Union{Int, String} - Tabindex HTML attribute value 0 100

  4. Icons

    • checkedicon::String - The icon to be used when the toggle is on ex. visibility

    • uncheckedicon::String - The icon to be used when the toggle is off ex. visibility-off

    • indeterminateicon::String - The icon to be used when the model is indeterminate ex. help

  5. Label

    • label::Union{String,Symbol} - Label to display along the component ex. I agree to terms and conditions

    • leftlabel::Bool - Label (if any specified) should be displayed on the left side of the component

  6. Model

    • val::Union{Bool, Int, Float64, String, Vector} - Works when model ('value') is Array. It tells the component which value should add/remove when ticked/unticked ex. car

    • truevalue::Union{Bool, Int, Float64, String, Vector} - What model value should be considered as checked/ticked/on? default true ex. Agreed

    • falsevalue::Union{Bool, Int, Float64, String, Vector} - What model value should be considered as unchecked/unticked/off? default false ex. Not agreed

  7. State

    • disabled::Bool - Put component in disabled mode

  8. style

    • size::String - Size in CSS units, including unit name or standard size name (xs|sm|md|lg|xl) ex. 16px 1.5rem 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 color

    • dense::Bool - Dense mode; occupies less space

    • iconcolor - Override default icon color (for truthy state only); Color name for component from the Color Palette ex. primary teal-10

Toolbars

toolbar(args...; kwargs...)

toolbar is a component usually part of Layout Header and Footer, but it can be used anywhere on the page.


Examples


View

julia> toolbar(class="text-primary", [
          btn(flat=true, round=true, dense=true, icon="menu"),
          toolbartitle("Toolbar"),
          btn(flat=true, round=true, dense=true, icon="more_vert")
       ])

Arguments


  • inset::Bool - Apply an inset to content (useful for subsequent toolbars)

toolbartitle(args...; kwargs...)

Examples


View

julia> toolbartitle("Menu")

Arguments


  • shrink::Bool - By default, toolbartitle is set to grow to the available space. However, you can reverse that with this prop

Tooltips

tooltip(args...; kwargs...)
tooltip(fieldname::Symbol, args...; kwargs...)

The tooltip component is to be used when you want to offer the user more information about a certain area in your App. When hovering the mouse over the target element (or quickly tapping on mobile platforms), the tooltip will appear.


Examples


View

julia> btn("Hover me", color="primary", [
          tooltip("Some text as content of Tooltip")
       ])
julia> Html.div(class="inline bg-amber rounded-borders cursor-pointer", style="max-width: 300px", [
          Html.div(class="fit flex flex-center text-center non-selectable q-pa-md", "I am groot!<br>(Hover me!)", [
            tooltip("I am groot!")
       ])
julia>
])

Arguments


  1. Behaviour

    • transitionshow::String - Support for inbuilt transitions ex. fade slide-down

    • transitionhide::String - Support for inbuilt transitions ex. fade slide-down

    • scrolltarget::String - CSS selector or DOM element to be used as a custom scroll container instead of the auto detected one ex. scrolltarget=".scroll-target-class" scrolltarget="#scroll-target-id" scrolltarget="body"

    • target::Union{String, Bool} - Configure a target element to trigger Tooltip toggle; 'true' means it enables the parent DOM element, 'false' means it disables attaching events to any DOM elements; By using a String (CSS selector) it attaches the events to the specified DOM element (if it exists) ex. target=".my-parent" target!=false

    • noparentevent::Bool - Skips attaching events to the target DOM element (that trigger the element to get shown)

    • delay::Int - Configure Tooltip to appear with delay. default value. 0 ex. delay!="500"

    • hidedelay::Int - Configure Tooltip to disappear with delay. default value. 0 ex. hidedelay!="600"

  2. Content

    • maxheight::String - The maximum height of the Tooltip; Size in CSS units, including unit name ex. 16px 2rem

    • maxwidth::String - The maximum width of the Tooltip; Size in CSS units, including unit name ex. 16px 2rem

  3. Position

    • anchor::String - Two values setting the starting position or anchor point of the Tooltip relative to its target ex. top left top middle top right top start top end center left center middle center right center start center end bottom left bottom middle bottom right bottom start bottom end

    • self::String - Two values setting the Tooltip’s own position relative to its target ex. top left top middle top right top start top end center left center middle center right center start center end bottom left bottom middle bottom right bottom start bottom end

    • offset::Vector - An array of two numbers to offset the Tooltip horizontally and vertically in pixels. default value. [14,14] ex. [5, 10]

  4. Style

    • contentclass::Union{Vector, String, Dict} - Class definitions to be attributed to the content eg. my-special-class contentclass!="{ 'my-special-class': <condition> }"

    • contentstyle::Union{Vector, String, Dict} - Style definitions to be attributed to the content eg. background-color: #ff0000 contentstyle!="{ color: '#ff0000' }"

Trees

Uploaders

  uploader(args...; kwargs...)

Stipple supplies a way for you to upload files through the uploader component.


Examples


View

julia> uploader(label="Upload Image", autoupload=true, multiple=true, method="POST", url="/upload", field__name="img")

Arguments


  1. Behaviour

    • multiple::Bool - Allow multiple file uploads

    • accept::String - Comma separated list of unique file type specifiers. Maps to 'accept' attribute of native input type=file element ex. .jpg, .pdf, image/* image/jpeg, .pdf

    • capture::String - Optionally, specify that a new file should be captured, and which device should be used to capture that new media of a type defined by the 'accept' prop. Maps to 'capture' attribute of native input type=file element ex. user environment

    • maxfilesize::Union{Int, String} - Maximum size of individual file in bytes ex. 1024 1048576

    • maxtotalsize::Union{Int, String} - Maximum size of all files combined in bytes ex. 1024 1048576

    • maxfiles::Union{Int, String} - Maximum number of files to contain ex. maxfiles!="5" 10

    • filter::Function - Custom filter for added files; Only files that pass this filter will be added to the queue and uploaded; For best performance, reference it from your scope and do not define it inline ex. filter!="files => files.filter(file => file.size === 1024)"

    • autoupload::Bool - Upload files immediately when added

    • hideuploadbtn::Bool - Don’t show the upload button

  2. Content

    • label::Union{String,Symbol} - Label for the uploader ex. Upload photo here

    • nothumbnails::Bool - Don’t display thumbnails for image files

  3. State

    • disable::Bool - Put component in disabled mode

    • readonly::Bool - Put component in readonly mode

  4. Style

    • color:String - Color of the component from the Color Palette eg. primary teal-10

    • textcolor::String - Overrides text color (if needed); Color name from the Color Palette eg. primary teal-10

    • dark::Bool - Dark mode

    • square::Bool - Removes border-radius so borders are squared

    • flat::Bool - Applies a flat design (no default shadow)

    • bordered::Bool - Applies a default border to the component

  5. Upload

    • factory::String - Function which should return an Object or a Promise resolving with an Object; For best performance, reference it from your scope and do not define it inline Function form. (files) => Object, Promise

    • url::String - URL or path to the server which handles the upload. Takes String or factory function, which returns String. Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline ex. +"files ⇒+https://example.com?count=:({files.length})" https://example.com/path

    • method::String - HTTP method to use for upload; Takes String or factory function which returns a String; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline default. POST ex. POST PUT

    • fieldname::String - Field name for each file upload; This goes into the following header: 'Content-Disposition: form-data; name="HERE"; filename="somefile.png"; If using a function then for best performance, reference it from your scope and do not define it inline default value. (file) => file.name ex. backgroundFile fieldname!="(file) => 'background' + file.name"

    • headers::Union{Vector{Dict(String, String)}, String} - Array or a factory function which returns an array; Array consists of objects with header definitions; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline ex. [{name: 'Content-Type', value: 'application/json'}, {name: 'Accept', value: 'application/json'}]

    • formfields::Union{Vector{Dict(String, String)}, String} - Array or a factory function which returns an array; Array consists of objects with additional fields definitions (used by Form to be uploaded); Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline ex. [{name: 'my-field', value: 'my-value'}]

    • with-credentials::Union{Bool, String} - Sets withCredentials to true on the XHR that manages the upload; Takes boolean or factory function for Boolean; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline ex. with-credentials with!="files => ...."

    • sendraw::Union{Bool, String} - Send raw files without wrapping into a Form(); Takes boolean or factory function for Boolean; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline ex. sendraw sendraw!="files => ...."

    • batch::Union{Bool, String} - Upload files in batch (in one XHR request); Takes boolean or factory function for Boolean; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline ex. "files => files.length > 10"

Videos

video(args...; kwargs...)

Using the video component makes embedding a video like Youtube easy. It also resizes to fit the container by default.


Examples


Model

julia> @vars RadioModel begin
         v_ratio::R{String} = "16/9"
       end

View

julia> video(src="https://www.youtube.com/embed/dQw4w9WgXcQ")
julia> video(ratio=:v_ratio, src="https://www.youtube.com/embed/k3_tw44QsZQ?rel=0")

Arguments


  1. Accessibility

    • title::String - (Accessibility) Set the native 'title' attribute value of the inner iframe being used

  2. Behaviour

    • fetchpriority::String - Provides a hint of the relative priority to use when fetching the iframe document. Default: "auto" | Accepted values: "auto", "high", "low"

    • loading::String - Indicates how the browser should load the iframe. Default: "eager" | Accepted Values: "eager", "lazy"

    • referrerpolicy::String - Indicates which referrer to send when fetching the frame’s resource. Default: "strict-origin-when-cross-origin" | Accepted Values: "no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "origin-when-cross-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"

  3. Model

    • src::String - The source url to display in an iframe.

  4. Style

    • ratio::Union{String,Int,Float64} - Aspect ratio for the content; If value is a String, then avoid using a computational statement (like '16/9') and instead specify the String value of the result directly (eg. '1.7777')