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="container">
	<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
			<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
	<div class="row col-12 mx-auto p-0 text-center">
		<h4 class="display-4">
			Jelly Button CSS
		</h4>
	</div>
	<br>
	<div class="jelly-container">
		<!-- Jelly Button Class List -->
		<!--  Small Buttons -->
		<button class="jb-btn jb-s jb-primary">Small Primary</button>
		<button class="jb-btn jb-s jb-secondary">Small Secondary</button>
		<button class="jb-btn jb-s jb-success">Small Success</button>
		<button class="jb-btn jb-s jb-info">Small Info</button>
		<button class="jb-btn jb-s jb-warning">Small Warning</button>
		<button class="jb-btn jb-s jb-danger">Small Danger</button>
		<button class="jb-btn jb-s jb-light">Small Light</button>
		<button class="jb-btn jb-s jb-dark">Small Dark</button>
		<hr>
		<!-- Normal Buttons -->
		<button class="jb-btn jb-n jb-primary">Normal Primary</button>
		<button class="jb-btn jb-n jb-secondary">Normal Secondary</button> 
		<button class="jb-btn jb-n jb-success">Normal Success</button>
		<button class="jb-btn jb-n jb-info">Normal Info</button>
		<button class="jb-btn jb-n jb-warning">Normal Warning</button> 
		<button class="jb-btn jb-n jb-danger">Normal Danger</button>
		<button class="jb-btn jb-n jb-light">Normal Light</button>
		<button class="jb-btn jb-n jb-dark">Normal Dark</button>
		<hr>
		<!--  Large Buttons -->
		<button class="jb-btn jb-l jb-primary">Large Primary</button>
		<button class="jb-btn jb-l jb-secondary">Large Secondary</button>
		<button class="jb-btn jb-l jb-success">Large Success</button>
		<button class="jb-btn jb-l jb-info">Large Info</button>
		<button class="jb-btn jb-l jb-warning">Large Warning</button>
		<button class="jb-btn jb-l jb-danger">Large Danger</button>
		<button class="jb-btn jb-l jb-light">Large Light</button>
		<button class="jb-btn jb-l jb-dark">Large Dark</button>
	</div>
	<hr>
	<div>
		<!-- Default Bootstrap Buttons with jelly button CSS -->
		<h4>Default Bootstrap 5.3 with jelly Button CSS</h4>
		<button type="button" class="btn btn-primary">Primary</button>
		<button type="button" class="btn btn-secondary">Secondary</button>
		<button type="button" class="btn btn-success">Success</button>
		<button type="button" class="btn btn-danger">Danger</button>
		<button type="button" class="btn btn-warning">Warning</button>
		<button type="button" class="btn btn-info">Info</button>
		<button type="button" class="btn btn-light">Light</button>
		<button type="button" class="btn btn-dark">Dark</button>

		<button type="button" class="btn btn-link">Link</button>
	</div>
	<br>
</div>
              
            
!

CSS

              
                /*
 * Enhanced Jelly Button Stylesheet
 * Works with Bootstrap and Links
 * Author: 13Garth
 */

 :root {
    /* Scaled Down Size Variables */

    /* Small Size */
    --jb-padding-s: 0.5em 1em;
    --jb-radius-s: 1rem;
    --jb-font-size-s: 0.875rem;
    --jb-line-height-s: 1.25rem;

    /* Normal Size */
    --jb-padding-n: 0.75em 1.5em;
    --jb-radius-n: 1.5rem;
    --jb-font-size-n: 1rem;
    --jb-line-height-n: 1.5rem;

    /* Large Size */
    --jb-padding-l: 1em 2em;
    --jb-radius-l: 2rem;
    --jb-font-size-l: 1.25rem;
    --jb-line-height-l: 1.75rem;

    --jb-font-weight: 700;

    /* Box Shadow */
    --jb-box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.3);

    /* Text */
    --jb-text-color: #ffffff;
    --jb-drop-shadow-color: rgba(0, 0, 0, 0.5);

    /* Variations */
    --jb-primary-bg-start: #1e90ff;
    --jb-primary-bg-end: #104e8b;

    --jb-secondary-bg-start: #6a5acd;
    --jb-secondary-bg-end: #483d8b;

    --jb-success-bg-start: #32cd32;
    --jb-success-bg-end: #228b22;

    --jb-danger-bg-start: #ff4040;
    --jb-danger-bg-end: #b22222;

    --jb-warning-bg-start: #ffd700;
    --jb-warning-bg-end: #daa520;

    --jb-info-bg-start: #ff7f50;
    --jb-info-bg-end: #ff4500;

    --jb-light-bg-start: #f0e68c;
    --jb-light-bg-end: #eee8aa;
    --jb-light-text-color: #000;

    --jb-dark-bg-start: #2f4f4f;
    --jb-dark-bg-end: #000;
  }

  /* Base Jelly Button Styles */
  .jb-btn,
  .btn,
  .jb-link,
  a.jb-btn {
    cursor: pointer;
    position: relative;
    display: inline-block; /* Ensure links behave like buttons */
    border: none;
    border-radius: var(--jb-radius, 1.5rem);
    padding: var(--jb-padding, 0.75em 1.5em);
    font-size: var(--jb-font-size, 1rem);
    line-height: var(--jb-line-height, 1.5rem);
    font-weight: var(--jb-font-weight);
    color: var(--jb-text-color, #fff);
    background: linear-gradient(
      -180deg,
      var(--jb-bg-start, #000) 0%,
      var(--jb-bg-end, #000) 100%
    );
    box-shadow: var(--jb-box-shadow);
    text-decoration: none; /* Remove underline from links */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    text-align: center;
    will-change: transform;
    touch-action: manipulation;
    user-select: none;
  }

  .jb-btn:hover,
  .btn:hover,
  .jb-link:hover,
  a.jb-btn:hover {
    animation: jelly 0.5s ease-in-out;
  }

  .jb-btn:active,
  .btn:active,
  .jb-link:active,
  a.jb-btn:active {
    transform: scale(0.95);
    box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.4);
  }

  .jb-btn:focus,
  .btn:focus,
  .jb-link:focus,
  a.jb-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
  }

  /* Sizes */
  .jb-s,
  .btn-sm,
  .jb-link-sm,
  a.jb-s {
    --jb-padding: var(--jb-padding-s);
    --jb-radius: var(--jb-radius-s);
    --jb-font-size: var(--jb-font-size-s);
    --jb-line-height: var(--jb-line-height-s);
  }

  .jb-n,
  .btn-md,
  .jb-link-md,
  a.jb-n {
    --jb-padding: var(--jb-padding-n);
    --jb-radius: var(--jb-radius-n);
    --jb-font-size: var(--jb-font-size-n);
    --jb-line-height: var(--jb-line-height-n);
  }

  .jb-l,
  .btn-lg,
  .jb-link-lg,
  a.jb-l {
    --jb-padding: var(--jb-padding-l);
    --jb-radius: var(--jb-radius-l);
    --jb-font-size: var(--jb-font-size-l);
    --jb-line-height: var(--jb-line-height-l);
  }

  /* Variations */
  .jb-primary,
  .btn-primary,
  .jb-link-primary,
  a.jb-primary {
    --jb-bg-start: var(--jb-primary-bg-start);
    --jb-bg-end: var(--jb-primary-bg-end);
  }

  .jb-secondary,
  .btn-secondary,
  .jb-link-secondary,
  a.jb-secondary {
    --jb-bg-start: var(--jb-secondary-bg-start);
    --jb-bg-end: var(--jb-secondary-bg-end);
  }

  .jb-success,
  .btn-success,
  .jb-link-success,
  a.jb-success {
    --jb-bg-start: var(--jb-success-bg-start);
    --jb-bg-end: var(--jb-success-bg-end);
  }

  .jb-danger,
  .btn-danger,
  .jb-link-danger,
  a.jb-danger {
    --jb-bg-start: var(--jb-danger-bg-start);
    --jb-bg-end: var(--jb-danger-bg-end);
  }

  .jb-warning,
  .btn-warning,
  .jb-link-warning,
  a.jb-warning {
    --jb-bg-start: var(--jb-warning-bg-start);
    --jb-bg-end: var(--jb-warning-bg-end);
  }

  .jb-info,
  .btn-info,
  .jb-link-info,
  a.jb-info {
    --jb-bg-start: var(--jb-info-bg-start);
    --jb-bg-end: var(--jb-info-bg-end);
  }

  .jb-light,
  .btn-light,
  .jb-link-light,
  a.jb-light {
    --jb-bg-start: var(--jb-light-bg-start);
    --jb-bg-end: var(--jb-light-bg-end);
    --jb-text-color: var(--jb-light-text-color);
  }

  .jb-dark,
  .btn-dark,
  .jb-link-dark,
  a.jb-dark {
    --jb-bg-start: var(--jb-dark-bg-start);
    --jb-bg-end: var(--jb-dark-bg-end);
  }

  /* Jelly Animation */
  @keyframes jelly {
    0% {
      transform: scale(1, 1);
    }
    25% {
      transform: scale(0.9, 1.1);
    }
    50% {
      transform: scale(1.1, 0.9);
    }
    75% {
      transform: scale(0.95, 1.05);
    }
    100% {
      transform: scale(1, 1);
    }
  }

              
            
!

JS

              
                
              
            
!
999px

Console