Anybody can make any Pen they own a Template. Templates make it easier for you to start new Pens from useful starting points. Rather than use the default files & code that CodePen provides, you can have your own set of files, settings, and Blocks that represent a common way you like to work.

You make a Pen you own into a template in any of these three different ways:

  1. Opening the  menu in the header and toggling the Template option on.
  2. Using the Omnibar to find and run the command “Change Template”
  3. Changing the Template setting in the Pen Settings modal
One example of how to make a Pen a template is this Template toggle in the Pen Actions menu.

Note that nothing fundamentally changes about how a Pen works when it is a template. It’s just a designation you apply so that it makes it easier for you and others to find and use.

Examples of Templates

Bookmarking Templates

You can bookmark any Pen, but when you bookmark a template, you’ll see a small set of recently bookmarked templates in the editor itself, in the Files panel, on a brand new unsaved Pen.

A couple of your recent templates are available in the editor to use in case you head to the editor directly, but really intend to use a template. If you don’t see the template you’re looking for, the Browse button will open a modal to help you find it.

Any template you’ve bookmarked also shows up on the Create page which helps you find templates of your own or that you might be interested in.

Using Other People’s Templates

When a Pen is a template, you’ll see a Use Template button in the header which anyone (including yourself) can use to start a new Pen with the same files, settings, and Blocks.

When you make a public Pen into a template, it might be mainly for yourself, or it might be you providing easy access for others to use a starting point you’ve created just for them.

Note that if you want to make a Pen a template for your own use, but want to ensure it’s not available for other’s public use, you’ll need to make the Pen private.

Your Default Template

You can set one Pen to be your Default Template so when you head to the editor without choosing a template, you automatically get that one.