Accordion <[ Plugins ]> Table of contents
UiAccordionPluginSafemode class - UiAccordion plugin for ensuring panel stays within viewport while opening. The component extends UiPlugin from @squirrel-forge/ui-core module.
Component settings are changed/extended as following.
const extendConfig = {
// Safe animation position for panel.show event
// @type {boolean}
safemode : true,
};
class UiAccordionPluginSafemode extends UiPlugin {
static pluginName : String
constructor( options, context, debug ) {}
}
For more details check the UiAccordionPluginSafemode source file.
UiAccordionPluginScroller class - UiAccordion plugin for scroll related options. The component extends UiPlugin from @squirrel-forge/ui-core module.
Component settings are changed/extended as following.
const extendConfig = {
// Open panel on scroll to panel or content, Scroll to callback
// @type {null|boolean|Function}
scrollTo : null,
// Open panel on scroll to panel, not content
// @type {boolean}
openOnScrollTo : true,
// Capture scroll into closed panel
// @type {boolean}
captureScrollInto: true,
};
class UiAccordionPluginScroller extends UiPlugin {
static pluginName : String
constructor( options, context, debug ) {}
}
For more details check the UiAccordionPluginScroller source file.
UiAccordionPluginToggle class - UiAccordion plugin adds a toggle mode. The component extends UiPlugin from @squirrel-forge/ui-core module.
Component settings are changed/extended as following.
const extendConfig = {
// Mode
// @type {'free'|'toggle'}
mode : 'toggle',
// Available modes
// @type {Array}
availableModes : [ 'free', 'toggle' ],
// Close all panels except the first open one on init
// @type {boolean}
closeAllButFirstOnInit : true,
};
class UiAccordionPluginToggle extends UiPlugin {
static pluginName : String
constructor( options, context, debug ) {}
}
For more details check the UiAccordionPluginToggle source file.
Accordion <[ Plugins ]> Table of contents