Skip to main content

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.

Import

import { IntentButton } from '@dynatrace/strato-components-preview/buttons';

Use cases

CodeSandbox

Send an intent

Use the payload prop to assign an intent payload object to the button.

CodeSandbox

Icon only

Use the iconOnly prop to create an icon-only representation of the IntentButton.

CodeSandbox

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.

CodeSandbox

Props

IntentButtonProps

Signature:

export declare type IntentButtonProps = & ;

ButtonOwnProps

extends, , , ,
NameTypeDefaultDescription
disabled?
falseIf a button is disabled e.g. it cannot be interacted with.
variant?
'default'Different variants have different styles.
type?
'button'The HTML button type.
onClick?
-Called when the button is interacted with.
width?
| ..< & {}>
'content'The width of the button.
color?
'neutral'The color of the button. This should be chosen based on the context the button is used in.
textAlign?
'center'Controls the text alignment inside the button. Only affects the button if the width is not set to 'content'.
size?
'default'The size of the button.
loading?
falseThe current loading state of the button. If true, a loading icon is shown and the button is disabled.
Still have questions?
Find answers in the Dynatrace Community