how to create a 2 state graphical button/switch/toogle button?

Hi everyone,

I would like to create a two state graphical button

Just think of , for example a the compatibiliti view switch/toogle button in IE8

It is a graphical button which has 2 diferent graphical states depending on wether this functionality is turned on or of

How can I achieve this in vaadin??

Is there already a component for this , or I have to implement this for myself?

Do you mean something like the

hello kim

switch is a great addon, but it is not what I am looking for.

What I am looking for is something similar to starring messagess in gmail

the start component basicaly is a visually enhanced checkbox where each state is visually represented by an image

CustomCheckbox add-on
could be the one you’re looking for.

Thank you

meanwhile I have found something similar in the vaadin components demo :slight_smile:

If I see well the button which toogles the left side tree on/off is a 2-state button :slight_smile:

But I will take a look at this addon too :slight_smile:

That’s just a basic NativeButton that’s been styled with CSS. The state is toggled from the server (addStyleName/removeStyleName).