IntentButton
The IntentButton is a dedicated button component for sending
intents. It takes care of
opening the intent dialog. An IntentButton only works in the AppShell context.
IntentButton is available and recommended forall new implementations. It aligns with the latest Dynatrace Platform intent model and is available in the @dynatrace/strato-components-preview package. Explore the new IntentButton. This legacy version remains stable but won't be enhanced. :::
Import
import { IntentButton } from '@dynatrace/strato-components/buttons';
Use cases
Send an intent
Use the payload prop to assign an intent payload object to the button.
Add label
IntentButtons can consist of a label and a suffix icon. Only use the
aria-label if the button has no readable content, like when it only has an
icon. In that case, the aria-label needs to be used to make the item
accessible.
Recommend app
Providing an existent appId and intentId allows you to bypass the "Open
with" dialog and open the app directly. If you provide a non-existent appId,
the app shell will open the "Open with" dialog, allowing users to select a
different app.