Ionic CSS - Fab

Fabs are container elements that contain one or more fab buttons. They should be placed in a fixed position that does not scroll with the content. Fab should have one main fab-button. Fabs can also contain fab-lists which contain related buttons that show when the main fab button is clicked. The same fab container can contain several fab-list elements with different side values.

Usage

<ion-content>
  <ion-fab vertical="top" horizontal="end" slot="fixed">
    <ion-fab-button>
      <ion-icon name="add"></ion-icon>
    </ion-fab-button>
  </ion-fab>
  <ion-fab vertical="bottom" horizontal="end" slot="fixed">
    <ion-fab-button>
      <ion-icon name="arrow-dropleft"></ion-icon>
    </ion-fab-button>
  </ion-fab>
</ion-content>

 

Properties

activated

Description

If true, both the ion-fab-button and all ion-fab-list inside ion-fabwill become active. That means ion-fab-button will become a close icon and ion-fab-list will become visible.

Attribute activated
Type boolean
Default false

edge

Description

If true, the fab will display on the edge of the header if vertical is "top", and on the edge of the footer if it is "bottom". Should be used with a fixedslot.

Attribute edge
Type boolean
Default false

horizontal

Description

Where to align the fab horizontally in the viewport.

Attribute horizontal
Type "center" | "end" | "start" | undefined

vertical

Description

Where to align the fab vertically in the viewport.

Attribute vertical
Type "bottom" | "center" | "top" | undefined

Methods

close

Description

Close an active FAB list container

Signature close() => void