2.0.4 • Published 9 months ago

@flexilla/collapse v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Collapse Component

The Collapse component is used to hide and show an element.

Params

ParamsDescriptionType
collapseElementThe element to be collapsed/expandedHTMLElement
triggerElementThe element that triggers the collapseHTMLElement | null
optionsAdditional options for the CollapseCollapseOptions

CollapseOptions

OptionDescriptionType
orientationThe orientation of the collapse"vertical" | "horizontal" | "vertical"
defaultStateThe default state of the collapse"open" | "close" | "close"

Example

const options = {
  orientation: "vertical",
  defaultState: "close",
};

const collapse = new Collapse(
  '#myCollapseElement',
  options,
  '#myTriggerElement',
);

// Show the collapse element
collapse.show();

// Hide the collapse element
collapse.hide();

// Toggle the collapse element
collapse.toggle();
2.0.4

9 months ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago