Skip to content

Commit

Permalink
Add range type to x-model inputs (#3911)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfox authored Dec 11, 2023
1 parent 1a3a8b7 commit 3d75916
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/docs/src/en/directives/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Now when the `<button>` is clicked, the input element's value will instantly be
* `<input type="checkbox">`
* `<input type="radio">`
* `<select>`
* `<input type="range">`

<a name="text-inputs"></a>
## Text inputs
Expand Down Expand Up @@ -282,6 +283,26 @@ Color: <span x-text="color"></span>
</div>
<!-- END_VERBATIM -->

<a name="range-inputs"></a>
## Range inputs

```alpine
<input type="range" x-model="range" min="0" max="1" step="0.1">
<span x-text="range"></span>
```

<!-- START_VERBATIM -->
<div class="demo">
<div x-data="{ range: 0.5 }">
<input type="range" x-model="range" min="0" max="1" step="0.1">

<div class="pt-4" x-text="range"></div>
</div>
</div>
<!-- END_VERBATIM -->


<a name="modifiers"></a>
## Modifiers

Expand Down

0 comments on commit 3d75916

Please sign in to comment.