LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

CSS
@import url(https://fonts.googleapis.com/css?family=Open+Sans:600);
::selection {
  background: rgba(62, 82, 179, 0.3);
}

::-moz-selection {
  background: rgba(62, 82, 179, 0.3);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: white;
  background: #3e52b3;
  font-size: 18px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 350px;
}
.login-container header {
  text-align: center;
  margin-bottom: 2em;
}

.hideBlock {
  position: relative;
  z-index: 0;
}

.expandable-input {
  width: 90%;
  margin: 0 auto;
  height: 5em;
  position: relative;
  cursor: pointer;
}
.expandable-input + .expandable-input {
  margin-top: 1em;
}
.expandable-input > .expandable-input--input {
  cursor: pointer;
}
.expandable-input > i {
  position: absolute;
  font-size: 24px;
  top: 26px;
  left: 16px;
  opacity: 1;
  color: rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.expandable-input--label {
  position: absolute;
  top: 0;
  left: 0;
}

.expandable-input--input {
  position: absolute;
  top: 1em;
  left: 0;
  display: block;
  width: 100%;
  font: inherit;
  border-radius: 5px;
  border: none;
  padding: 12px 12px 12px 48px;
  box-shadow: rgba(0, 0, 0, 0.4) 0 4px 8px;
  transform-origin: bottom left;
  color: rgba(0, 0, 0, 0.75);
}

.forgot {
  display: block;
  width: 90%;
  margin: 0 auto;
  text-align: right;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.4);
}

.btn-block {
  outline: none;
  display: block;
  font: inherit;
  color: inherit;
  background: #3749a0;
  border: none;
  padding: 1em;
  width: 100%;
  cursor: pointer;
  transform-origin: bottom center;
  position: relative;
  z-index: 2;
}
.btn-block:hover {
  background: #344495;
}

.mt-1 {
  margin-top: 1em;
}

.yolo {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.yolo i {
  display: none;
  opacity: 0;
  font-size: 36px;
}
JS
class ExpandableInput extends React.Component {
  
  constructor (props) {
    super(props);
    this.state = {
      expanded: false
    };
  }
  
  handleClick () {
    if (this.state.expanded) { return; }
    this.setState({ expanded: true });
    TweenMax.to(React.findDOMNode(this.refs.label), 0.25, { y: 0, fontSize: 12 });
    TweenMax.to(React.findDOMNode(this.refs.input), 0.25, { scaleY: 1 });
    TweenMax.to(React.findDOMNode(this.refs.icon), 0.25, { opacity: 1, y: 0 });
    setTimeout(this.focusInput.bind(this), 0.25);
  }
  
  focusInput () {
    React.findDOMNode(this.refs.input).focus();
  }
  
  componentDidMount () {
    TweenMax.set(React.findDOMNode(this.refs.label), { y: 30 });
    TweenMax.set(React.findDOMNode(this.refs.icon), { opacity: 0, y: 20 });
    TweenMax.set(React.findDOMNode(this.refs.input), { scaleY: 0.1 });
  }
  
  render () {
    return (
      
{this.props.label}
); } } class Login extends React.Component { constructor () { super(); this.state = { submitted: false }; } submit () { if (this.state.submitted) { return; } this.setState({ submitted: true }); let check = React.findDOMNode(this.refs.yolo); TweenMax.set(check, { display: 'block', y: 30 }); new TimelineMax() .to(React.findDOMNode(this.refs.btnText), 0.5, { opacity: 0 }) .to(React.findDOMNode(this.refs.btn), 0.25, { scaleY: 6 }) .to(check, 0.25, { y: 0, opacity: 1, ease: 'Back.easeOut' }); } render () { return (
Sign in
Forgot password?
); } } React.render(, document.body);
Host Instantly Drag and Drop Website Builder

 

Term
Wed, 11/29/2017 - 11:22

Related Codes

Pen ID
Pen ID
Pen ID