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.


                  <div id="svgContainer"></div>


                html {
  margin: 0;
  padding: 0;
  background-color: #1E1C26;

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;

#svgContainer {
  max-width: 100%;
  max-height: 100%;
  background-color: #1E1C26;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;


                /* Shapes */
var svgContainer = document.getElementById('svgContainer');
var animItem = bodymovin.loadAnimation({
  wrapper: svgContainer,
  animType: 'canvas',
  loop: true,
  path: ''

const scaling = "fit"; // this will resize to fit inside the screen dimensions
const width = 700;
const height = 700;
const color = black; // ZIM colors like green, blue, pink, faint, clear, etc.
const outerColor = black; // any HTML colors like "violet", "#333", etc. are fine to use

const frame = new Frame(scaling, width, height, color, outerColor);
frame.on("ready", () => { // ES6 Arrow Function - like function(){}
    zog("ready from ZIM Frame"); // logs in console (F12 - choose console)

    const stage = frame.stage;
    let stageW = frame.width;
    let stageH = frame.height;

    // see for video and code tutorials
    // see for documentation
    // see for 64 Interactive Media techniques

    // *** 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 ;-)

    // put your code here (you can delete this sample code)

    // 1. need event to find out when ready because does not work if run right away 
    timeout(1, ()=>{
      // 2. changing the size of the screen changes the size we put here 
      // so need some way of finding out dimensions
      // leaving out dimensions sort of works - but how big to make the frame?
      new Bitmap(animItem.container).center();       = "none";      

}); // end of ready