Pen Settings



CSS Base

Vendor Prefixing

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


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.


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.


                <! -- template by: -->
	<div class="min-h-screen flex items-center justify-center bg-gray-50">
		<div class="flex flex-col bg-white rounded p-4 w-full max-w-xs shadow-2xl" x-data="temp()" x-init="init()">
			<div class="font-bold text-xl" x-text="`${}`">n/a</div>
			<div class="mt-6 text-6xl self-center inline-flex items-center justify-center rounded-lg text-indigo-400">
				<img :src="`${[0].icon}.png`" class="" alt="">
			<div class="flex flex-row items-center justify-center mt-6">
				<div class="font-medium text-5xl" x-text="`${parseInt(temp.main.temp)}°C`">n/a</div>
				<div class="flex flex-col items-center ml-6">
					<div x-text="`${[0].main}`">n/a</div>
					<div class="mt-1">
						<span class="text-sm"><i class="far fa-long-arrow-up"></i></span>
						<span class="text-sm font-light text-gray-500" x-text="`${parseInt(temp.main.temp_max)}°C (max)`">n/a</span>
						<span class="text-sm"><i class="far fa-long-arrow-down"></i></span>
						<span class="text-sm font-light text-gray-500" x-text="`${parseInt(temp.main.temp_min)}°C (min)`">n/a</span>
			<div class="flex flex-row justify-between mt-6">
				<div class="flex flex-col items-center">
					<div class="font-medium text-sm">Wind</div>
					<div class="text-sm text-gray-500" x-text="`${temp.wind.speed}k/h`">n/a</div>
				<div class="flex flex-col items-center">
					<div class="font-medium text-sm">Humidity</div>
					<div class="text-sm text-gray-500" x-text="`${temp.main.humidity}%`">n/a</div>
				<div class="flex flex-col items-center">
					<div class="font-medium text-sm">Feels like</div>
					<div class="text-sm text-gray-500" x-text="`${parseInt(temp.main.feels_like)}°C`">n/a</div>




                function temp() {
	return {
		temp: {},
		init() {
				.then((response) => response.json())
				.then((response) => {
					this.temp = response;