Accordion

</ head>

</ body>

<!-- CODECRUMBS ACCORDION -->
<script src="https://cdn.jsdelivr.net/gh/CodeCrumbsApp/accordion@latest/index.min.js"></script>
<script>
  window.CodeCrumbs.Accordion({
    oneOpen: true,
    speed: 600,
    easing: 'cubic-bezier(0.55, 0, 0.1, 1)',
    repositionOpenItem: false,
    repositionDistance: 300,
    repositionDelay: 300,
    classNames: {
      accordion: 'cc-accordion',
      item: 'cc-accordion-item',
      head: 'cc-accordion-header',
      body: 'cc-accordion-body',
      icon: 'cc-accordion-icon',
    },
  })
</script>

HTML/Embed

Only tabs with a " " have code.
<!-- CODECRUMBS ACCORDION -->
<script src="https://cdn.jsdelivr.net/gh/CodeCrumbsApp/accordion@latest/index.min.js"></script>
<script>
  window.CodeCrumbs.Accordion({
    oneOpen: true,
    speed: 600,
    easing: 'cubic-bezier(0.55, 0, 0.1, 1)',
    repositionOpenItem: false,
    repositionDistance: 300,
    repositionDelay: 300,
    classNames: {
      accordion: 'cc-accordion',
      item: 'cc-accordion-item',
      head: 'cc-accordion-header',
      body: 'cc-accordion-body',
      icon: 'cc-accordion-icon',
    },
  })
</script>
Only tabs with a " " have code.
Only tabs with a " " have code.
<!-- CODECRUMBS PROXY -->
<script>
!function(e,t){e[t]=new Proxy(e[t]||{},{get:(e,o)=>new Proxy(e[o]||function(){},{apply:(n,r,a)=>{const c=()=>e[o](...a);"complete"===document.readyState?c():document.addEventListener("readystatechange",(n=>{"complete"===n.target.readyState&&(e?.[o]?c():console.error(`${t}.${o} is not a function. Did it load correctly from the CDN? If not, did you use the correct name.`))}))}})})}(globalThis,"CodeCrumbs");
</script>
Only tabs with a " " have code.
If you have already pasted this code into your project then you can skip this. If you haven't, and it's your first time using CodeCrumbs, then copy this code and navigate to your sites global settings > Custom Code tab > paste it into the <head> (first custom code block). It just needs to exist once.
Author
CodeCrumbs
Updated on
Jan 30, 2024

How to use:

Unlock more with PRO

Want to learn how to use this Crumb? Unlock detailed documentation, video tutorials, comments & support!

Upgrade to Pro

Unlock more with PRO

Want to learn how to use this Crumb? Unlock detailed documentation, video tutorials, comments & support!

Upgrade to Pro

Accordion Options:

Option Type Default Descrption
oneOpen boolean true one item open at a time
speed number 600 animation speed
easing string 'cubic-bezier(0.55, 0, 0.1, 1)' animation easing curve
repositionOpenItem boolean false Scroll the page to position the open item
repositionDistance number 300 Scroll distance in pixels from top of the page
repositionDelay number 300 Delay before starting page scroll to top

Additional Utilities:

Utility Type Value Descrption
open class -- This class gets added to the item and icon element when item is open
cc-accordion-open attribute true Add attribute to item/s you want open by default

Below is a list of languages. Copy the script for language you wish to use and place it underneath the Date Picker script (above the Date Picker function). Next, copy the abbreviated "value" from the second column and use that as the value for the language option in the Date Picker function.

Tutorial Coming Soon!

Check Browser Support

Interactive Table

Smooth accordion that automatically closes an accordion item when a new one is selected. All elements are handled directly in Webflow.

Clone Project
Documentation
Author:
Status:
Deprecated
New
Updated
Latest Version:
Built by
Built with
For the best experience

Please switch to desktop to view the content.

Back Home
Thank you! Your submission has been received!
Close Form
Oops! Something went wrong while submitting the form.
Become a Contributor