D2 v-switch colour when off?

I am using a v-switch in a ui-template and want to specify the colour when the switch is in the Off state. Reading the docs, and google, suggested to me that base-color might do the job, though I am not sure, and can't find an example of using it. I can't get base-color to make any difference at all. I have just this in the template

<template>
    <div>
        <v-switch color="blue" base-color="black">
        </switch>
    </div>
</template>

Using NR 4.0.0 Beta 2, Dashboard 1.7.1

[{"id":"3481af21e0e20c45","type":"ui-template","z":"997da33a0beedade","group":"4f87bd59a15b847e","name":"switch base-color test","order":0,"width":0,"height":0,"head":"","format":"<template>\n    <div>\n        <v-switch color=\"blue\" base-color=\"black\">\n        </switch>\n    </div>\n</template>\n\n","storeOutMessages":true,"passthru":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":470,"y":5200,"wires":[[]]},{"id":"4f87bd59a15b847e","type":"ui-group","name":"test","page":"ebe9054315fb0b03","width":"6","height":"1","order":-1,"showTitle":false,"className":"","visible":"true","disabled":"false"},{"id":"ebe9054315fb0b03","type":"ui-page","name":"Test","ui":"ID-BASE-1","path":"/test","icon":"home","layout":"grid","theme":"f9b6670b127dc219","order":-1,"className":"","visible":"true","disabled":"false"},{"id":"ID-BASE-1","type":"ui-base","name":"Dashboard","path":"/dashboard"},{"id":"f9b6670b127dc219","type":"ui-theme","name":"FlowForge Theme","colors":{"surface":"#152a47","primary":"#005aff","bgPage":"#ffffff","groupBg":"#ffffff","groupOutline":"#cc3e3e"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]

https://vuetifyjs.com/en/api/v-switch/#props-base-color

Sets the color of the input when it is not focused

but then the playground seems to do what you want!

https://play.vuetifyjs.com/#eNq1j0EKAjEMRa9Ssla7lzrgGVxaF50adCC2Ie2MC/HudjIKegA3Ie/BD/nHBxSJds+8mUaELbiKN6ZQsfPJGDetA7OuCjGnGoaE8lYqy32o8Woo9Eg7DwdFDyZmytKE4LlRHwq2/KIugpg8dM5+4v86OIvfr2ezlHL2qyw8V2kk0nF6AVTpXRQ=

:person_shrugging:

Actually, when selecting the playground version 3.5.14 or lower, it does not work as expected.

In short, update to DB2 v1.8.0 released today (it uses vuetify 3.5.17)

Not focused does not convey to me that the switch is in the off condition, though other references I found did suggest that.

Excellent, thanks, though it isn't actually available for install via Manage Palette. Not for me at least. I can wait for it to work its way though the system.

Looks like it wasnt refreshed on the flows site.

done now.

give it ~30 mins

All working now, including base-color.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.