type

CardBox

src @Js
class CardBox : Box

CardBox lays out child elements as a stack of cards, where only one card may be visible at a time.

See also: docDomkit

constructors

fields

effect

Transition effect to apply when selIndex is changed.

effectDur

Duratin for effect animation to last.

selIndex

Selected card index, or null if no children.

methods

onAdd
onRemove
selItem

Selected card instance, or null if no children.

Slot Details

effect

src Str? effect := null

Transition effect to apply when selIndex is changed. If null, no effect is applied.

Valid values are:

  • slideLeft: animate cards sliding in from right-to-left
  • slideRight: animate cards sliding in from left-to-right

effectDur

src Duration effectDur := 350ms

Duratin for effect animation to last.

make

src new make()

onAdd

src protected virtual override Void onAdd(Elem c)

onRemove

src protected virtual override Void onRemove(Elem c)

selIndex

src virtual Int? selIndex

Selected card index, or null if no children.

selItem

src Elem? selItem()

Selected card instance, or null if no children.