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

              
                <svg width="25%" height="25%" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" tabindex="0">
  <rect class="buttonSides" x="5.04999" y="51" width="90.62" height="8" fill="#763AC2" />
  <rect class="buttonSides" width="57" height="57" rx="8" transform="matrix(0.866025 -0.5 0.866025 0.5 1 59)" fill="#763AC2" />
  <g clip-path="url(#clip0_106_11)">
    <rect class="buttonTop" width="57" height="57" rx="8" transform="matrix(0.866025 -0.5 0.866025 0.5 1 51)" fill="#A661FF" />
    <path class="buttonSides playSides" d="M64.2199 42.5L55.4353 61.4282L31.4353 47.5718L64.2199 42.5Z" fill="#763AC2" />
    <g class="glowAll" filter="url(#filter0_d_106_11)">
      <path d="M64.2199 42.5L55.4353 61.4282L31.4353 47.5718L64.2199 42.5Z" fill="white" />
    </g>
    <g class="glowMe" opacity="0.5" filter="url(#filter1_f_106_11)">
      <path d="M73.0478 36.9032L58.6665 67.8905L19.3761 45.2062L73.0478 36.9032Z" fill="white" />
    </g>
  </g>
  <path class="glowMe" opacity="0.5" d="M64 43L32 47.8L32 8L64 8L64 43Z" fill="url(#paint0_linear_106_11)" />
  <defs>
    <filter id="filter0_d_106_11" x="23.4353" y="34.5" width="48.7846" height="34.9282" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
      <feFlood flood-opacity="0" result="BackgroundImageFix" />
      <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
      <feOffset />
      <feGaussianBlur stdDeviation="4" />
      <feComposite in2="hardAlpha" operator="out" />
      <feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0" />
      <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_106_11" />
      <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_106_11" result="shape" />
    </filter>
    <filter id="filter1_f_106_11" x="3.37613" y="20.9032" width="85.6716" height="62.9873" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
      <feFlood flood-opacity="0" result="BackgroundImageFix" />
      <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
      <feGaussianBlur stdDeviation="8" result="effect1_foregroundBlur_106_11" />
    </filter>
    <linearGradient id="paint0_linear_106_11" x1="47" y1="48" x2="47" y2="8" gradientUnits="userSpaceOnUse">
      <stop stop-color="white" />
      <stop offset="1" stop-color="white" stop-opacity="0" />
    </linearGradient>
    <clipPath id="clip0_106_11">
      <rect width="57" height="57" rx="8" transform="matrix(0.866025 -0.5 0.866025 0.5 1 51)" fill="white" />
    </clipPath>
  </defs>
</svg>

<svg width="25%" height="25%" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" tabindex="0">
  <rect class="buttonSides" x="5.04999" y="51" width="90.62" height="8" fill="#763AC2" />
  <rect class="buttonSides" width="57" height="57" rx="8" transform="matrix(0.866025 -0.5 0.866025 0.5 1 59)" fill="#763AC2" />
  <g clip-path="url(#clip0_106_11)">
    <rect class="buttonTop" width="57" height="57" rx="8" transform="matrix(0.866025 -0.5 0.866025 0.5 1 51)" fill="#A661FF" />
    <path class="buttonSides playSides" d="M64.2199 42.5L55.4353 61.4282L31.4353 47.5718L64.2199 42.5Z" fill="#763AC2" />
    <g class="glowAll" filter="url(#filter0_d_106_11)">
      <path d="M64.2199 42.5L55.4353 61.4282L31.4353 47.5718L64.2199 42.5Z" fill="white" />
    </g>
    <g class="glowMe" opacity="0.5" filter="url(#filter1_f_106_11)">
      <path d="M73.0478 36.9032L58.6665 67.8905L19.3761 45.2062L73.0478 36.9032Z" fill="white" />
    </g>
  </g>
  <path class="glowMe" opacity="0.5" d="M64 43L32 47.8L32 8L64 8L64 43Z" fill="url(#paint0_linear_106_11)" />
  <defs>
    <filter id="filter0_d_106_11" x="23.4353" y="34.5" width="48.7846" height="34.9282" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
      <feFlood flood-opacity="0" result="BackgroundImageFix" />
      <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
      <feOffset />
      <feGaussianBlur stdDeviation="4" />
      <feComposite in2="hardAlpha" operator="out" />
      <feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0" />
      <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_106_11" />
      <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_106_11" result="shape" />
    </filter>
    <filter id="filter1_f_106_11" x="3.37613" y="20.9032" width="85.6716" height="62.9873" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
      <feFlood flood-opacity="0" result="BackgroundImageFix" />
      <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
      <feGaussianBlur stdDeviation="8" result="effect1_foregroundBlur_106_11" />
    </filter>
    <linearGradient id="paint0_linear_106_11" x1="47" y1="48" x2="47" y2="8" gradientUnits="userSpaceOnUse">
      <stop stop-color="white" />
      <stop offset="1" stop-color="white" stop-opacity="0" />
    </linearGradient>
    <clipPath id="clip0_106_11">
      <rect width="57" height="57" rx="8" transform="matrix(0.866025 -0.5 0.866025 0.5 1 51)" fill="white" />
    </clipPath>
  </defs>
</svg>

<svg width="25%" height="25%" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" tabindex="0">
  <rect class="buttonSides" x="5.04999" y="51" width="90.62" height="8" fill="#763AC2" />
  <rect class="buttonSides" width="57" height="57" rx="8" transform="matrix(0.866025 -0.5 0.866025 0.5 1 59)" fill="#763AC2" />
  <g clip-path="url(#clip0_106_11)">
    <rect class="buttonTop" width="57" height="57" rx="8" transform="matrix(0.866025 -0.5 0.866025 0.5 1 51)" fill="#A661FF" />
    <path class="buttonSides playSides" d="M64.2199 42.5L55.4353 61.4282L31.4353 47.5718L64.2199 42.5Z" fill="#763AC2" />
    <g class="glowAll" filter="url(#filter0_d_106_11)">
      <path d="M64.2199 42.5L55.4353 61.4282L31.4353 47.5718L64.2199 42.5Z" fill="white" />
    </g>
    <g class="glowMe" opacity="0.5" filter="url(#filter1_f_106_11)">
      <path d="M73.0478 36.9032L58.6665 67.8905L19.3761 45.2062L73.0478 36.9032Z" fill="white" />
    </g>
  </g>
  <path class="glowMe" opacity="0.5" d="M64 43L32 47.8L32 8L64 8L64 43Z" fill="url(#paint0_linear_106_11)" />
  <defs>
    <filter id="filter0_d_106_11" x="23.4353" y="34.5" width="48.7846" height="34.9282" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
      <feFlood flood-opacity="0" result="BackgroundImageFix" />
      <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha" />
      <feOffset />
      <feGaussianBlur stdDeviation="4" />
      <feComposite in2="hardAlpha" operator="out" />
      <feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0" />
      <feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_106_11" />
      <feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_106_11" result="shape" />
    </filter>
    <filter id="filter1_f_106_11" x="3.37613" y="20.9032" width="85.6716" height="62.9873" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
      <feFlood flood-opacity="0" result="BackgroundImageFix" />
      <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape" />
      <feGaussianBlur stdDeviation="8" result="effect1_foregroundBlur_106_11" />
    </filter>
    <linearGradient id="paint0_linear_106_11" x1="47" y1="48" x2="47" y2="8" gradientUnits="userSpaceOnUse">
      <stop stop-color="white" />
      <stop offset="1" stop-color="white" stop-opacity="0" />
    </linearGradient>
    <clipPath id="clip0_106_11">
      <rect width="57" height="57" rx="8" transform="matrix(0.866025 -0.5 0.866025 0.5 1 51)" fill="white" />
    </clipPath>
  </defs>
</svg>
              
            
!

CSS

              
                body {
  position: absolute;
  display: flex;
  inset: 0;
  align-items: center;
  justify-content: center;
  background-color: #000000;
}
.glowMe,
.glowAll {
  opacity: 0;
  transition: opacity 300ms linear 0s;
}
svg {
  width: 30vw;
  height: 30vw;
  cursor: pointer;
}
svg:hover .glowMe {
  opacity: 0.5;
}
svg:hover .glowAll {
  opacity: 1;
}
.buttonTop {
  fill: #5f309b;
  transition: fill 300ms linear 0s;
}
svg:hover .buttonTop {
  fill: #a661ff;
}
.buttonSides {
  fill: #371b5b;
  transition: fill 300ms linear 0s;
}
svg:hover .buttonSides {
  fill: #763ac2;
}
svg:focus {
  outline: none;
}
svg:focus .buttonTop,
svg:focus .playSides {
  stroke: white;
  stroke-width: 2px;
}
svg:focus .playSides {
  stroke-width: 1px;
}
svg:active .buttonTop {
  fill: #c79cff;
}

svg:nth-of-type(1) {
  transform: translate(37%, -35%);
}
svg:nth-of-type(3) {
  transform: translate(-37%, 35%);
}

              
            
!

JS

              
                
              
            
!
999px

Console