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.


Auto Save

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.


                <div id="app" />


                @import url(',400&display=swap');

* {
  background: black;
  color: white;

body { 
  font-family: "Signika Negative", sans-serif; 

.hyperboards-container {
  width: 100%;
  height: 100%;    

.main-text-div {
  display: flex;
  justify-content: flex-end;
  width: 100%;

.section-title {
    font-weight: 700;
    font-size: 90px;

.grid-cols-12 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;

.video-col {
  aspect-ratio: 16 / 9 !important;
  width: 100%;
  grid-column-start: 2;
  grid-column: span 7 / span 7;

video {
  width: 100%;
  height: 100%;
  obejct-fit: contain;

.section-text {
  grid-column: span 4 / span 4;

.other-sections {
  height: 100vh;
  width: 100%;
  background: grey;


                const { useLayoutEffect, useRef, useState } = React;

function App () {
  const IntroVideoRef = useRef(null);
  const videoRef = useRef(null);
  useLayoutEffect(() => {
      let ctx = gsap.context(() => {
        let videoEl = videoRef.current,
            forcePause = () => {
              videoEl.currentTime = 0;
        videoEl.addEventListener("loadeddata", forcePause);

          trigger: IntroVideoRef.current,
          scrub: true,
          pin: IntroVideoRef.current,
          start: '0',
          end: '+=10000',
          markers: true,
          onUpdate: function(self) { 
            if (videoEl) {
              const scrollPos = self.progress;
              const videoDuration = videoEl.duration;
              const videoCurrentTime = videoDuration * scrollPos;
              if(videoCurrentTime) {
                videoEl.currentTime = videoCurrentTime;
                console.log(videoCurrentTime, scrollPos)
        return () => videoEl.removeEventListener("loadeddata", forcePause); // cleanup context
      return () => ctx.revert(); // cleanup useLayoutEffect()
    }, [IntroVideoRef, videoRef]);
  return (
      <div className='hyperboards-container' ref={IntroVideoRef}>
        <div className='grid-cols-12'>
          <div className='w-full col-span-7 col-start-2 video-col'>
            <video ref={videoRef} muted playsInline autoPlay paused className='object-contain w-full h-full'>
              <source src="" type="video/mp4"/>
          <div className='section-text'>
            <h4 className='bold text-[25px] text-white'>
              Video specs:
            <p className='light text-light-grey'>
              -Length: 10 seconds<br/>
              -Framerate: 25 fps
      <div className='other-sections'>
        Lorem ipsum
      <div className='other-sections'>
  <App />,