body

Overview

<body/>

Developers can nest other UI components in the body tag so that they display in the dialog.

Basic Example

The following is an example of a dialog with a <text-input/>:

main.view.xml
<var name="input_field" type="text" />

<dialog id="dialog-input" title="Input Dialog" subtext="Please enter text">
    <body>
        <text-input label="Username" placeholder="Please enter your username"
                    bind="input_field" required="true" />
    </body>
    <button-group>
        <button label="Should validate" on-press="$:onUsernameSubmit()" validate="true" />
    </button-group>
</dialog>
main.js
function onUsernameSubmit() {
    // logic here on a valid username
}

Standard Attributes

None

Advanced Attributes

align

Optional

Type: center | fullwidth | left | right

Default: center

Specify the alignment of the body relative to the dialog.

Last updated