Pen Settings

HTML

CSS

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

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

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.

HTML

            
              <article class="container">
<h1>Code</h1>
<em>Note that this is not a live preview, but a static exaple, so you can't send it or modify the code and have the change reflected</em>
<pre><code class="php">
$form = new BootstrapForm;
$form->renderMode = RenderMode::VerticalMode;

$form->addError('form-wide error');

$form->addHidden('hidden', 'def_val');
$form->addUpload('upload', 'upload a file');
$form->addButton('btn', Nette\Utils\Html::el('b', 'bold'));
$form->addButton('btn_i', Nette\Utils\Html::el('i', 'italics'));
$form->addText('text', 'text input')
	 ->setAutocomplete(TRUE)
	 ->setOption(RendererOptions::feedbackValid, 'yup, this is valid');
$form->addDateTime('datetime', 'time and date')
	 ->setOption('description', 'it has a description!');
$items = [
	'sub' => [
		1 => 'opt1',
		2 => 'opt2',
	],
	3     => 'opt3',
];
$form->addMultiSelect('multiselect', 'multi select', $items)
	 ->setDisabled([2]);

$form->addSelect('select', 'select', $items)
	 ->setDisabled([2]);

$form->addGroup('group');

$form->addCheckboxList('checkboxlist', 'checkbox list', [
	1 => 1,
	2 => 'disabled',
	3 => 3,
])
	 ->setDisabled([2]);

$form->addRadioList('radios', 'radios', [
	'val1' => 'Value 1',
	'val2' => 'Value 2',
])
	 ->setDefaultValue('val1');

$form->addHidden('hidden_in_group', 'def_val_group');
$form->addTextArea('textare', 'text area')
	 ->setAutocomplete(FALSE);
$form->addPassword('password', 'password');
$form->addEmail('email', 'e-mail');
$form->addInteger('int', 'integer');

$form->addSubmit('submit_val', 'submit');
$form->addSubmit('cancel_val', 'cancel');
</code></pre>
<h1>Produces</h1>
<form action="/" method="post" enctype="multipart/form-data" id="frm-form"><div class="alert alert-danger">form-wide error</div>
<div class="form-group">
	<label for="frm-form-upload">upload a file</label>

	
		<div><label class="custom-file"><input type="file" name="upload" id="frm-form-upload" class="custom-file-input"><span class="custom-file-control"></span></label></div>
	
</div>
<div class="form-row">
<div class="form-group">
	<label></label>

	
		<button type="button" class="btn btn-secondary"><b>bold</b></button>
	
</div>

<div class="form-group">
	<label></label>

	
		<button type="button" class="btn btn-secondary"><i>italics</i></button>
	
</div>
</div>
<div class="form-group">
	<label for="frm-form-text">text input</label>

	
	<input type="text" name="text" id="frm-form-text" class="form-control" autocomplete="on">

</div>

<div class="form-group">
	<label for="frm-form-datetime">time and date</label>

	
	<input type="text" name="datetime" id="frm-form-datetime" class="form-control" placeholder="d.m.yyyy h:mm (31.12.1998 23:59)">

		<small class="form-text text-muted">it has a description!</small>
	
</div>

<div class="form-group">
	<label for="frm-form-multiselect">multi select</label>

	
		<select name="multiselect[]" id="frm-form-multiselect" multiple="" class="form-control">
			<optgroup label="sub">
				<option value="1">opt1</option>
			
				<option value="2" disabled="">opt2</option>
			</optgroup>
		
			<option value="3">opt3</option>
		</select>
	
</div>

<div class="form-group">
	<label for="frm-form-select">select</label>

	
		<div><select name="select" id="frm-form-select" class="custom-select"><optgroup label="sub"><option value="1">opt1</option><option value="2" disabled="">opt2</option></optgroup><option value="3">opt3</option></select></div>
	
</div>
<input type="hidden" name="hidden" value="def_val"><fieldset><legend>group</legend>
<div class="form-group">
	<label>checkbox list</label>

	
		<fieldset>
			<div><label class="custom-control custom-checkbox"><input type="checkbox" class="custom-control-input" name="checkboxlist[]" value="1"><span class="custom-control-indicator"></span><span class="custom-control-description">1</span></label></div>
		
			<div><label class="custom-control custom-checkbox"><input type="checkbox" class="custom-control-input" name="checkboxlist[]" disabled="" value="2"><span class="custom-control-indicator"></span><span class="custom-control-description">disabled</span></label></div>
		
			<div><label class="custom-control custom-checkbox"><input type="checkbox" class="custom-control-input" name="checkboxlist[]" value="3"><span class="custom-control-indicator"></span><span class="custom-control-description">3</span></label></div>
		</fieldset>
	
</div>

<div class="form-group">
	<label for="frm-form-radios">radios</label>

	
		<fieldset>
			<div>
				<label class="custom-control custom-radio">
				<input class="custom-control-input" type="radio" value="val1" name="radios" checked="">
			
					<span class="custom-control-indicator"></span>
				
					<span class="custom-control-description">Value 1</span>
				</label>
			</div>
		
			<div>
				<label class="custom-control custom-radio">
				<input class="custom-control-input" type="radio" value="val2" name="radios">
			
					<span class="custom-control-indicator"></span>
				
					<span class="custom-control-description">Value 2</span>
				</label>
			</div>
		</fieldset>
	
</div>

<div class="form-group">
	<label for="frm-form-textare">text area</label>

	
		<textarea name="textare" id="frm-form-textare" class="form-control" autocomplete="off"></textarea>
	
</div>

<div class="form-group">
	<label for="frm-form-password">password</label>

	
	<input type="password" name="password" id="frm-form-password" class="form-control">

</div>

<div class="form-group">
	<label for="frm-form-email">e-mail</label>

	
	<input type="email" name="email" id="frm-form-email" data-nette-rules="[{&quot;op&quot;:&quot;optional&quot;},{&quot;op&quot;:&quot;:email&quot;,&quot;msg&quot;:&quot;Please enter a valid email address.&quot;}]" class="form-control">

</div>

<div class="form-group">
	<label for="frm-form-int">integer</label>

	
	<input type="number" name="int" id="frm-form-int" data-nette-rules="[{&quot;op&quot;:&quot;optional&quot;},{&quot;op&quot;:&quot;:integer&quot;,&quot;msg&quot;:&quot;Please enter a valid integer.&quot;}]" class="form-control">

</div>
<div class="form-row">
<div class="form-group">
	<label></label>

	
	<input type="submit" name="submit_val" value="submit" class="btn btn-primary">

</div>

<div class="form-group">
	<label></label>

	
	<input type="submit" name="cancel_val" value="cancel" class="btn btn-primary">

</div>
</div><input type="hidden" name="hidden_in_group" value="def_val_group"><input type="hidden" name="_do" value="form-submit"></fieldset></form>
  </article>
            
          
!

CSS

            
              
            
          
!

JS

            
              hljs.initHighlightingOnLoad();
            
          
!
999px

Console