ToggleCount
Theme-aware, responsive toggle count component.
Usage
Components are auto-discovered. Use the component directly in any .wrn view:
<ToggleCount
size="default"
color="primary"
label="Toggle Count"
name="name"
value="value"
/>Legacy mount name: data-component="ToggleCount".
Props and attributes
| Prop | Type | Requirement | Default |
|---|---|---|---|
size | string | Optional | "default" |
color | string | Optional | "primary" |
label | string | Optional | "Toggle Count" |
name | string | Optional | "" |
value | string | Optional | "" |
placeholder | string | Optional | "" |
type | string | Optional | "text" |
min | string | Optional | "" |
max | string | Optional | "" |
step | string | Optional | "" |
disabled | boolean | Optional | false |
required | boolean | Optional | false |
class | string | Optional | "" |
Slots
This component does not declare a slot.
Events
This component does not declare a custom event.
Source contract
Installed source: components/ToggleCount.wrn
component ToggleCount {
props {
size = "default"
color = "primary"
label = "Toggle Count"
name = ""
value = ""
placeholder = ""
type = "text"
min = ""
max = ""
step = ""
disabled = false
required = false
class = ""
}
view {
<label class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--field wire-next--toggle-count {class}">
<span>{label}</span>
<input {...attrs} type="{type}" name="{name}" value="{value}" placeholder="{placeholder}" min="{min}" max="{max}" step="{step}" disabled="{disabled}" required="{required}" />
</label>
}
}