Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <script>
  document.querySelector('html').setAttribute('mode', 'md')
</script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/[email protected]/dist/ionic/ionic.esm.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/@ionic/[email protected]/dist/ionic/ionic.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/[email protected]/css/ionic.bundle.css" />

<ion-app>
    <ion-header translucent>
      <ion-toolbar>
        <ion-title>Ionic ion-accordion with Custom ion-icon</ion-title>
      </ion-toolbar>
    </ion-header>
    <ion-content fullscreen class="ion-padding">
      <ion-accordion-group>
        <ion-accordion value="first">
          <ion-item slot="header" color="light">
            <ion-label>First Accordion with standard icon</ion-label>
          </ion-item>
          <div class="ion-padding" slot="content">
            First Content
          </div>
        </ion-accordion>
        <!-- My working custom icon accordion-->
        <ion-accordion value="second">
          <ion-item slot="header" color="light">      
                <ion-icon
                  class="ion-accordion-toggle-icon custom-icon"
                  name="logo-ionic"
                  slot="end" >
                </ion-icon>
            <ion-label>Second Accordion with custom icon</ion-label>
          </ion-item>
          <div class="ion-padding" slot="content">
            Second Content
          </div>
        </ion-accordion>
        <!-- My broken custom icon accordion -->
        <ion-accordion value="third">
          <ion-item slot="header" color="light">      
                <ion-icon
                  class="custom-icon2"
                  name="sad-outline"
                  slot="end" >
                </ion-icon>
            <ion-label>Third Accordion with broken custom icon</ion-label>
          </ion-item>
          <div class="ion-padding" slot="content">
            Third Content
          </div>
        </ion-accordion>
      </ion-accordion-group>
    </ion-content>
</ion-app>
              
            
!

CSS

              
                .custom-icon {
  color:blue;
}
.custom-icon2 {
  color:red;
}
              
            
!

JS

              
                
              
            
!
999px

Console