</ 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.
How to use:
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 |
doubleView |
boolean | false |
show two months at a time |
disabledWeekDays |
string | -- | Read Documentation |
minDate |
string | -- | Read Documentation |
maxDate |
string | -- | Read Documentation |
minYear |
string | -- | Read Documentation |
maxYear |
string | -- | Read Documentation |
startWeekOnMonday |
boolean | false |
instead of Sunday |
dateRange |
boolean | false |
Read Documentation |
minRange |
number | -- | Read Documentation |
maxRange |
number | -- | Read Documentation |
setDateForThisSelector |
string | -- | Read Documentation |
showArrowsOnHover |
boolean | true |
instead of always |
overlay |
boolean | false |
Show bg overlay when open |
onChange |
callback () | -- | Read Documentation |
onRangeSet |
callback () | -- | Read Documentation |
onDatePickerOpen |
callback () | -- | Read Documentation |
onDatePickerExit |
callback () | -- | Read Documentation |
styles |
{ object } | -- | Read Documentation |
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

Contributor
CodeCrumbs Team
Short Description:
Smooth accordion that automatically closes an accordion item when a new one is selected. All elements are handled directly in Webflow.
Extra Info:
No extra info.
Clone Project
Documentation
Author:
CodeCrumbs
Status:
Deprecated
New
Updated
This crumb is no longer being supported.
Latest Version:
v1.0.0
More related crumbs..
Want to contribute to the community?
Tell us what code you're working with. We would love to see it and possibly add it to the library.