diff --git a/src/components/togglebutton/ToggleButton.vue b/src/components/togglebutton/ToggleButton.vue
index 214e733d9..5c47787d3 100644
--- a/src/components/togglebutton/ToggleButton.vue
+++ b/src/components/togglebutton/ToggleButton.vue
@@ -13,10 +13,10 @@
export default {
props: {
value: Boolean,
+ onIcon: String,
+ offIcon: String,
onLabel: String,
offLabel: String,
- onIcon: String,
- offIcon: String,
inputId: String,
name: String,
iconPos: {
diff --git a/src/views/togglebutton/ToggleButtonDemo.vue b/src/views/togglebutton/ToggleButtonDemo.vue
index 6b3fd08c1..9d28e7b1b 100644
--- a/src/views/togglebutton/ToggleButtonDemo.vue
+++ b/src/views/togglebutton/ToggleButtonDemo.vue
@@ -16,16 +16,23 @@
{{checked2}}
+ +Two-way binding to a boolean property is defined using the standard v-model directive.
+As model is two-way binding enabled, setting the bound value as true displays the state as checked.
+Icons and Labels can be customized using onLabel, offLabel, onIcon and offIcon properties.
+Name | +Type | +Default | +Description | +
---|---|---|---|
value | +any | +null | +Value of the component. | +
onIcon | +string | +null | +Icon for the on state. | +
offIcon | +string | +null | +Icon for the off state. | +
onLabel | +string | +yes | +Label for the on state. | +
offLabel | +string | +no | +Label for the off state. | +
inputId | +string | +null | +Identifier of the input element. | +
name | +string | +null | +Name of the input element. | +
iconPos | +string | +left | +Position of the icon, valid values are "left" and "right". | +
disabled | +boolean | +null | +When present, it specifies that the element should be disabled. | +
Name | +Parameters | +Description | +
---|---|---|
change | +event: Browser event | +Callback to invoke on value change. | +
input | +event: Value as the checked state. | +Callback to invoke on click. | +
click | +event: Browser event | +Callback to invoke click. | +
focus | +event: Browser event | +Callback to invoke on focus. | +
blur | +event: Browser event | +Callback to invoke on blur. | +
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-togglebutton | +Container element | +
p-button-icon-left | +Icon element. | +
p-button-text | +Label element. | +
None.
+