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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

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



  <button class="termly-cookie-preference-button" type="button" style="background: white; width: 165px; height: 30px; border-radius: 3px; border: 1px solid #5f7d9c; font-family: Roboto, Arial; font-size: 10px; color: #5f7d9c; font-weight: 600; box-sizing: border-box; cursor: pointer; padding: 0; outline: none;" onclick="displayPreferenceModal()">Manage Cookie Preferences</button>

<h2>Termly JS Callback</h2>

<p>Open console to view <code>getUpdatedCookieWhitelistByTermly()</code> response data.</p>

<p>Visitor UUID: <code id="uuid"></code></p>

<script data-categories="essential" type="text/plain" src=""></script>


                body {
  font-family: sans-serif;
  font-size: 14px;
  margin: 15px;

button {
  margin: 0px 15px 15px 0px;

code {
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 4px;
  background-color: #f7f7f7;
  color: #f13306;
  line-height: 20px;


// Termly callback to fetch visitor UUID And cookie whitelist
function getUpdatedCookieWhitelistByTermly(data) {
  document.getElementById("uuid").innerHTML = data.uuid;

// Check if localstorage is accessible so that demo can run
function lsCheck() {
  var blank = 'blank';
  try {
    localStorage.setItem(blank, blank);
    return true;
  } catch(e) {
    return false;

if(lsCheck() === false) {
  alert("Demo can't access local storage. Are you using an incognito window?");