Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's 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 it's URL and the proper URL extention.

+ 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.


                <!DOCTYPE html>
    <!-- This will trigger our modal via CSS selectors -->
    <input type="checkbox" class="checkbox-modal-toggle" id="IDMODAL" />
    <!-- Here we have our centered modal -->
    <div class="modal">Lorem Ipsum Dolor Sit Amet Consectetur</div>
    <!-- Here we have our closing label which is, in fact, the modal overlay -->
    <label for="IDMODAL" class="modal-overlay"></label>
    <!-- Some fake page content -->
    <p>Lorem Ipsum Dolor Sit Amet Consectetur</p>
    <!-- Here we have our modal trigger. I'm using the class just to put some style on it -->
    <label class="modal-trigger" for="IDMODAL">Click Here To Trigger a Modal</label>


                html, body {
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;

body {
  padding: 8px;

.modal {
  position: fixed;
  z-index: 2;
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 300px;
  height: 300px;
  background-color: white;
  color: black;
  text-align: center;
  padding: 6px;
  transition: opacity 3000ms ease-in-out;
.checkbox-modal-toggle:checked + .modal {
  display: block;

.modal-overlay, .checkbox-modal-toggle + .modal + label {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: none;
  background-color: #000000;
  opacity: 0.4;
  cursor: pointer;
.checkbox-modal-toggle:checked + .modal + .modal-overlay, .checkbox-modal-toggle:checked + .modal + label {
  display: block;

.checkbox-modal-toggle {
  margin: -1px;
  padding: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip: rect(0, 0, 0, 0);
  position: absolute;

.modal-trigger {
  border-radius: 30px;
  padding: 8px;
  background: #0045ff;
  color: white;