Button
A button triggers an event or action. They let users know what will happen next.
Installation
yarn add @atlaskit/buttonUsage
Detailed docs and example usage can be found here.
A button triggers an event or action. They let users know what will happen next.
A button triggers an event or action. They let users know what will happen next.
yarn add @atlaskit/buttonDetailed docs and example usage can be found here.
ed8a227ecf6f5 -
Fixed loading buttons not being focusable51928601f0216 -
Updated border radius values behind a feature gate platform-dst-shape-theme-default.d14ea5f60b689 -
chore: migrate platform UI & component libraries icon imports from migration paths to core762b79e21f96a -
Migrated and cleaned up legacy iconography usage.b867e641d818d -
Updated border radius values behind a feature gate platform-dst-shape-theme-default.a60a82196851a -
Internal refactors to remove unused variables. No functional or public changes.1e31925550257 -
[ux] Updates button styles to reflect our new visual design language. These changes were
previously behind a feature flag and are now fully rolled out.2c386d1fc1477 -
ts-ignore added as a workaround for help-center local consumption3ea3fab89f015 -
IconButton now passes through the tooltip.shortcut prop to the Tooltip component.437668dfbdec9 -
Add explicit types to a number of DST components39e543109ec09 -
add type info to forwardRef components248faa32d4835 -
Internal changes to how borders are applied.f452c6c97d1d6 -
Internal change to remove gridSize reference.74c2f420ee49b -
Internal changes to how border radius is applied.23bcc5bbc9cee -
Internal changes to how border radius is applied.b3e26b962b5c7 -
We are testing internal changes for Button icon sizing behind a feature flag. If this change is
successful it will be available in a later release: To balance icon sizing, any chevron icons used
in button icon slots will now render as size="small" by default.6c62bb96f6bdf -
Updates to loading animation overlay not to overflow in scrollable containers.c65ad6bb7b13a -
Updates the visual appearance of disabled buttons with default and subtle appearances. This
change only affects buttons behind a feature flag for Atlassian's new design language, and will be
made available in a later release.1a88e6e2601ae -
Migrated usage of renamed/deprecated icons08019848e3eab -
Refreshed "issue" terminology.a149a0b1559ec -
We are testing the migration to the ADS Link component behind a feature flag. If this fix is
successful it will be available in a later release.f9ab0e846ae21 -
Updated to support size prop for new icons from @atlaskit/icon.718ee6f525ccc -
Fixed a bug in LinkButton, where the shouldFitContainer prop was unintentionally being passed to
the underlying anchor DOM element.9b46cc7f6df9d -
Allows role to be modified for new buttons.4bf38a93b38f3 -
Fix styling not being applied for LinkIconButtons with shape 'circle'.fdd33e36655ab -
Fixed a regression where Link Buttons with shouldFitContainer were not expanding to fill the
full width of their container.2954f5ca1bc29 -
Update dependencies.f3c903c332453 -
Remove unused xcss prop from LinkButton and LinkIconButton.#133342
569a36a196e14 -
Migrated from @emotion/react to @compiled/react in order to improve performance, align with
the rest of the Atlaskit techstack, and support React 18 Streaming SSR.Please note, in order to
use this version of @atlaskit/button, you will need to ensure that your bundler is configured to
handle .css imports correctly.
Most bundlers come with built-in support for .css imports, so you may not need to do anything.
If you are using a different bundler, please refer to the documentation for that bundler to
understand how to handle .css imports.
For more information on the migration,please refer to RFC-73 Migrating our components toCompiledCSS-in-JS
1378ea7a99ce1 -
Upgrades jscodeshift to handle generics properly.6a1bfec451e30 -
[ux] color and text-decoration style specificity have been increased to reduce the probability
of global <a> tag styles interfering with button styles.78292160a22d6 -
Updated styles for new button to use rem unit for width and height instead of em with
fractional units. This change is no longer behind a feature flag.#117363
10a0f7f6c2027 -
This package's peerDependencies have been adjusted for react and/or react-dom to reflect the
status of only supporting React 18 going forward. No explicit breaking change to React support has
been made in this release, but this is to signify going forward, breaking changes for React 16 or
React 17 may come via non-major semver releases.
Please refer this community post for more details: https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
6ac2c34162d59 -
Remove old codemods.9856bf5d3faeb -
Updated styles for new button to use rem unit for width and height instead of em with
fractional units.f13dc94ee78bb -
Remove codemod for deprecated exports and remove now unused dev dependencies.4660ec858a305 -
Update React from v16 to v18b5716d4ae35de -
Unsets internal SplitButton context to fix an edge-case where appearances of deeply nested
Button components were being overridden.9f62ecec4d422 -
Update dependencies.868078aed0479 -
Remove unused exports and update dev dependencies.520c68d91d401 -
Updated dividers in Visually refreshed split button to use color.bordercb318c8c28c26 -
Internal changes to typography.be58e4bb2e387 -
Migrating usages of UNSAFE types and entrypoints that have been renamed in @atlaskit/icon and
@atlaskit/icon-lab.962b5e77810fb -
Adds side-effect config to support Compiled css extraction in third-party apps8aebfeb14d89a -
[ux] Removed feature flag platform.design-system-team.button-tokenised-typography-styles
resulting in fully tokenised typography styles.c75edf6df890b -
Updated icon types usage since there are now NewCoreIconProps and NewUtilityIconProps.3c4de48168ffe -
Update the import path of useId* from @atlaskit/ds-lib8ae1e110621b7 -
Internal changes to feature flag used to toggle new icons2071254d3ad65 -
IconButton now passes through the tooltip ignoreTooltipPointerEvents override propdebc522e68817 -
Remove react-router-dom from devDependencies as it is incompatible with React 18.1e6883fdd5111 -
Change react-uid to use ID generator that is compatible with React16 and React 18; Strict React
18 behind a flag.1a59a1dc3f2f2 -
Correct hover states for old loading buttoneb643a54fc192 -
Removed link and subtle-link options in the appearance prop for the LinkButton. Removed
none option in the spacing prop for the new Buttons.#127511
db30e29344013 -
Widening range of react and react-dom peer dependencies from ^16.8.0 || ^17.0.0 || ~18.2.0
to the wider range of ^16.8.0 || ^17.0.0 || ^18.0.0` (where applicable).
This change has been done to enable usage of `react@18.3as well as to have a consistent peer
dependency range forreactandreact-domfor/platform` packages.
83919d6adb836 -
Remove unsafe spread on new buttons.#120669
9e1c531090ea4 -
Removed these deprecated props for overriding icon sizes:
UNSAFE_sizeUNSAFE_iconBefore_sizeUNSAFE_iconAfter_sizeSee the examples for overriding icon props for the new method of customizing icon sizes in buttons. To automate migration of these props, use the button codemod.
#121331
a8c984f9b3956 -
ButtonGroup's deprecated appearance prop has been removed. Apply the appearance prop on each
button instead.
Before:
<ButtonGroup appearance="primary">
<Button>First button</Button>
<Button>Second button</Button>
<Button>Third button</Button>
</ButtonGroup>After:
<ButtonGroup>
<Button appearance="primary">First button</Button>
<Button appearance="primary">Second button</Button>
<Button appearance="primary">Third button</Button>
</ButtonGroup>77504ff274f72 -
DSP-19576: Assign names to anonymous default exports0efaab9cca145 -
ButtonGroup's appearance prop has been deprecated and will be removed in a future release. Apply
the appearance prop on each button instead.743ff30e960c1 -
Remove unused prop isSelected from Split button.89ed46b28e349 -
[ux] Updates the old-button component behind a feature flag with new visual changes as per the
JIRA visual refresh project.6eabeed917202 -
Fix dividers being under selected button when the new visual appearance feature gate is enabled.aa0094627549a -
Removed feature flag for render prop fix introduced in 17.22.0.49ea6581aea88 -
The overlay prop has been removed in new buttons. It only existed in legacy buttons to support
loading spinners, which can be achieved in the new button using the isLoading prop.#112945
d7af9e23536c0 -
New button prevents unintended spread props being passed to children. The following props will now
be ignored:
Note: These props were already excluded via types. The API has not changed.
f2f51e7a24d00 -
Internal change only. Remove references to deprecated @atlaskit/theme constants and replace with
hard-coded values.5081c9ca53507 -
Correctly handle render props for icons in order to prevent unintentional renders.60baf23d5f27d -
Testing a new visual appearance behind a feature flag. If successful it'll be released at a later
date.f6f2f96728bc0 -
Marking the overlay prop on new Buttons as deprecated.223959ef57c80 -
Explicitly set jsxRuntime to classic via pragma comments in order to avoid issues where jsxRuntime
is implicitly set to automatic.#111486
f848f651ef678 -
Accessibility improvement
New buttons now adds ", Loading" to the accessible name of loading buttons regardless of how they
are labelled. This supports labelling by text content (children), aria-label, and
aria-labelledby.
The ", Loading" label was previously part of the loading spinner <svg>, which has been relocated
because this does not support aria-label or aria-labelledby. Any test locators for loading
buttons may need to be updated.
The most robust way to find loading buttons is by role and accessible name. This accounts for label precedence. For example:
screen.findByRole("button", {
name: /, Loading/,
});To validate a loading button that is already located, use toHaveAccessibleName():
render(<Button testId="foo" isLoading>My label</Button>);
const button = screen.getByTestId("foo");
expect(button).toHaveAccessibleName(`My label , Loading`);For locating loading spinners, a test ID has been added that is based on the button testId. For
example:
render(<Button isLoading testId="bar">My label</Button>);
const spinner = screen.getByTestId("bar--loading-spinner-wrapper");
expect(spinner).toBeInTheDocument();dc7e72da70ef7 -
Migrating instances of UNSAFE_ANCHOR primitive imports to the new safe import Anchor, in
preparation of Anchor open beta and removal of the unsafe export from @atlaskit/primitives53958b31d2e7 -
Legacy buttons are now marked with intent to deprecate in favor of new buttons36d7498311be -
We are testing an internal change to typography behind a feature flag. If this change is
successful it will be available in a later release.bd83d4aea949 -
Icon and link icon button types no longer support the isLoading prop. Internally isLoading was
already being ignored. This change only affects types.452b917ff365 -
Add support for React 18 in non-strict mode.99bd29123e13 -
Internal change to support experimental icon components35fd5ed8e1d7 -
Upgrading internal dependency bind-event-listener to @^3.0.00437b8b3c791 -
Updated imports of UNSAFE_PRESSABLE primitive to new Pressable exportf38506801b8f -
Added a purple discovery appearance to new Buttons to be used to communicate change or new
features.612718d81d68 -
Prevent new buttons from shrinking inside flex containers0af5682714ea -
Refactors internal styling logic of the new button to align to our upcoming styling standards.acbd9680ed68 -
Replaces internal ref merge with one from our util setaa76565f1f5b -
New buttons now accept render props for icon properties. This can be useful when setting props on
icons directly.3f4e688ce636 -
Tooltips are now included within icon buttons. They are disabled by default. To enable set
isTooltipDisabled to false.c1d62ce0679e - -
Fixed a bug in new loading buttons where the spinner color was incorrect in selected state.isLoading prop on new buttons was mistakenly added to unsupported link
buttons.cursor: progress), rather than a disabled
cursor (cursor: not-allowed).4bb74bb023d4 -
Added explicit text-decoration styles to new button focus states. This ensures button styles are
not interfered with by global styles.b779928f2d49 -
[ux] New buttons now have hovered and pressed interaction states when they are selected
(isSelected)9564de632638 -
Introduces isLoading prop to the new Button and IconButton components. When set to true a
traditional loading spinner will be shown.8d4e99057fe0 -
Upgrade Typescript from 4.9.5 to 5.4.2#73843
9a090e6e7733 -
The new icon button incorrectly supported spacing="none". This release removes support for this,
leaving "default" and "compact" as the only two options.
The icon button docs have also been updated to better reflect the intended use of the label prop
instead of aria-label. The label prop is designed to abstract the technical implementation for
accessibility requirements. The new icon button does not use the aria-label attribute under the
hood, rather it relys on visually hidden text instead. This is done for accessibility reasons as
aria-label is not always translated whereas visually hidden text will be.
cce378569da1 -
Migration documentation for changing from old to new button components. Documentation-only change.75b2ade8b254 -
New buttons no longer directly emit analytics tracking events to prevent duplicate events, as the
underlying primitive components already have tracking. Any analytics context set on new buttons
are retained through forwarding to the primitivesba18e89df3d9 -
Icon buttons no longer accept aria-label attributes to prevent possible duplicate labels being
applied (the dedicated label prop handles this)b037e5451037 -
Update new button text color fallback for default theme (non-token) to match that of old button
current text colore55d8295c1c1 -
Changes to add a page and more specific information in link button documentation.9e9847bebdbe -
Fix aria-disabled not being passed to custom theme buttond18ec4d7ce20 -
[ux] Tidy up of the platform.design-system-team.icon-button-spacing-fix_o1zc5 Platform Feature
Flag which applies a small adjustment to icon spacing for buttons using iconBefore and
iconAfter props. Small visual adjustment is to be expected — keep this in mind when reviewing
any VR tests breaking. The spacing around the icons will be reduced.6e9ab538f37b -
Export ButtonGroupProps typed8f830e29011 -
[ux] Assistive technologies now define ButtonGroup as a group. Additionally label and titleId
props introduced to label the current group.c6418d429d47 -
New Button goes open beta!Removed all UNSAFE_ exports and /unsafe entrypoint.
import { UNSAFE_BUTTON } from '@atlaskit/button' ❌
import Button from '@atlaskit/button/new' ✅
import { UNSAFE_BUTTON } from '@atlaskit/button/unsafe' ❌
import Button from '@atlaskit/button/new' ✅See new features for new exports and entrypoint ⤵
New Button goes open beta!
Check out the exports under @atlaskit/button/new and the docs for
our new approach.
import Button from '@atlaskit/button/new';
import { LinkButton } from '@atlaskit/button/new';import { IconButton } from '@atlaskit/button/new';
import { LinkIconButton } from '@atlaskit/button/new';import { SplitButton } from '@atlaskit/button/new';4c7dc39947e8 -
Add code docs for icon button and update types23a1d31d3c09 -
Add entrypoint for new button work heading to open beta at @atlaskit/button/new67c05dbef826 -
Exclude medium from UNSAFE_iconBefore_size and UNSAFE_iconAfter_size types.f12e489f23b0 -
Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).7be116fed51b -
Add support for shape to IconButtonb99d50f91202 -
Internal changes to styling on SplitButton (closed beta) to fix issues with border radius when
wrapper elements are used.d491c321ae12 -
Remove use of aria-busya3fc003a2d20 -
[ux] Fixes a bug in LinkIconButton (in closed beta) where the UNSAFE_size prop did not applydd91461d616d -
[ux] Fixes a bug in new Buttons (in closed beta) that affected text alignmentd100ca42f46 - Push
model consumption configuration done for these packageseba86990eef - Update
new Button (in closed beta) API for iconBefore and iconAfter to be bounded with unsafe
fallbacks for icon sizingd4c4a73a30a - [ux]
Updates supported SplitButton (closed beta) appearances to be 'default' or 'primary'. Makes
dividers full height to match existing uses outside of navigation contexts.09f29df6245 - Update
IconButton (in closed beta) API to be bounded with unsafe fallback for icon sizingdf138bd3900 - [ux]
Update to divider colors and height in SplitButton (alpha)8764ee956ae - [ux]
Remove appearance prop options link and subtle-link from the new Button (in Alpha). They are
now reserved for the new LinkButton component0fe0a5121a7 - Add
missing testId prop to <ButtonGroup> to enable testing9691abc55ce -
Restructure new Button (in Alpha) types for documentation purposesf858870ae90 - Added
new Button variants (in Alpha) unsafe exports to root entrypoint for documentation purposes48423992847 - Add new
Link Button variants to unsafe entrypoint for internal testing purposes.4c9d4a7be34 - - Link
button variants (still in Alpha) <LinkButton> and <LinkIconButton> now support router link
components through use of an app provider7c662f243b9 - Expose
more UNSAFE exports from UNSAFE entry point for internal work. PLEASE DO NO USE ANYTHING FROM
"UNSAFE" ENTRY POINT WITH "UNSAFE" PREFIX.22075b34cb8 - Removing
static styling violations6900f89eb0e - Internal
changes to use space tokens. There is no expected visual or behaviour change.8c6ebfca290 - Expose
temporary "unsafe" entry point for internal work. It will be removed soon. PLEASE DO NOT USE.f204e4e0e55 - Updated
dependenciesfd6bb9c9184 - Delete
version.json234448e5bb3 - [ux]
Updated inner space fix values to be -2px to cover up for 2px margins.696e8c196a3 - Update
our documentation of our CustomThemeButton export to note the impending deprecation that we have
planned.f4aff27416d - [ux] We
are testing icon button internal spacing fix behind a feature flag. Now the space between icons
and right or left edge of the button will be optically perceived as even. If this fix is
successful it will be available in a later release.54b69a2fc03 - Refactor
out rest props from button and make props more explicit.4b3cfb2276b - Refactor
button base to remove rest props and make props more explicit.11cd2f83450 - Refactor
loading button to use less rest props to pass props more explicitly.4ae083a7e66 - Use
@af/accessibility-testing for default jest-axe config and jest-axe import in accessibility
testing.ba43427b3e8 - Internal
changes to account for introduction of shape/radius tokens.5104149700b - Button
no longer unnecessarily sets tabindex as 0 for focus when using default <button> or <a>
elements, as they are already focusable. This is still set when using the component prop so
other elements can still be be focused. (This change is feature flagged)687e9b93266 - Updated
dependencies3a14ab26d19 - Updated
dependencies49b08bfdf5f - Migrated
use of gridSize to space tokens where possible. There is no expected visual or behaviour change.9d00501a414 - Ensure
legacy types are published for TS 4.5-4.896b5112590b - Updated
dependencies41fae2c6f68 - Upgrade
Typescript from 4.5.5 to 4.9.556507598609 - Skip
minor dependency bump23a850fe471 - Updated
dependencies3367210dce8 - [ux]
Internal change to the way focus is rendered for buttons. Focus states now apply a 2px offset to
the focus ring to aid the contrast of the focus state when applied on the 'primary' and 'selected'
buttons. As part of this change, and to settle on a more systemic approach to focus, button also
no longer applies a different colored shadow per appearance.729e45efa7f - [ux] Fix
a bug where the incorrect design tokens were used for the color of spinners in warning, disabled
and selected buttons18aeca8c199 - Internal
change to update token references. There is no expected behaviour or visual change.f96f3ebd861 - [ux] Use
color.background.neutral.subtle token to represent transparent background.71799e16ae6 -
Introduce InteractionContext to @atlaskit/button3c76f243e7f -
InteractionContext is nullable9f6369f5505 - Updates
@emotion/core to @emotion/react; v10 to v11. There is no expected behaviour change.bc989043572 - Internal
changes to apply spacing tokens. This should be a no-op change.1f4dba8f1a5 - [ux]
DSP-6696: prevent ButtonGroup items from being squished8cc2f888c83 - Upgrade
Typescript from 4.3.5 to 4.5.514d635468f6 - [ux]
DSP-6696: prevent empty ButtonGroup items from showing spacing by switching to flexbox gap8d4228767b0 - Upgrade
Typescript from 4.2.4 to 4.3.5.e09f1576233 - Internal
code change turning on new linting rules.65a90f6ba14 - Use
medium icons for button examples8a5bdb3c844 -
Upgrading internal dependency (bind-event-listener) for improved internal typescb2392f6d33 - Export
BaseProps type to prevent it being referenced via deep import path in d.ts filescb2392f6d33 - Upgrade
to TypeScript 4.2.462edf20ab1e - Migrates
all usage of brand tokens to either selected or information tokens. This change is purely for
semantic reasons, there are no visual or behavioural changes.dde969b6ef5 - Fix type
error with missing 'css' prop when importing Buttons directly from
"@atlaskit/button/standard-button"19d72473dfb -
Performance optimisations (reduce tree size and improve style building)19d72473dfb - Updates
usage of deprecated token names so they're aligned with the latest naming conventions. No UI or
visual changesf460cc7c411 - Builds
for this package now pass through a tokens babel plugin, removing runtime invocations of the
tokens() function and improving bundle size.c3b0a17a96c - Fix
spinner colours for disabled, warning and selected states when using tokense267e790d38 - [ux]
Colors are now sourced through tokens.2d7cc544696 - Updates
token usage to match the latest token set378d1cef00f - Bump
@atlaskit/theme to version ^11.3.0.d6f7ff383cf - Updates
to development dependency storybook-addon-performance49961803553 - Now
utlises the auto focus hook from ds-lib.79c23df6340 - Use
injected package name and version for analytics instead of version.json.d3265f19be - Transpile
packages using babel rather than tsc9f733e3f59 - Fixes
inlined inferred types in @atlaskit/button/loading-button - no material change#5860
d7540c04cd - Before
15.x it was possible for you to pass in data-testid and for that to be applied. In 15.x we
changed how props are spread so that is no longer possible. Please use the public API prop
testId to control data-testid
We have:
data-testid or data-has-overlay you will
get a type warningdata-testid to testId on any of our buttons
(CustomThemeButton, LoadingButton or StandardButton)You first need to have the latest button installed before you can run the codemod
yarn upgrade @atlaskit/button@^15.1.1Then you can use our cli tool to run the codemod
npx @atlaskit/codemod-cli /path/to/target/directory --parser [tsx | flow | babel]5f58283e1f - Export
types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules
compiler option. This requires version 3.8 of Typescript, read more about how we handle Typescript
versions here: https://atlaskit.atlassian.com/get-started Also add typescript to
devDependencies to denote version that the package was built with.1944b0b626 - Export
BaseOwnProps type to prevent it being referenced via deep import path in declaration files of
dependendentsf75fedbf16 - In this
version we made button dramatically faster and lighter and improved buttons internal spacing 🤩There are now 3 button variants. We highly recommend you only install button through entry points to ensure minimum kbs. Our codemod will automatically shift you over to the entry point format
// button variants
import Button from '@atlaskit/button/standard-button';
import LoadingButton from '@atlaskit/button/loading-button';
import CustomThemeButton from '@atlaskit/button/custom-theme-button';
// other entry points
import ButtonGroup from '@atlaskit/button/button-group';
import { CustomThemeButtonProps } from '@atlaskit/button/types';We have made some intentional changes to button spacing:
8px → 4px). This makes a buttons
text and icon feel more connected36px x 32px → 32px x
32px)<Button/> as we know and love it today, has been split into three variants so that consumers only
pay for the features that they use
Standard button (<Button/>): The standard button that is as fast as possible which is for
most usages
✅ Supports the existing (discouraged) GlobalTheme dark mode pattern
Loading button (<LoadingButton/>): A small wrapper around <Button/> that allows you to
show a @atlaskit/spinner as an overlay on the button when you set an isLoading prop to true
✅ Supports the existing (discouraged) GlobalTheme dark mode pattern
Custom theme button (<CustomThemeButton/>): This is a 1:1 of what <Button/> was
previously
✅ Supports the same isLoading behavior as <LoadingButton/>
GlobalTheme dark mode patternAll of the variants are all available through separate entry points to ensure minimum bundle size
import Button from '@atlaskit/button/standard-button';
import LoadingButton from '@atlaskit/button/loading-button';
import CustomThemeButton from '@atlaskit/button/custom-theme-button';You can also import them all from the root entry point if you like! Heads up though, if your bundler does not support tree shaking then you will not get the minimum possible bundle size
Previously the default export of the button package was a button that supported theme
import Button from '@atlaskit/button';Now the default export is our 'standard button' which does not support the theme prop.
Don't worry if you do use the theming API – our codemods will help move your usages to the correct version.
// before codemod
import Button from '@atlaskit/button';
// after codemod
import Button from '@atlaskit/button/custom-theme-button';Previously disabled buttons had fairly simple behaviour. They would call event.stopPropagation()
on an inner element in the bubble phase. This would prevent onClick handlers from being called,
but not other event types.
We have invested a lot of effort to make a more robust disabled button experience regardless of element type.
A disabled <button> is a native HTML concept, but disabled is not a native concept for other
element types such as <a> and <span>.
The behavior of a disabled <button> is imitated as much as possible regardless of element type.
A disabled <button> will not fire any user events. We imitate this by:
pointer-events: none to all children elements of the button element. This prevents
inner elements publishing events.event.preventDefault() and event.stopPropagation() in the
capture phase for the following events:
'mousedown','mouseup', 'keydown', 'keyup', 'touchstart', 'touchend', 'pointerdown', 'pointerup', and
'click'. This prevents the event performing its default browser behavior and stops the event
from proceeding to the bubble phase.For a disabled button we also set tabIndex={-1}, and if the element has focus, we call
element.blur().
overlay (Standard button only)The overlay prop allows you to render a React.ReactNode over the top of the content inside of a
button. This prop is only available for the standard button. LoadingButton and CustomThemeButton
use the overlay prop for displaying a @atlaskit/spinner as needed.
When an overlay is being used (such as for a @atlaskit/spinner for LoadingButton), then these
changes are applied:
:active and :hover styles (otherwise keeps the same visual and cursor experience as
if it did not have an overlay)Previously, when an overlay was used, the button simply applied pointer-events: none to the button
content. This approach had a number of shortcomings.
font-family: inherit style rule. Recently, Chrome decided to add font-family: arial to
the default <button> style rules. We fixed this issue by releasing a patch version of
@atlaskit/css-reset. We have now added the fix into this package as wellButtonAppearance type to Appearance (the codemod will safely upgrade usages)83e32fa998 - Now uses
useAnalyticsEventHandler in @atlaskit/analytics-next rather than its own version of the hooke45be534ce - [ux]
Unwinding anchor style change in AltaskitThemeProvider. Restoring color: !important to button to
deal with specificity wars6ea0de1281 - [ux] Not
allowing anchors to have :visited styles. This restores previous behaviour642a8a7735 - [ux]
AtlaskitThemeProvider (deprecated) applies a colour reset to anchor tags. This was impacting the
colouring of @atlaskit/button. To go around specificity issues caused by AtlaskitThemeProvider
in the past @atlaskit/button would apply a !important to it's color values. We have changed
AtlaskitThemeProvider so that it will no longer impact the color values of @atlaskit/button6360c46009 - Reenable
integration tests for Edge browser#3885
6c525a8229 - Upgraded
to TypeScript 3.9.6 and tslib to 2.0.0
Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade to prevent duplicates of tslib being bundled.
e99262c6f0 - All form
elements now have a default font explicitly set954cc87b62 - The readme
and package information has been updated to point to the new design system website.87f4720f27 - Officially
dropping IE11 support, from this version onwards there are no warranties of the package working in
IE11. For more information see:
https://community.developer.atlassian.com/t/atlaskit-to-drop-support-for-internet-explorer-11-from-1st-july-2020/3953454a9514fcf - Build and
supporting files will no longer be published to npmafc842d132 - FIX: Buton
text font-weight changed from normal to medium as per ADG spec98f462e2aa - Bumping
use the latest version of @atlaskit/spinner[patch]6b8e60827e:
Change imports to comply with Atlassian conventions- [patch]57c0487a02:
FIX: Button focus ring color changed to B100- Updated dependencies 449ef134b3:
Updated dependencies f6667f2909:
[patch]109004a98e:
Deletes internal package @atlaskit/type-helpers and removes all usages. @atlaskit/type-helpers has been superseded by native typescript helper utilities.- Updated dependencies 168b5f90e5:
Updated dependencies 0c270847cb:
[patch]6548261c9a:
Remove namespace imports from React, ReactDom, and PropTypes- Updated dependencies 6548261c9a:
[patch]4a223473c5:
Removes babel/runtime from dependencies. Users should see a smaller bundlesize as a result- Updated dependencies 28f8f0e089:
Updated dependencies 82747f2922:
[patch]30acc30979:
@atlaskit/select has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No API or behavioural changes.
[patch]35d2229b2a:
Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.
[patch]a2d0043716:
Updated version of analytics-next to fix potential incompatibilities with TS 3.6
[minor]66e147e6a1:
Adding an optional prop testId that will set the attribute value data-testid. It will help
products to write better integration and end to end tests.
[minor]93022be303:
Align button and subtle button text colour with ADG guidelines (improved contrast)
[patch]67a3a1ee02:
Converts prop types to interfaces
[patch]097b696613:
Components now depend on TS 3.6 internally, in order to fix an issue with TS resolving non-relative imports as relative imports
[patch]ecca4d1dbb:
Upgraded Typescript to 3.3.x
[patch]abee1a5f4f:
Bumping internal dependency (memoize-one) to latest version (5.1.0). memoize-one@5.1.0 has full typescript support so it is recommended that typescript consumers use it also.
[patch]de35ce8c67:
Updates component maintainers
[patch]926b43142b:
Analytics-next has been converted to Typescript. Typescript consumers will now get static type safety. Flow types are no longer provided. No behavioural changes.
Breaking changes
withAnalyticsForSumTypeProps alias has been removed, please use withAnalyticsEventsAnalyticsContextWrappedComp alias has been removed, please use withAnalyticsContextBreaking changes to TypeScript annotations
withAnalyticsEvents now infers proptypes automatically, consumers no longer need to provide
props as a generic type.withAnalyticsContext now infers proptypes automatically, consumers no longer need to provide
props as a generic type.WithAnalyticsEventProps has been renamed to WithAnalyticsEventsProps to match source
codeCreateUIAnalyticsEventSignature has been renamed to CreateUIAnalyticsEvent to match
source codeUIAnalyticsEventHandlerSignature has been renamed to UIAnalyticsEventHandler to match
source codeAnalyticsEventsPayload has been renamed to AnalyticsEventPayloadObjectType has been removed, please use Record<string, any> or [key: string]: anyUIAnalyticsEventInterface has been removed, please use UIAnalyticsEventAnalyticsEventInterface has been removed, please use AnalyticsEventCreateAndFireEventFunction removed and should now be inferred by TypeScriptAnalyticsEventUpdater removed and should now be inferred by TypeScript[patch]688f2957ca:
Fixes various TypeScript errors which were previously failing silently
[minor]8fcbe23ec6:
Updated types for analytics-next and buttons to make them easier to consume
[patch]9f8ab1084b:
Consume analytics-next ts type definitions as an ambient declaration.
[patch]bbff8a7d87:
Fixes bug, missing version.json file
[patch]18dfac7332:
In this PR, we are:
[patch]d0db01b410:
TypeScript users of withAnalyticsEvents and withAnalyticsContext are now required to provide props as a generic type. This is so that TypeScript can correctly calculate the props and defaultProps of the returned component.
Before:
withAnalyticsEvents()(Button) as ComponentClass<Props>;After:
withAnalyticsEvents<Props>()(Button);[patch]29a1f158c1:
Use default react import in typescript files.
[patch]aaf9d37b31:
Move @types/react-router-dom to devDependencies
[major]1e826b2966:
Highlights
Breaking Changes:
See the upgrade guide for more details
import '@atlaskit/button/dist/es5/components/ButtonGroup'[major]6998f11:
import '@atlaskit/button/dist/cjs/components/ButtonGroup'; would need to be updated
to import '@atlaskit/button/dist/es5/components/ButtonGroup'Updated dependencies bfac186:
[patch] Fix flow types da63331
[none] Updated dependencies da63331
autoFocus to button, allowing button to be automatically focused on first render.
bf36eb6