css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="container">
  <div class="panel panel-default">
    <div class="panel-body">
      <form data-smk-icon="glyphicon-remove-sign">
        <div class="form-group">
          <label class="control-label">Text</label>
          <input type="text" class="form-control" placeholder="Enter text" required>
        </div>
        <div class="form-group">
          <label class="control-label">Disabled input (not validate)</label>
          <input type="text" class="form-control" disabled required>
        </div>
        <div class="form-group">
          <label class="control-label">Select</label>
          <select class="form-control" required>
            <option value="">Select</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
          </select>
        </div>
        <div class="form-group">
          <label class="control-label">Email</label>
          <input type="email" class="form-control" placeholder="alfredobarronc@gmail.com" required>
        </div>
        <div class="form-group">
          <label class="control-label">Alphanumeric</label>
          <input type="text" class="form-control" data-smk-type="alphanumeric" required>
        </div>
        <div class="form-group">
          <label class="control-label">Number (type number)</label>
          <input type="number" class="form-control" required>
        </div>
        <div class="form-group">
          <label class="control-label">Number (not required)</label>
          <input type="text" class="form-control" data-smk-type="number">
        </div>
        <div class="form-group">
          <label class="control-label">Number (2015-2020)</label>
           <input type="text" class="form-control" data-smk-type="number" data-smk-min="2015" data-smk-max="2020" required>
        </div>
        <div class="form-group">
          <label class="control-label">Decimal</label>
          <input type="text" class="form-control" placeholder="10.00" data-smk-type="decimal" required>
        </div>
        <div class="form-group">
          <label class="control-label">Currency</label>
          <div class="input-group">
            <span class="input-group-addon">$</span>
            <input type="text" class="form-control" placeholder="1,000.00" data-smk-type="currency" required>
          </div>
        </div>
        <div class="form-group">
          <label class="control-label">Number Character (8)</label>
          <input type="text" class="form-control" minlength="8" maxlength="8" required>
        </div>
        <div class="form-group">
          <label class="control-label">Range Character (4-8)</label>
          <input type="text" class="form-control" minlength="4" maxlength="8" required>
        </div>
        <div class="form-group">
          <label class="control-label">Password</label>
          <div class="input-group">
            <input type="password" class="form-control" data-smk-strongPass="medium" id="pass1" required>
            <span class="input-group-addon">medium</span>
          </div>
        </div>
        <div class="form-group">
          <label class="control-label">Confirm Password</label>
          <input type="password" class="form-control" id="pass2">
        </div>
        <div class="form-group">
          <label class="control-label">URL</label>
          <input type="url" class="form-control" placeholder="http://alfredobarron.com" required>
        </div>
        <div class="form-group">
          <label class="control-label">Tel</label>
          <input type="tel" class="form-control" placeholder="0123456789" required>
        </div>
        <div class="form-group">
          <label class="control-label">Color</label>
          <input type="color" class="form-control" required>
        </div>
        <div class="form-group">
          <label class="control-label">Date</label>
          <input type="date" class="form-control" required>
        </div>
        <div class="form-group">
          <label class="control-label">Datetime</label>
          <input type="datetime" class="form-control" placeholder="1996-12-19T16:39:57-08:00" required>
        </div>
        <div class="form-group">
          <label class="control-label">Time</label>
          <input type="time" class="form-control" required>
        </div>
        <div class="form-group">
          <label class="control-label">Month</label>
          <input type="month" class="form-control" required>
        </div>
        <div class="form-group">
          <label class="control-label">Week</label>
          <input type="week" class="form-control" required>
        </div>
        <div class="form-group">
          <label class="control-label">Pattern</label>
          <input type="text" class="form-control" placeholder="Enter 3 character from 'a' to 'z'" data-smk-pattern="[a-z]{3}" required>
        </div>
        <div class="form-group">
          <label class="control-label">Textarea</label>
          <textarea class="form-control" rows="3" required></textarea>
        </div>
        <div class="form-group">
          <div class="checkbox">
            <label>
              <input type="checkbox" name="check" value="1" required>
              Checkbox
            </label>
          </div>
        </div>
        <div class="form-group">
          <div class="radio">
            <label>
              <input type="radio" name="rad" value="option1" required>
              Option 1
            </label>
          </div>
          <div class="radio">
            <label>
              <input type="radio" name="rad" value="option2" required>
              Option 2
            </label>
          </div>
        </div>
        <button type="button" class="btn btn-default" id="btnClear">Clear</button>
        <button type="submit" class="btn btn-default" id="btnSubmit">Submit</button>
      </form>
    </div>
  </div>
</div>
            
          
!
            
              // Form Validation
$('#btnSubmit').click(function(e) {
  e.preventDefault();
  if ($('form').smkValidate()) {
    if( $.smkEqualPass('#pass1', '#pass2') ) {
      // Code here
      $.smkAlert({
        text: 'Validate!',
        type: 'success'
      });
    } 
  }
});

// Form Clear
$('#btnClear').click(function(e) {
  e.preventDefault();
  $('form').smkClear();
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console