Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <canvas id="c"></canvas>
<div id="container">
  <div id="wrapper">
      Congue platea sed dignissim elementum tellus magna tincidunt interdum odio.
      Urna aliquam fusce sed fringilla ad id nec netus diam.
      Etiam curae; libero vel fusce euismod gravida feugiat molestie habitasse.
      Nec mus suspendisse potenti nostra senectus non litora accumsan turpis.
      Faucibus eu laoreet malesuada pellentesque conubia pellentesque orci varius cum.
      Nisl nascetur condimentum imperdiet habitant inceptos porttitor gravida euismod morbi?
      Luctus, erat gravida penatibus in pharetra viverra litora fringilla nibh!
      Euismod mi felis sociis ridiculus netus dapibus tempus class porttitor.
      Luctus dignissim sed est mauris dolor risus diam, fusce praesent.
      Maecenas placerat primis sit hac litora nibh diam varius iaculis.


  background-color: black
  font-family: "Montserrat", sans-serif
  font-weight: 700
  display: flex
  justify-content: center
  margin: 0
  height: 100vh
  user-select: none
  overflow: hidden

  position: fixed
  top: 0
  left: 0
  display: block
  display: block
  position: relative
  width: 50vw
  border-radius: 10px
  padding: 200px 20px
  justify-content: center
  flex-direction: column
  position: relative

  display: block
  position: relative
  text-align: center
  color: white
  padding: 30px 0
  font-size: 48px
  font-weight: 700


                var c = document.getElementById("c");
var ctx = c.getContext('2d');
var h = window.innerHeight;
var w = window.innerWidth;
let mouseXs = w/2;
let mouseYs = h/2;
let arc = {radius: 20, lastX: mouseXs, lastY: mouseYs};

var mouseY = 0;
var followY = 0;
var wh = window.innerHeight;
var ease = 0.08;
var tween ="#wrapper", 1, { yPercent: -100, paused: true, modifiers:{yPercent:function(v) { return Math.min(-20, v); }} });

TweenLite.set("p", { transformOrigin: "center left" });

c.width = w;
c.height = h;

function render() {
  arc.lastX += (mouseXs - arc.lastX)* ease;
  arc.lastY += (mouseYs - arc.lastY)* ease;
  ctx.arc(arc.lastX, arc.lastY, arc.radius, 0, 2*Math.PI, false);
  ctx.lineWidth = 2;
  ctx.strokeStyle = 'white';
  ctx.font = "bold 10px Montserrat";
  ctx.fillStyle = "white";
  ctx.textAlign = "center";
  ctx.fillText("HOLD", arc.lastX, arc.lastY + 4); 

function init() {

  window.addEventListener('mousemove', function(el) {
    mouseXs = el.pageX;
    mouseYs = el.pageY;
  var tween2 = new, 1.2, {
    radius: arc.radius * 2,
    ease: Expo.easeOut,
    paused: true
  window.addEventListener("mousedown", function(){
    myTimeout = setTimeout(down, 1000);;
  function down() {
    window.addEventListener("mouseup", place);
    window.addEventListener("mousemove", Muovi);

  function place() {
    window.removeEventListener("mousemove", Muovi);
    if (document.getElementById("wrapper")._gsTransform.yPercent >= -20) {
      console.log("it is less than 20");
      var tweenComplete ="#wrapper", 1, {yPercent: -20 });
      // tween.progress(.2);

  function Muovi(e) {
    mouseY = e.clientY;


TweenLite.ticker.addEventListener("tick", function() {
  followY += (mouseY - followY) * ease;
  if (followY <= 0) {
    followY = 0;
  } else if (followY >= wh) {
    followY = wh;
  tween.progress(followY / wh);
  // skew effect
  var dy = (mouseY - followY) / 20;
  dy = Math.min(Math.max(dy, -5), 5);
  TweenLite.set("p", { skewY: dy });