mmo-radio

Documentation
Builder

Get Started

The mmo-radio Custom Element is used to select a value among others, as a radio inputs suite.

Usage

The mmo-radio can be displayed anywhere. It is mandatory to give to the element a config to get it to display and be operational.

    The config looks like this:
  • The label of the element, optionnal
  • The attributes, to set to each input :
    • The icon to display inside the radio input
    • The classes to add to the mmo-icon
    • The name of the radio input
    • The value of the input

Live Example

<mmo-radio id="icon" value="3"></mmo-radio> MMO.$('mmo-radio#icon').config = { label: "Choose a side", // label, can be optional if the element is explicit itself values: { // list of attributes for our input(s) "left": { label: "Hello", icon: "side-left", // mmo-icon to display class: "m", // class(es) for the mmo-icon }, "right": { icon: "side-right", class: "m", }, "top": { icon: "side-top", class: "m", }, "bottom": { icon: "side-bottom", class: "m", } } }

References

Tags

<#custom element> <#input>