Labels
Labels are usually simple texts, however, sometimes it's required to apply different styling or put additional content inside the label.
<div layout={LabelsLeftLayout}>
<TextField label="Standard" value-bind="$page.text" autoFocus/>
<TextField label={{text: "Styled", style: "color:green;font-weight:bold"}} value-bind="$page.text" />
<TextField label="Asterisk" value-bind="$page.text" required asterisk />
<TextField
label={<Checkbox value-bind="$page.enabled">Enabled</Checkbox>}
value-bind="$page.text"
enabled-bind="$page.enabled"
/>
<TextField
label={{
text: 'Tooltips',
tooltip: 'This tooltip is related to the label.'
}}
value-bind="$page.text"
tooltip="This tooltip is related to the field."
/>
</div>| Property | Description | Type |
|---|---|---|
asterisk | Set to | boolean |
autoFocus | Set to | boolean |
baseClass | Base CSS class to be applied to the element. No class is applied by default. | string |
class | Additional CSS classes to be applied to the element. If an object is provided, all keys with a "truthy" value will be added to the CSS class list. | string/object |
innerHtml | HTML to be injected into the element. | string |
items | List of child elements. | array |
layout | Define an inner layout. | string/object |
mod | Appearance modifier. For example, | string/array |
outerLayout | Defines the outer layout which wraps the widget. | widget |
plainText | Set to | boolean |
preserveWhitespace | Keep whitespace in text based children. Default is | boolean |
putInto | Used with outer layouts. Specifies the name of the content placeholder which should render the widget. | string |
style | Style object applied to the wrapper div. Used for setting the dimensions of the element. | string/object |
tag | Name of the HTML element to be rendered. Default is | string |
text | Inner text contents. | string |
tooltip | Tooltip configuration. For more info see Tooltips. | string/object |
trimWhitespace | Remove all whitespace in text based children. Default is | boolean |
vdomKey | Key that will be used as the key when rendering the React component. | string |
visible | Visibility of the widget. Defaults to | boolean |