If the button is z-wave and the light is too, associations are the best way to go. However, currently this only works if the security level of z-wave for both devices is the same. You can check here: Homey Developer Tools.
If the security levels are not the same, or if you think that shouldn’t be a problem in the first place, please like my request [REQUEST] User selectable Z-wave security levels in order for associations to work.
If security levels are not the same or if the button isn’t z-wave too, below is how it should work (but be warned - it won’t be very smooth or fast, and/or may not react fast enough if you let go):
Get yourself an ap like Chronograph - Adds precise timer, stopwatch and transition functionality to Homey that supports transitions. A transition can change things in steps.
Buttons usually have actions for long press and release. On the long press you can start a transition that gradually changes the dim level. On button release, you stop the transition to keep the dim level you desire.
Let me know in the reply if you can use associations or if you need nore help getting the transitions to work.