Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit df8f5d2

Browse files
authored
Merge pull request #5793 from snowcore/feature/ko-bindings-collapsible-example
KO bindings: added collapsible example
2 parents fe34b4c + fabac85 commit df8f5d2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

guides/v2.2/ui_comp_guide/concepts/knockout-bindings.md

+13
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,19 @@ Binding's configuration that may include the following properties:
167167

168168
**Aliases**: `[collapsible]`
169169

170+
**Usage example**:
171+
172+
```html
173+
<div data-mage-init='{"collapsible":{"openedState": "active", "saveState": true}}'>
174+
<div data-role="title">
175+
Title
176+
</div>
177+
<div data-role="content">
178+
Collapsible content
179+
</div>
180+
</div>
181+
```
182+
170183
### `datepicker`
171184

172185
The `datepicker` binding is an adapter for the [mage/calendar.js]({{ page.baseurl }}/javascript-dev-guide/widgets/widget_calendar.html) widget.

0 commit comments

Comments
 (0)