Alpine: x-model for input[type=range] changes

Created on 20 Apr 2020  路  2Comments  路  Source: alpinejs/alpine

Is it possible to use x-model to change the font-size on an element based on an input[type=range] value with the available directives, or would this require a separate function?

Most helpful comment

it should be possible. Did you try and got an error?
It should be something like https://codepen.io/SimoTod/pen/yLYaaYz

All 2 comments

it should be possible. Did you try and got an error?
It should be something like https://codepen.io/SimoTod/pen/yLYaaYz

@SimoTod That's it! I didn't think of the x-bind:style part. This is great. Thanks!

Was this page helpful?
0 / 5 - 0 ratings