Skip to content

Latest commit

 

History

History
109 lines (86 loc) · 3.3 KB

Plugins.md

File metadata and controls

109 lines (86 loc) · 3.3 KB

@squirrel-forge/ui-accordion

Back to table of contents

Documentation

Javascript / Plugins

Accordion <[ Plugins ]> Table of contents

Table of contents


UiAccordionPluginSafemode

UiAccordionPluginSafemode class - UiAccordion plugin for ensuring panel stays within viewport while opening. The component extends UiPlugin from @squirrel-forge/ui-core module.

Component settings

Component settings are changed/extended as following.

const extendConfig = {

    // Safe animation position for panel.show event
    // @type {boolean}
    safemode : true,
};

Class overview

class UiAccordionPluginSafemode extends UiPlugin {
  static pluginName : String
  constructor( options, context, debug ) {}
}

For more details check the UiAccordionPluginSafemode source file.


UiAccordionPluginScroller

UiAccordionPluginScroller class - UiAccordion plugin for scroll related options. The component extends UiPlugin from @squirrel-forge/ui-core module.

Component settings

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 overview

class UiAccordionPluginScroller extends UiPlugin {
  static pluginName : String
  constructor( options, context, debug ) {}
}

For more details check the UiAccordionPluginScroller source file.


UiAccordionPluginToggle

UiAccordionPluginToggle class - UiAccordion plugin adds a toggle mode. The component extends UiPlugin from @squirrel-forge/ui-core module.

Component settings

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 overview

class UiAccordionPluginToggle extends UiPlugin {
  static pluginName : String
  constructor( options, context, debug ) {}
}

For more details check the UiAccordionPluginToggle source file.


Accordion <[ Plugins ]> Table of contents