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.

              <p>Faking dropdown select, using input radio.</p>
<div class="dropp">
  <div class="dropp-header">
    <span class="dropp-header__title js-value">Choose an option</span>
    <a href="#" class="dropp-header__btn js-dropp-action"><i class="icon"></i></a>
  <div class="dropp-body">
    <label for="optA">Option A<input type="radio" id="optA" name="dropp" value="Option A"/></label>
    <label for="optB">Option B<input type="radio" id="optB" name="dropp" value="Option B"/></label>
    <label for="optC">Option C<input type="radio" id="optC" name="dropp" value="Option C"/></label>
    <label for="optD">Option D<input type="radio" id="optD" name="dropp" value="Option D"/></label>
<p>Update: See <a href="" target="_blank">version 2</a></p>
              @import bourbon

@import url(
	box-sizing: border-box

*, *:before, *:after 
	box-sizing: inherit

	background: #181818
	overflow-y: scroll
	font: 1em/1.6 "Varela Round", Arial, sans-serif
	color: #999
	font-weight: 400
	max-width: 25em 
	padding: 1em
	margin: 10% auto

	display: block
	position: relative
	width: 1.5em 
	height: 1.5em
	margin: 0 auto

		content: ""
		position: absolute

// Dropp styles

$bgColor: #242424
$trimColor: #dd4040
$textColor: #fff 

	width: 100%
	box-shadow: 0 1px 3px darken($bgColor,10)

	background: $bgColor
	color: $textColor
	border-bottom: 2px solid $trimColor

	display: block
	padding: .8em .5em

	display: block
	background: darken($bgColor,3)
	color: $textColor
	padding: .8em .5em
	+transition(all .3s ease-in-out)

			top: 30%
			left: 25%
			width: 50%
			height: 15% 
			background: $trimColor
			top: 55% 

		background: $trimColor
				background: $textColor

		outline: none

	overflow: hidden
	width: 100%
	max-height: 0
	background: lighten($bgColor,2)
	color: $textColor
	+transition(all .3s ease-in-out)

		max-height: 20em

		display: block 
		font-size: .875em
		color: $textColor 
		text-decoration: none
		padding: 1em .5em
		font-weight: 400
		box-shadow: 0 -1px 0 darken($bgColor,5),inset 0 1px 0 lighten($bgColor,5)
		cursor: pointer

			box-shadow: none

			background: $trimColor

		> input 
			display: none

              $(document).ready(function() {

  // Default dropdown action to show/hide dropdown content
  $('.js-dropp-action').click(function(e) {

  // Using as fake input select dropdown
  $('label').click(function() {
  // get the value of checked input radio and display as dropp title
  $('input[name="dropp"]').change(function() {
    var value = $("input[name='dropp']:checked").val();

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