Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Angular Material FAB speed dial

License

NotificationsYou must be signed in to change notification settings

Ecodev/fab-speed-dial

Repository files navigation

Build StatusTotal DownloadsLatest Stable VersionLicenseJoin the chat at https://gitter.im/Ecodev/fab-speed-dial

This is a FAB speed dial component for Angular Material.

See the component in action onthe demo page.

Install

  1. Install the library:
    yarn add @ecodev/fab-speed-dial
  2. In your standalone components add the following to theimports array:
    • EcoFabSpeedDialComponent
    • EcoFabSpeedDialTriggerComponent
    • EcoFabSpeedDialActionsComponent

Usage

The following is an example of a minimal template. Either implement adoAction(),or adapt the bindings to your needs:

<eco-fab-speed-dial><eco-fab-speed-dial-trigger><buttonmat-fab(click)="doAction('trigger')"><mat-iconfontIcon="menu"/></button></eco-fab-speed-dial-trigger><eco-fab-speed-dial-actions><buttonmat-mini-fab(click)="doAction('action1')"><mat-iconfontIcon="add"/></button><buttonmat-mini-fab(click)="doAction('action2')"><mat-iconfontIcon="edit"/></button><buttonmat-mini-fab(click)="doAction('action3')"><mat-iconfontIcon="search"/></button></eco-fab-speed-dial-actions></eco-fab-speed-dial>

Properties

eco-fab-speed-dial

PropertyTypeDefaultDescription
openbooleanfalseIndicates if this FAB Speed Dial is opened
directionup,down,left orrightupThe direction to open the action buttons

eco-fab-speed-dial-trigger

PropertyTypeDefaultDescription
spinbooleanfalseEnables the rotation of the trigger action when the speed dial is opening

Additionally to spin property, add class "spin180" or "spin360" on html content inside ofeco-fab-speed-dial-trigger tag to activate rotation on a specific element.

In case of buttons, the icon should rotate not the whole button (box-shadow would rotate too).

Development

The most useful commands for development are:

  • yarn dev to start a development server
  • yarn build-demo to build the demo locally (it will be published automatically by GitHub Actions)
  • git tag -a 1.2.3 && git push to publish the lib to npm (via GitHub Actionsrelease job)

Prior work

This lib was originally based onangular-smd,and its various forks, itself based onAngularJS FAB Speed Dial.


[8]ページ先頭

©2009-2025 Movatter.jp