Components.Collapse public

An Ember component that mimics the behaviour of Bootstrap's collapse.js plugin

Usage

<BsCollapse @collapsed=>
  <div class="well">
    <h2>Collapse</h2>
    <p>This is collapsible content</p>
  </div>
</BsCollapse>

Note that only invoking the component in a template as shown above is considered part of its public API. Extending from it (subclassing) is generally not supported, and may break at any time.

getExpandedSize Number

private

Get the size of the element when expanded

Parameters:

  • action Object

Returns:

Number:

hide

protected

Triggers the hide transition

show

protected

Triggers the show transition

_element null | HTMLElement private

active unknown private

True if this item is expanded

collapsed boolean public

Default: true

Defined in addon/components/bs-collapse.js:42

Collapsed/expanded state

collapseDimension string public

Default: 'height'

Defined in addon/components/bs-collapse.js:124

The direction (height/width) of the collapse animation. When setting this to 'width' you should also define custom CSS transitions for the width property, as the Bootstrap CSS does only support collapsible elements for the height direction.

collapsedSize number public

Default: 0

Defined in addon/components/bs-collapse.js:79

The size of the element when collapsed. Defaults to 0.

expandedSize number public

Default: null

Defined in addon/components/bs-collapse.js:90

The size of the element when expanded. When null the value is calculated automatically to fit the containing elements.

resetSizeWhenNotCollapsing boolean private

Default: true

Defined in addon/components/bs-collapse.js:114

Usually the size (height) of the element is only set while transitioning, and reseted afterwards. Set to true to always set a size.

transitionDuration number public

Default: 350

Defined in addon/components/bs-collapse.js:137

The duration of the fade transition

transitioning boolean private

true if the component is currently transitioning

onHidden

public

The action to be sent after the element has been completely hidden (including the CSS transition).

onHide

public

The action to be sent when the element is about to be hidden.

onShow

public

The action to be sent when the element is about to be shown.

onShown

public

The action to be sent after the element has been completely shown (including the CSS transition).