Section message

A section message is used to alert users to a particular section of the screen.

Installation

Package installation information
Installyarn add @atlaskit/section-message
SourceBitbucket.org, (opens new window)
npm@atlaskit/section-message, (opens new window)
Bundleunpkg.com, (opens new window)

SectionMessage props

Props

actions

Description

Actions for the user to take after reading the section message. Accepts a ReactElement or an array of one or more SectionMessageAction React elements, which are applied as link buttons. Middle dots are automatically added between multiple link buttons, so no elements should be present between multiple actions.

In general, avoid using more than two actions.

TypeReactElement<any, string | JSXElementConstructor<any>> | ReactElement<SectionMessageActionProps, string | JSXElementConstructor<...>>[]

appearance

Description

The appearance styling to use for the section message.

Type"information" | "warning" | "error" | "success" | "discovery"

children

Required
Description

The main content of the section message. This accepts a react node, although we recommend that this should be a paragraph.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

headingLevel

Description

Allows the section message's title to be rendered as the specified HTML heading element. The default heading element is h2.

Allows the section message's title to be rendered as the specified HTML heading element. The default heading element is h2.

Type"h1" | "h2" | "h3" | "h4" | "h5" | "h6"

icon

Description

An Icon component to be rendered instead of the default icon for the component. This should only be an @atlaskit/icon icon. You can check out this example to see how to provide this icon.

Type"symbol" | "object" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "title" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "big" | "blockquote" | ... 156 more ... | ComponentType<...>

isDismissible

Description

Displays a dismiss button, that allows the user to dismiss the message. It will be removed from the DOM immediately and will not be re-rendered. It does not handle persistence of the dismissed state across page reloads or remounts.

Typeboolean

onDismiss

Description

A callback function that is called when the user dismisses the message.

Type() => void

ref

Description

Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref).

@see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}

Typestring | Ref<HTMLElement>

testId

Description

A testId prop is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring

title

Description

The heading of the section message.

The heading of the section message.

Typestring

SectionMessageAction props

children

Required
Description

The text that needs to be displayed for section message action.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

href

Description

The URL that the rendered link button will point to.

Typestring

linkComponent

Description

A custom link component. This prop is designed to allow a custom link component to be passed to the rendered link button. The intended use-case is for when a custom router component such as react router is being used within the application.

This component will only be used if a href prop is passed.

TypeComponentClass<any, any> | FunctionComponent<any>

onClick

Description

Click handler which will be attached to the rendered link button. The second argument can be used to track analytics data. See the tutorial in the analytics-next package for details.

Type(e: MouseEvent<HTMLElement, globalThis.MouseEvent>, analyticsEvent: UIAnalyticsEvent) => void

ref

Description
No description.
Type((instance: HTMLElement) => void) | RefObject<HTMLElement>

target

Description

The target attribute of the link. This is only used if the href prop is passed.

Typestring

testId

Description

A testId prop is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests.

Typestring
Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License