StippleUI.Buttons.btn - Function

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


Missing docstring for Btn.

StippleUI.Buttons.btngroup - Function

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


Genie