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.


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.


                <div class="center">
  <div id="viewerDiv"></div>
  <input type="button" onclick="changeFeature('LEGS,METAL_LEGS,UPHOLSTERY,WHEAT')" value="First set">
  <input type="button" onclick="changeFeature('LEGS,ROUNDLEG_OW,UPHOLSTERY,GREEN')" value="Second set">
  <input type="button" onclick="changeFeature('LEGS,ROUNDLEGS_W,UPHOLSTERY,BLUE')" value="Third set">
  <input type="button" onclick="changeFeature('LEGS,WRONG,UPHOLSTERY,WRONG')" value="Wrong set">


                .center {
  text-align: center;
  width: 100%;
#viewerDiv {
  margin: 100px auto;
  width: 80%;
  height: 540px;



                var viewerInstance = null;
var opts = {
  productCode: "EMMA_ARMCHAIR",
  accountID: 4965,
  features: ["LEGS", "METAL_LEGS", "UPHOLSTERY", "WHEAT"],
  containerID: "viewerDiv",
  ARDesktop: true,
  ARBanner: "ios-android",
  // When ARBanner Config is not defined the viewer displays the product code as default values for the title and subtitle in the AR banner.

if (cylindo) {
  cylindo.on("ready", function () {
    viewerInstance = cylindo.viewer.create(opts);
      function (evt, data) {
        alert('"Add to cart" triggered.');
        console.log("Arguments: ", evt);
} else {
  console.log("Cylindo viewer scripts not loaded!");

function changeFeature(features) {
  if (features) {
    var array = features.split(",");
    if (array) {
      if (viewerInstance) {
      } else {
        console.log("No instance defined");
    } else {
      console.write("empty array");
  } else {
    console.write("features string is null");