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.

assignClassNameControls

private

Indicates what class names should be applicable to the current transition slides.

cycle

private

Do a presentation and calls itself to perform a cycle.

getExpandedSize Number

private

Get the size of the element when expanded

Parameters:

  • action Object

Returns:

Number:

hide

protected

Triggers the hide transition

setFollowingIndex

private

Sets the following slide index within the lower and upper bounds.

show

protected

Triggers the show transition

toAppropriateSlide

private

Coordinates the correct slide movement direction.

transitioner

private

triggerChildSlidesObserver

private

waitIntervalToInitCycle

private

Waits an interval time to start a cycle.

_element null | HTMLElement private

active unknown private

True if this item is expanded

autoPlay boolean public

Default: false

Defined in addon/components/bs-carousel.js:283

Starts automatic sliding on page load. This parameter has no effect if interval is less than or equal to zero.

canTurnToLeft unknown private

If a slide can turn to left, including corners.

canTurnToRight unknown private

If a slide can turn to right, including corners.

childSlides array private

All CarouselSlide child components.

childSlidesObserver unknown private

This observer is the entry point for real time insertion and removing of slides.

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:125

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:80

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

currentIndex unknown private

Indicates the current index of the current slide.

currentSlide unknown private

The current slide object that is going to be used by the nested slides components.

directionalClassName string private

Bootstrap style to indicate that a given slide should be moving to left/right.

expandedSize number public

Default: null

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

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

followingIndex number private

Indicates the next slide index to move into.

followingIndex unknown private

The following slide object that is going to be used by the nested slides components.

hasInterval boolean private

index number public

Default: 0

Defined in addon/components/bs-carousel.js:307

Index of starting slide.

indexObserver unknown private

This observer is the entry point for programmatically slide changing.

indicators unknown private

interval number public

Default: 5000

Defined in addon/components/bs-carousel.js:318

Waiting time before automatically show another slide. Automatic sliding is canceled if interval is less than or equal to zero.

isMouseHovering boolean private

If user is hovering its cursor on component. This property is only manipulated when 'pauseOnMouseEnter' is true.

keyboard boolean public

Default: true

Defined in addon/components/bs-carousel.js:330

Should bind keyboard events into sliding.

ltr boolean public

Default: true

Defined in addon/components/bs-carousel.js:341

If automatic sliding should be left-to-right or right-to-left. This parameter has no effect if interval is less than or equal to zero.

nextControlClassName string private

The class name to append to the next control link element.

nextControlIcon string public

Default: null

Defined in addon/components/bs-carousel.js:353

The next control icon to be displayed.

nextControlLabel string public

Default: 'Next'

Defined in addon/components/bs-carousel.js:362

Label for screen readers, defaults to 'Next'.

orderClassName string private

Bootstrap style to indicate the next/previous slide.

pauseOnMouseEnter boolean public

Default: true

Defined in addon/components/bs-carousel.js:373

Pauses automatic sliding if mouse cursor is hovering the component. This parameter has no effect if interval is less than or equal to zero.

presentationState string private

The current state of the current presentation, can be either "didTransition" or "willTransit".

prevControlClassName string private

The class name to append to the previous control link element.

prevControlIcon string public

Default: null

Defined in addon/components/bs-carousel.js:385

The previous control icon to be displayed.

prevControlLabel string public

Default: 'Previous'

Defined in addon/components/bs-carousel.js:394

Label for screen readers, defaults to 'Previous'.

resetSizeWhenNotCollapsing boolean private

Default: true

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

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

shouldNotDoPresentation boolean private

shouldRunAutomatically boolean private

showControls boolean public

Default: true

Defined in addon/components/bs-carousel.js:405

Show or hide controls.

showIndicators boolean public

Default: true

Defined in addon/components/bs-carousel.js:416

Show or hide indicators.

slideComponent {String} private

transition string public

Default: 'slide'

Defined in addon/components/bs-carousel.js:439

The type slide transition to perform. Options are 'fade' or 'slide'. Note: BS4 only

transitionDuration number public

Default: 600

Defined in addon/components/bs-carousel.js:427

The duration of the slide transition. You should also change this parameter in Bootstrap CSS file.

transitionDuration number public

Default: 350

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

The duration of the fade transition

transitioning boolean private

true if the component is currently transitioning

wrap boolean public

Default: true

Defined in addon/components/bs-carousel.js:295

If false will hard stop on corners, i.e., first slide won't make a transition to the last slide and vice versa.

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).

onSlideChanged

public

Action called after the slide has changed.

Event Payload:

  • toIndex Object
Classes