Skip to content

Instantly share code, notes, and snippets.

@anthonyshort
Created November 5, 2013 18:07
Show Gist options
  • Save anthonyshort/7323390 to your computer and use it in GitHub Desktop.
Save anthonyshort/7323390 to your computer and use it in GitHub Desktop.
Float labels with Reactive: http://mattdsmith.com/float-label-pattern/ Just set the title on the model when
.floatLabel {
transition: all 1s ease-in-out;
position: relative;
}
.floatLabel.hide {
opacity: 0;
top: 3px;
}
<span data-show="title" class="floatLabel">Title</span>
<input type="text" on-input="set" name="title" placeholder="Title" />
module.exports = {
set: function(e){
this.reactive.set(e.target.name, e.target.value);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment