Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div class="tabs-component">
      <!-- tab titles -->
      <ul class="tabs">
        <li class="tab active" data-panel="#one">
          <span class="title">Bitcoin</span>
        </li>
        <li class="tab" data-panel="#two">
          <span class="title">Litecoin</span>
        </li>
        <li class="tab" data-panel="#three">
          <span class="title">USDcoin</span>
        </li>
        <div class="slider"></div>
      </ul>
      <!--END tab titles -->
      <!-- tab panels-->
      <div class="panels">
        <div id="one" class="panel show">
          <div class="content">
            <div class="content-img">
              <img src="https://jssecrets.com/wp-content/uploads/2022/11/btc.png" />
            </div>
            <div class="content-title">Bitcoin</div>
            <div class="content-paragraph">
              Bitcoin is a decentralized digital currency, without a central
              bank or single administrator, that can be sent from user to user
              on the peer-to-peer bitcoin network without the need for
              intermediaries.
            </div>
          </div>
        </div>
        <div id="two" class="panel">
          <div class="content">
            <div class="content-img">
              <img src="https://jssecrets.com/wp-content/uploads/2022/11/ltc.png" />
            </div>
            <div class="content-title">Litecoin</div>
            <div class="content-paragraph">
              Litecoin is a peer-to-peer cryptocurrency and open-source software
              project released under the MIT/X11 license. Litecoin was an early
              bitcoin spinoff or altcoin, starting in October 2011. Supply limit
              is 84,000,000 LTC
            </div>
          </div>
        </div>
        <div id="three" class="panel">
          <div class="content">
            <div class="content-img">
              <img src="https://jssecrets.com/wp-content/uploads/2022/11/usd.png" />
            </div>
            <div class="content-title">USD Coin</div>
            <div class="content-paragraph">
              USD Coin is a digital stablecoin that is pegged to the United
              States dollar. USD Coin is managed by a consortium called Centre,
              which was founded by Circle including members from the Coinbase.
            </div>
          </div>
        </div>
      </div>
     <div class="circle one"></div>
    </div>
    <!--END tab panels-->

 

    <!-- made in jssecrets.com -->
    <a class="jssecrets" href="https://jssecrets.com/" target="_blank"
      >jssecrets.com</a
    >
    <!-- made in jssecrets.com -->
              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Urbanist:wght@500&display=swap");
*,
::before,
::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

ul {
  list-style: none;
}

body {
  height: 100vh;
  background: radial-gradient(circle, rgb(255, 255, 255) 70%, rgb(243, 243, 243) 100%);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  color: #292d34;
}

.tabs-component {
  margin-top: -40px;
  width: 320px;
  position: relative;
}
@media (max-width: 575.9px) {
  .tabs-component {
    width: 300px;
  }
}
@media (max-width: 400px) {
  .tabs-component {
    width: 240px;
  }
}
.tabs-component .tabs {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 32px;
  position: relative;
}
.tabs-component .tabs .slider {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 33.3333%;
  background: linear-gradient(45deg, rgb(245, 205, 81) 0%, rgb(247, 206, 81) 100%);
  box-shadow: 0 10px 25px rgba(245, 205, 81, 0.4);
  border-radius: 9px;
  z-index: 0;
  transition: all 0.3s linear;
}
.tabs-component .tabs .tab {
  width: 33.33333%;
  height: 100%;
  display: block;
  text-align: center;
  cursor: pointer;
  padding: 16px 0 16px 0;
  border-radius: 9px;
  font-size: 16px;
  z-index: 1;
  position: relative;
  color: #7c828d;
  transition: all 0.3s linear;
}
.tabs-component .tabs .tab:hover {
  color: #f7ce51;
}
.tabs-component .tabs .tab .title {
  font-size: 16px;
}
.tabs-component .tabs .tab.active .title {
  font-weight: 900;
  color: white;
}
.tabs-component .tabs .tab:nth-of-type(1).active ~ .slider {
  left: 0;
}
.tabs-component .tabs .tab:nth-of-type(2).active ~ .slider {
  left: 33.33333%;
}
.tabs-component .tabs .tab:nth-of-type(3).active ~ .slider {
  left: 66.66666%;
}
.tabs-component .panels .panel {
  display: none;
  height: 100%;
  padding: 24px;
  border-radius: 9px;
  background: white;
  box-shadow: 0 10px 25px rgba(124, 130, 141, 0.2);
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.tabs-component .panels .panel .content-img {
  margin-bottom: 16px;
}
.tabs-component .panels .panel .content-img img {
  max-width: 100px;
  vertical-align: middle;
}
@media (max-width: 575.9px) {
  .tabs-component .panels .panel .content-img img {
    max-width: 80px;
  }
}
@media (max-width: 575.9px) {
  .tabs-component .panels .panel .content-img {
    margin-bottom: 12px;
  }
}
.tabs-component .panels .panel .content-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 16px;
  color: #292d34;
}
@media (max-width: 575.9px) {
  .tabs-component .panels .panel .content-title {
    font-size: 16px;
    margin-bottom: 12px;
  }
}
.tabs-component .panels .panel .content-paragraph {
  font-size: 16px;
  font-weight: 400;
  color: #7c828d;
}
@media (max-width: 575.9px) {
  .tabs-component .panels .panel .content-paragraph {
    font-size: 14px;
  }
}
.tabs-component .panels .panel.show {
  display: block;
}
.tabs-component .panels .panel.show .content-img {
  animation: toLeft 1s ease-out 0s both;
}
.tabs-component .panels .panel.show .content-title {
  animation: toLeft 1s ease-out 0.075s both;
}
.tabs-component .panels .panel.show .content-paragraph {
  animation: toLeft 1s ease-out 0.15s both;
}

@keyframes toLeft {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0px);
    opacity: 1;
  }
}
.circle {
  position: absolute;
  border-radius: 100%;
  opacity: 0.7;
  filter: blur(0px);
}
@media (max-width: 400px) {
  .circle {
    display: none;
  }
}
.circle.one {
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, rgb(245, 205, 81) 0%, rgb(247, 206, 81) 100%);
  bottom: -80px;
  right: -80px;
  z-index: -1;
  box-shadow: 0 10px 25px rgba(245, 205, 81, 0.4);
  background: radial-gradient(circle at 100px 100px, #f7ce51, #f5cd51);
}
@media (max-width: 575.9px) {
  .circle.one {
    width: 100px;
    height: 100px;
    bottom: -40px;
    right: -40px;
  }
}

.jssecrets {
  font-weight: 500;
  text-decoration: none !important;
  font-family: "Urbanist";
  padding: 16px;
  background: #ffc805;
  color: #000000;
  font-size: 1.2em;
  letter-spacing: 0.2px;
  border-radius: 8px;
  box-shadow: 0px 4px 12px rgba(184, 144, 0, 0.1882352941), 0px 8px 24px rgba(184, 144, 0, 0.3764705882);
  position: absolute;
  bottom: 24px;
  right: 24px;
  transition: all 0.3s;
}
.jssecrets:hover {
  transform: translateY(-4px);
}
              
            
!

JS

              
                // Variables
const tabs = document.querySelectorAll('.tab');

// Functions
const changeTab = (event) => {
  // remove class ".active" from the current active tab
  document.querySelector('.active').classList.remove('active');

  // add class ".active" to the clicked tab
  event.currentTarget.classList.add('active');

  // remove class ".show" from the current active panel
  document.querySelector('.show').classList.remove('show');

  // add class ".show" to the corresponding new active's tab panel
  document
    .querySelector(event.currentTarget.dataset.panel)
    .classList.add('show');
};

// Event Listeners
tabs.forEach((tab) => {
  tab.addEventListener('click', changeTab);
});

              
            
!
999px

Console