Link button
A button for navigation and URL changes.Props
Each button type also supports valid anchor <a> tag HTML attributes, except for:
disabled(useisDisabledinstead)stylerole
| Description | Additional information to be included in the |
|---|---|
| Type | { [x: string]: any; } |
| Description | The button style variation. |
|---|---|
| Type | "default" | "danger" | "primary" | "rovo" | "subtle" | "warning" | "discovery" |
| Description | Set the button to autofocus on mount. |
|---|---|
| Type | boolean |
| Description | Text content to be rendered in the button. |
|---|---|
| Type | string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
| Description | No description. |
|---|---|
| Type | never |
| Description | Provides a URL for link buttons. When using an AppProvider with a configured router link component, a |
|---|---|
| Type | string | RouterLinkConfig |
| Description | Places an icon within the button, after the button's text. |
|---|---|
| Type | React.ComponentClass<Omit<IconProps, "size"> | Omit<NewIconProps, "size" | "spacing">, any> | React.FunctionComponent<Omit<IconProps, "size"> | Omit<...>> |
| Description | Places an icon within the button, before the button's text. |
|---|---|
| Type | React.ComponentClass<Omit<IconProps, "size"> | Omit<NewIconProps, "size" | "spacing">, any> | React.FunctionComponent<Omit<IconProps, "size"> | Omit<...>> |
| Description | An optional name used to identify the button to interaction content listeners. By default, button fires React UFO (Unified Frontend Observability) press interactions for available listeners. This helps Atlassian measure performance and reliability. See the pressable or anchor primitive code examples for more information. |
|---|---|
| Type | string |
| Description | Disable the button to prevent user interaction. |
|---|---|
| Type | boolean |
| Description | Indicates that the button is selected. |
|---|---|
| Type | boolean |
| Description | Handler called on blur. |
|---|---|
| Type | (event: React.FocusEvent<HTMLAnchorElement, Element>) => void |
| Description | Handler called on click. You can use the second argument to fire Atlaskit analytics events on custom channels. They could then be routed to GASv3 analytics. See the pressable or anchor primitive code examples for information on firing Atlaskit analytics events or routing these to GASv3 analytics. |
|---|---|
| Type | (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent) => void |
| Description | Handler called on focus. |
|---|---|
| Type | (event: React.FocusEvent<HTMLAnchorElement, Element>) => void |
| Description | No description. |
|---|---|
| Type | ((instance: HTMLAnchorElement) => void) | React.RefObject<HTMLAnchorElement> |
| Description | Option to fit button width to its parent width. |
|---|---|
| Type | boolean |
| Description | Controls the amount of padding in the button. |
|---|---|
| Type | "compact" | "default" |
| Description | A unique string that appears as data attribute |
|---|---|
| Type | string |