Skip to content

Commit f1719bf

Browse files
FAB: update Getting Started (DevExpress#8109) (DevExpress#8151)
1 parent 0883b33 commit f1719bf

File tree

4 files changed

+174
-288
lines changed

4 files changed

+174
-288
lines changed
Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,9 @@
11
#include tutorials-intro-installationnote
22

3-
The Floating Action Button (FAB) is the primary action button on a screen that is displayed in front of all screen content. The FAB can execute an action or open a stack of two to five related actions (speed dial).
3+
The Floating Action Button (FAB) sits above all screen content and triggers a primary action. FAB either executes a single action or expands to display two to five related actions (speed dial).
44

5-
There should be **only one** FAB on a screen, but its action(s) can be different for different screens. For more details on the FAB concept and best practices, refer to the following topic: <a href="https://material.io/design/components/buttons-floating-action-button.html" target="_blank">Material Design Guidelines</a>.
5+
[note] Place **only one** FAB on a screen.
66

7-
In DevExtreme, the FAB is implemented as a container that collects and stores [SpeedDialAction](/api-reference/10%20UI%20Components/dxSpeedDialAction '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/') components.
7+
In DevExtreme, the FAB acts as a container for [SpeedDialAction](/api-reference/10%20UI%20Components/dxSpeedDialAction '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/') components.
88

9-
From this tutorial, you will learn how to create a single- or multi-action FAB and alter action sets during screen transitions.
10-
11-
[note]
12-
13-
---
14-
##### jQuery
15-
16-
Code examples in this tutorial use icons from the <a href="https://ionicons.com" target="_blank">Ionicons</a> library. If you are going to replicate the examples in your application, reference the Ionicons stylesheet within in the `<head>` section of your page:
17-
18-
<!--HTML-->
19-
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/css/ionicons.min.css">
20-
21-
22-
##### Angular
23-
24-
Code examples in this tutorial use icons from the <a href="https://ionicons.com" target="_blank">Ionicons</a> library. If you are going to replicate the examples in your application, install the `ionicons` npm package:
25-
26-
npm install ionicons@4 --save
27-
28-
##### Vue
29-
30-
Code examples in this tutorial use icons from the <a href="https://ionicons.com" target="_blank">Ionicons</a> library. If you are going to replicate the examples in your application, install the `ionicons` npm package:
31-
32-
npm install ionicons@4 --save
33-
34-
##### React
35-
36-
Code examples in this tutorial use icons from the <a href="https://ionicons.com" target="_blank">Ionicons</a> library. If you are going to replicate the examples in your application, install the `ionicons` npm package:
37-
38-
npm install ionicons@4 --save
39-
40-
---
41-
42-
[/note]
43-
44-
[tags]dxspeeddialaction
9+
This tutorial demonstrates how to create single and multi-action FABs, and how to update action sets during screen transitions.

concepts/05 UI Components/Floating Action Button/00 Getting Started with Floating Action Button/10 Single Action.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
A single-action FAB represents the primary action of a screen. According to the [guidelines](https://material.io/design/components/buttons-floating-action-button.html#usage), this action should be constructive, such as, create, share, explore, or edit, as in the following example:
1+
A single-action FAB triggers the main screen action:
22

33
<div class="simulator-desktop-container" style="height:362px" data-view="/Content/Applications/25_2/GettingStartedWith/FloatingActionButton/SingleAction/index.html, /Content/Applications/25_2/GettingStartedWith/FloatingActionButton/SingleAction/index.js, /Content/Applications/25_2/GettingStartedWith/FloatingActionButton/SingleAction/index.css"></div>
44

5-
To create a single-action FAB, add one [SpeedDialAction](/api-reference/10%20UI%20Components/dxSpeedDialAction '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/') to your page and specify its [onClick](/api-reference/10%20UI%20Components/dxSpeedDialAction/1%20Configuration/onClick.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#onClick') and [icon](/api-reference/10%20UI%20Components/dxSpeedDialAction/1%20Configuration/icon.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#icon') properties. Other properties are optional, but we also specify a [hint](/api-reference/10%20UI%20Components/Widget/1%20Configuration/hint.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#hint').
5+
Add one [SpeedDialAction](/api-reference/10%20UI%20Components/dxSpeedDialAction '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/') to the page and specify its [onClick](/api-reference/10%20UI%20Components/dxSpeedDialAction/1%20Configuration/onClick.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#onClick') and [icon](/api-reference/10%20UI%20Components/dxSpeedDialAction/1%20Configuration/icon.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#icon') properties. You can also define a [hint](/api-reference/10%20UI%20Components/Widget/1%20Configuration/hint.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#hint').
66

7-
To position the FAB, use the [floatingActionButtonConfig](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/').[position](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig/position.md '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/#position') property in the [GlobalConfig](/api-reference/50%20Common/Object%20Structures/GlobalConfig '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/') object.
7+
Set the FAB's [position](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig/position.md '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/#position') property in [GlobalConfig](/api-reference/50%20Common/Object%20Structures/GlobalConfig '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/').
88

9-
Refer to the GitHub repository for the code that configures the example above and illustrates the described techniques.
9+
The code example is available in the following GitHub repository:
1010

1111
#include btn-open-github with {
1212
href: "https://github.com/DevExpress-Examples/getting-started-with-floating-action-button-single-action/"

concepts/05 UI Components/Floating Action Button/00 Getting Started with Floating Action Button/20 Multiple Actions (Speed Dial).md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
The FAB can open a menu with several related actions (speed dial).
1+
A FAB can open a menu with multiple related actions (speed dial).
22

33
<div class="simulator-desktop-container" style="height:362px" data-view="/Content/Applications/25_2/GettingStartedWith/FloatingActionButton/MultipleActions/index.html, /Content/Applications/25_2/GettingStartedWith/FloatingActionButton/MultipleActions/index.js, /Content/Applications/25_2/GettingStartedWith/FloatingActionButton/MultipleActions/index.css"></div>
44

5-
To create a FAB that opens a speed dial, add multiple [SpeedDialAction](/api-reference/10%20UI%20Components/dxSpeedDialAction '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/') components to a page, each with an individual [icon](/api-reference/10%20UI%20Components/dxSpeedDialAction/1%20Configuration/icon.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#icon') and [onClick](/api-reference/10%20UI%20Components/dxSpeedDialAction/1%20Configuration/onClick.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#onClick') event handler. The actions are sorted according to their [indexes](/api-reference/10%20UI%20Components/dxSpeedDialAction/1%20Configuration/index.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#index').
5+
To create a FAB that triggers a speed dial, place multiple [SpeedDialAction](/api-reference/10%20UI%20Components/dxSpeedDialAction '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/') components on the page. Assign a unique [icon](/api-reference/10%20UI%20Components/dxSpeedDialAction/1%20Configuration/icon.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#icon') and [onClick](/api-reference/10%20UI%20Components/dxSpeedDialAction/1%20Configuration/onClick.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#onClick') event handler to each action. FAB sorts actions by [index](/api-reference/10%20UI%20Components/dxSpeedDialAction/1%20Configuration/index.md '/Documentation/ApiReference/UI_Components/dxSpeedDialAction/Configuration/#index').
66

7-
FAB parameters are configured in the [floatingActionButtonConfig](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/') object. Use it to change the FAB's [position](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig/position.md '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/#position'), [maximum number of actions](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig/maxSpeedDialActionCount.md '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/#maxSpeedDialActionCount'), icons in the [open](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig/icon.md '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/#icon') and [close](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig/closeIcon.md '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/#closeIcon') states, and other parameters.
7+
Define general FAB options in the [floatingActionButtonConfig](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/') object. Specify [position](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig/position.md '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/#position'), [max speed dial actions](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig/maxSpeedDialActionCount.md '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/#maxSpeedDialActionCount'), [icon](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig/icon.md '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/#icon'), [closeIcon](/api-reference/50%20Common/Object%20Structures/GlobalConfig/floatingActionButtonConfig/closeIcon.md '/Documentation/ApiReference/Common/Object_Structures/GlobalConfig/floatingActionButtonConfig/#closeIcon'), and other properties.
88

9-
Refer to the GitHub repository for the code that configures the example above and shows how to set the described properties.
9+
See the code example in the following GitHub repository:
1010

1111
#include btn-open-github with {
1212
href: "https://github.com/DevExpress-Examples/getting-started-with-floating-action-button-speed-dial/"

0 commit comments

Comments
 (0)