How to add slide button in an attribute

How i create a Boolean attribute with onoff button slider , like below

any help appriciate.


Can you describe what you’re asking for?

On the asset page it automatically selects the correct UI for each attribute type.
A boolean becomes a switch, text becomes an input field, etc.

actually i try to add an attribute with boolean value and want slider button but when i try it slider button not appear , it gives me checkbox buuton .

i want like below image

what i get


You can add a Valueformat to the attribute:

o for example:

  "asOnOff": true

Thanks @Denis i will try it.