Nsmith_avatar

On / Off Toggle

Shot_1272485973

6 Responses

  1. Nsmith_avatar Nathan Smith

    Just a little on/off widget to take the place of what would normally be a checkbox.

    about 2 years ago

  2. Grug-avatar Erik Sagen

    Like how the light is shining a bit on the edge of the button. Nice detail.

    about 2 years ago

  3. Jasonrobb Jason Robb

    But shouldn't it be shining on the inside of the bounding box as well? ^_^

    about 2 years ago

  4. Nsmith_avatar Nathan Smith

    @Jason -- Good point, I'll make sure to add that in the production graphic.

    about 2 years ago

  5. Grug-avatar Erik Sagen

    True. But I like the subtlety here.

    about 2 years ago

  6. Nsmith_avatar

    Here's the on/off toggle I posted earlier, in actual working code. It's a class on a <label> that wraps around a visibility:hidden checkbox. JavaScript looks to see if the checkbox is checked or unchecked, and adjusts the background position accordingly.

    You might wonder: Why not just use a checkbox? We wanted this UI to imply immediate effect, rather than the user wonder if they needed to go click a submit button somewhere.

    about 2 years ago

keyboard shortcuts: previous shot next shot L or F like