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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

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


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.

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.






                const frame = new Frame("fit", 1024, 768, "#EEE", "#555");
frame.on("ready", ()=>{ // ES6 Arrow Function - similar to function(){}
	zog("ready from ZIM Frame"); // logs in console (F12 - choose console)

	// often need below - so consider it part of the template
	// often need below - so consider it part of the template
	const stage = frame.stage;
	const stageW = frame.width;
	const stageH = frame.height;

	// see for an intro example
	// see for video and code tutorials
	// see for documentation
	// see for ZIM on CodePen

	// *** NOTE: ZIM Cat defaults to time in seconds
	// All previous versions, examples, videos, etc. have time in milliseconds
	// This can be set back with TIME = "milliseconds" but we suggest you give it a try!
	// There will be a warning in the conslole if your animation is not moving ;-)


   // Make 100 stars
	var items = [];
	loop(100, ()=>{ // just like a for() loop but easier - given i in brackets if needed
			new Poly({
				radius:{min:30, max:100}, // ZIM VEE (Pick) values
				sides:[5,6,7,8,9], // will randomly pick (or use series())
				pointSize:{min:.5, max:.7},
				color:[pink, green, blue, yellow]

   // Make a List with the items
	const source = new List(300,600,items).center().mov(-300);

   // Make an empty list to hold picked items
	const target = new List(250,400,[]).center().mov(50);

   // Make a Container to hold the final picked item!
	const final = new Container(200,200).center().mov(350).sha();
	new Rectangle(200,200,dark).addTo(final);

	// When we tap the source List, add the selected item to the target List
		source.removeAt(1, source.selectedIndex); // one item
		target.addAt(source.selected, target.length); // add to end

	// When we tap the target List, add the selected item to the final Container
	// and add any final star back to the start of the source List

	let finalShape = null;
		let currentShape = target.selected;
        target.removeAt(1, target.selectedIndex);
        if (finalShape) source.addAt(finalShape, 0);>{
            source.addAt(finalShape, 0);
            finalShape = null;
        finalShape = currentShape;

    stage.update(); // this is needed to show any changes


	// call remote script to make ZIM icon - you will not need this

}); // end of ready