Pressable
A pressable is a primitive for building custom buttons.Installation
| Install | yarn add @atlaskit/primitives |
|---|---|
| Source | Bitbucket.org, (opens new window) |
| npm | @atlaskit/primitives, (opens new window) |
| Bundle | unpkg.com, (opens new window) |
Props
Pressable also supports all valid HTMLButtonElement props, except for disabled which is replaced
by the isDisabled prop.
| Description | Additional information to be included in the |
|---|---|
| Type | { [x: string]: any; } |
| Description | An optional component name used to identify this component in Atlaskit analytics events. This can be used if a parent component's name is preferred over the default 'Pressable'. |
|---|---|
| Type | string |
| Description |
|
|---|---|
| Type | never |
| Description | An optional name used to identify events for React UFO (Unified Frontend Observability) press interactions. For more information, see React UFO integration into Design System components. |
|---|---|
| Type | string |
| Description | Whether the button is disabled. |
|---|---|
| Type | boolean |
| Description | Handler called on click. The second argument provides an Atlaskit UI analytics event that can be fired to a listening channel. See the 'analytics-next' package documentation for more information. |
|---|---|
| Type | (e: MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, analyticsEvent: UIAnalyticsEvent) => void |
| Description | Allows getting a ref to the component instance.
Once the component unmounts, React will set @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
|---|---|
| Type | string | Ref<HTMLButtonElement> |
| Description | No description. |
|---|---|
| Type | CSSProperties |
| Description | A unique string that appears as data attribute |
|---|---|
| Type | string |
| Description | Apply a subset of permitted styles powered by Atlassian Design System design tokens. |
|---|---|
| Type | false | (XCSSValue<"appearance" | "color" | "maxWidth" | "grid" | "borderColor" | "clipPath" | "filter" | "marker" | "mask" | "height" | "width" | "translate" | "content" | "border" | ... 487 more ... | "viewTimeline", DesignTokenStyles, ""> & ... 4 more ... & { ...; }) |