Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 8. Configuring a floating action button in Red Hat Developer Hub
You can use the floating action button plugin to configure any action as a floating button in the Developer Hub instance. The floating action button plugin is enabled by default. You can also configure floating action buttons to display as submenu options within the main floating action button by assigning the floating action buttons to the same slot
field of your dynamic-plugins.yaml
file.
8.1. Configuring a floating action button as a dynamic plugin Link kopierenLink in die Zwischenablage kopiert!
You can configure the floating action button as a dynamic plugin to perform actions or open an internal or external link.
Prerequisties
You must have sufficient permissions as a platform engineer.
Procedure
To configure a floating action button as a dynamic plugin, complete any of the following tasks:
Specify the
global.floatingactionbutton/config
mount point in yourapp-config-dynamic.yaml
file. For example:Example of a bulk-import plugin as a floating action button
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To configure an action as a floating action button that opens an external link, specify the
global.floatingactionbutton/config
mount point in yourdynamic-plugins.yaml
file within thebackstage-plugin-global-floating-action-button
plugin. For example:Example of a floating action button that opens GitHub
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To configure a floating action button that contains a submenu, define the
global.floatingactionbutton/config
mount point in the sameslot
field in yourdynamic-plugins.yaml
file for multiple actions. The default slot ispage-end
when not specified. For example:Example of a floating action button with submenu actions
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To configure a floating action button to display only on specific pages, configure the
global.floatingactionbutton/config
mount point in thebackstage-plugin-global-floating-action-button
plugin and set thevisibleOnPaths
property as shown in the following example:Example of a floating action button to display specific pages
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- (Required) The import name with an associated component to the mount point.
To hide a floating action button on specific pages, configure the
global.floatingactionbutton/config
mount point in thebackstage-plugin-global-floating-action-button
plugin and set theexcludeOnPaths
property as shown in the following example:Example of a floating action button to hide specific pages
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- (Required) The import name with an associated component to the mount point.
8.2. Floating action button parameters Link kopierenLink in die Zwischenablage kopiert!
Use the parameters as shown in the following table to configure your floating action button plugin.
Name | Description | Type | Default value | Required |
---|---|---|---|---|
|
Position of the floating action button. Valid values: |
|
| No |
| Name of the floating action button |
| Not applicable | Yes |
|
Icon of the floating action button. Recommended to use filled icons from the Material Design library. You can also use an svg icon. For example: |
| Not applicable | No |
| Display of the label next to your icon |
| Not applicable | No |
| Size of the floating action button |
|
| No |
| Color of the component. It supports both default and custom theme colors, that are added from the Palette Getting started guide. |
|
| No |
| Performed action when selecting a floating action button |
| Not applicable | No |
| Link that opens when selecting a floating action button |
| Not applicable | No |
| Text that appears when hovering over a floating action button |
| Not applicable | No |
| Order of the floating action buttons displayed in the submenu. A larger value means higher priority. |
| Not applicable | No |
| Display floating action button on the specified paths |
| Display floating action button on all paths | No |
| Hide floating action button on the specified paths |
| Display floating action button on all paths | No |
If multiple floating button actions are assigned to the same slot
value, the floating buttons are displayed as submenu options within the main floating action button.