Focusable

A focus ring clearly indicates which item has keyboard focus.

Installation

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

Focusable also supports all valid props as specified by the HTML element type in the as prop. The default is a button, so it would support all valid HTMLButtonElement props.

Props

as

Description

The DOM element to render as the Focusable element.

Default'button'
Type"symbol" | "object" | "text" | "article" | "dialog" | "figure" | "form" | "img" | "link" | "main" | "menu" | "menuitem" | "option" | "search" | "switch" | "table" | "label" | "style" | ... 157 more ... | "view"T

children

Description
No description.
Typestring | number | boolean | ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | React.ReactPortal

data-testid

Description

data-testid is strictly controlled through the testId prop. This lets consumers know that this data attribute will not be applied.

Typenever

isInset

Description

Controls whether the focus ring should be applied around or within the composed element.

Typeboolean

ref

Description

Forwarded ref.

TypeReact.Ref<HTMLObjectElement> | React.Ref<HTMLElement> | React.Ref<HTMLDialogElement> | React.Ref<HTMLFormElement> | ... 112 more ... | React.Ref<...>ComponentPropsWithRef<T>["ref"]

style

Description
No description.
TypeReact.CSSProperties

testId

Description

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

Typestring

xcss

Description

Apply a subset of permitted styles powered by Atlassian Design System design tokens.

Typefalse | (XCSSValue<"appearance" | "color" | "maxWidth" | "grid" | "borderColor" | "clipPath" | "filter" | "marker" | "mask" | "height" | "width" | "translate" | "content" | "border" | ... 487 more ... | "viewTimeline", DesignTokenStyles, ""> & ... 4 more ... & { ...; })
Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License