Pen Settings



CSS Base

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ add another resource

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.


Auto Save

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 id="app">
		<!--Sidebar with Dimmer -->
		<div class="fixed inset-0 flex z-40">
			<!-- Sidebar -->
				class="absolute flex top-0 h-screen z-20"
				:class="[right ? 'right-0 flex-row' : 'left-0 flex-row-reverse']"
				<!--Drawer -->
					class="w-12 h-48 p-1 my-auto rounded text-white bg-gray-600 text-center focus:outline-none hover:bg-gray-500 transition-color duration-300"
						:class="[right ? '-rotate-90' : 'rotate-90']"
						class="block transform origin-center font-bold"

				<!-- Sidebar Content -->
					class="transition-all duration-700 bg-yellow-200 overflow-hidden flex items-center justify-center"
					:class="[open ? 'max-w-lg' : 'max-w-0']"
					<div class="w-48 text-center font-bold text-xl">Sidebar</div>

			<transition name="fade">
				<!-- Dimmer -->
					v-if="dimmer && open"
					class="flex-1 bg-gray-400 bg-opacity-75 active:outline-none z-10"

		<!-- Page Content -->
			class="absolute inset-1/2 rounded bg-green-500 w-1/2 h-1/2 transform -translate-x-1/2 -translate-y-1/2 flex justify-center items-center text-white"
			Page Content

export default {
	data() {
		return {
			open: false,
			dimmer: true,
			right: false
	methods: {
		toggle() { = !;

html {
	background: #efefef;

.fade-leave-active {
	transition: opacity 1s ease-out;

.fade-leave-to {
	opacity: 0;