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.


                <div class="container">
  <label class="point"><input type="checkbox" name="check1" value="check1" tabindex="0"> Checkbox Enabled</label>
  <label class="point"><input type="checkbox" name="check1" value="check1" tabindex="0" checked> Checkbox Checked Enabled</label>
  <label><input type="checkbox" name="check3" value="check3" tabindex="0" disabled> Checkbox Disabled</label>
  <label><input type="checkbox" name="check4" value="check4" tabindex="0" checked disabled> Checkbox Checked Disabled</label>
  <label class="point"><input type="checkbox" class="switch" name="switch1" value="switch1" tabindex="0"> Switch Enabled</label>
  <label class="point"><input type="checkbox" class="switch" name="switch2" value="switch2" tabindex="0" checked> Switch Checked Enabled</label>
  <label><input type="checkbox" class="switch" name="switch3" value="switch3" tabindex="0" disabled> Switch Disabled</label>
  <label><input type="checkbox" class="switch" name="switch4" value="switch4" tabindex="0" checked disabled> Switch Checked Disabled</label>
  <label class="point"><input type="radio" name="radio" value="radio1" tabindex="0"> Radio Enabled</label>
  <label class="point"><input type="radio" name="radio" value="radio2" tabindex="0" checked> Radio Checked Enabled</label>
  <label><input type="radio" name="radiod" value="radio3" tabindex="0" disabled> Radio Disabled</label>
  <label><input type="radio" name="radiod" value="radio3" tabindex="0" checked disabled> Radio Checked Disabled</label>


                * { box-sizing: border-box; }

.container {
  position: absolute;
  top: 50%;
  left: 20%;
  max-width: 60%;
  transform: translateY(-50%);

label {
  color: #777;
  font: 400 0.9rem/1.25 Arial, sans-serif;
  display: inline-block;
  text-indent: .5rem;
  margin: 1rem 0 0;
input {
  border: 2px solid #999;
  -webkit-border-radius: 0.35rem;
  -moz-border-radius: 0.35rem;
  border-radius: 0.35rem;
input:hover {
  border: 2px solid #24ADFF;
input[type=checkbox]:focus, input[type=radio]:focus {
  box-shadow: 0 0 2px #999;
  outline: 0;
.point { cursor: pointer; }

@supports (-webkit-appearance: none) or (-moz-appearance: none) {
  input[type='checkbox'], input[type='radio'] {
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    display: inline-block;
    background: white;
    cursor: pointer;
    height: 23px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    border: 2px solid #999;
    -webkit-transition: background .3s, border-color .3s, box-shadow .2s;
    transition: background .3s, border-color .3s, box-shadow .2s;
  input[type='checkbox']:after, input[type='radio']:after {
    content: '';
    display: block;
    position: absolute;
    top: 0; 
    left: 0;
    -webkit-transition: opacity 0.2s, -webkit-transform 0.3s ease;
    transition: opacity 0.2s, -webkit-transform 0.3s ease;
    transition: transform 0.3s ease, opacity 0.2s;
    transition: transform 0.3s ease, opacity 0.2s, -webkit-transform 0.3s ease;
  input[type='radio']:checked {
    background: #275EFE;
    border: 2px solid #275EFE;
    -webkit-transition: opacity 0.3s, -webkit-transform 0.6s cubic-bezier(.2, .85, .32, 1.2);
    transition: opacity 0.3s, -webkit-transform 0.6s cubic-bezier(.2, .85, .32, 1.2);
    transition: transform 0.6s cubic-bezier(.2, .85, .32, 1.2), opacity 0.3s;
    transition: transform 0.6s cubic-bezier(.2, .85, .32, 1.2), opacity 0.3s, -webkit-transform 0.6s cubic-bezier(.2, .85, .32, 1.2);
  input[type='radio']:disabled {
    cursor: not-allowed;
    border: 2px solid #BBC1E1;
    opacity: .9;
  input[type='radio']:disabled:checked {
    background: #E1E6F9;
  input[type='checkbox']:disabled + label,
  input[type='radio']:disabled + label {
    cursor: not-allowed;
  input[type='radio']:hover:not(:checked):not(:disabled) {
    border: 2px solid #24ADFF;
  input[type='radio']:focus {
    border: 2px solid #401A02;
  input[type='radio']:not(.switch) {
    width: 23px;
  input[type='radio']:not(.switch):after {
    opacity: 0;
  input[type='radio']:not(.switch):checked:after {
    opacity: 1;

  input[type='checkbox']:not(.switch):after {
    top: 4px;
    left: 7px;
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: 0;
    border-left: 0;
    -webkit-transform: rotate(20deg);
            transform: rotate(20deg);
  input[type='checkbox']:not(.switch):checked:after {
    -webkit-transform: rotate(43deg);
            transform: rotate(43deg);
  input[type='checkbox'].switch {
    width: 38px;
    border-radius: 11px;
  input[type='checkbox'].switch:after {
    top: 2px;
    left: 2px;
    background: #BBC1E1;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    -webkit-transform: translateX(0);
            transform: translateX(0);
  input[type='checkbox'].switch:checked:after {
    background: white;
    -webkit-transform: translateX(15px);
            transform: translateX(15px);
  input[type='checkbox'].switch:disabled:not(:checked):after {
    opacity: .6;

  input[type='radio'] {
    border-radius: 50%;
  input[type='radio']:after {
    background: white;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    opacity: 0;
    -webkit-transform: scale(0.7);
            transform: scale(0.7);
  input[type='radio']:checked:after {
    -webkit-transform: scale(0.5);
            transform: scale(0.5);
*:before, *:after { box-sizing: inherit; }


                // Browser support