Upgrade Stripe's UI extension SDK
Upgrade your app to the latest version of @stripe/ui-extension-sdk.
This page provides a comprehensive guide to help you navigate the breaking changes introduced in each major version of the @stripe/ui-extension-sdk and outlines the necessary changes to upgrade your application.
We recommend upgrading the Stripe Apps CLI plugin by running stripe plugin upgrade apps before updating the @stripe/ui-extension-sdk version. This ensures optimal compatibility, incorporation of the latest features, and security fixes.
@stripe/ui-extension-sdk v9 
What’s new in v9
Version 9 of @stripe/ui-extension-sdk introduces property validation for all of its components. This version is more secure, mitigates bugs, and promotes adherence to coding best practices. After you install it, pay attention to TypeScript errors arising from invalid property values, as they could throw validation errors causing the application to crash.
Component changes
We made visual updates to several components. After you install the latest version, review your app to make sure that the components appear as they should.
| Component | Breaking changes |
|---|---|
| Button |
|
| DateField |
|
| FormFieldGroup |
|
| Link |
|
| Tab |
|
| TabPanel |
|
| TextArea |
|
| TextField |
|
Changelog
9.1.0
- Add support for the
linktable cell type within theDetailPageModulecomponent. - Add
DetailPageTableandDetailPagePropertyListcomponents.
9.0.0
- Add
useStoragehook. - Add
isSandboxto userContext. - Add
OnboardingViewcomponent. - Add
PropertyListandPropertyListItemcomponents. - Add
TaskListandTaskListItemcomponents. - Add
PlatformConfigurationViewcomponent to enable setup for embedded apps. - Add runtime component prop validation to enforce type safe properties.
- Add
pendingprop toButtoncomponent. - Add more format options to
BarChartandLineChartcomponents:- Add format style
decimal. - Add
niceoption to have more pleasing axis limits. - Add
ticksto specify the number of markets along an axis. - Add
tickFormatto modify the display of the tick labels. - Add
zeroto control the visibility of the zero value. - Add
fractionalDigitsoption to currency formats to control the precision of numeric values.
- Add format style
- Remove deprecated
tabKeyprop fromTabandTabPanelcomponents. Use theidprop instead. - Remove deprecated
backgroundproperty onBoxandInlinecomponents’cssprop. Use thebackgroundColorproperty instead. - Remove deprecated
classNameprop fromButtonandLinkcomponents. - Remove deprecated
invalidprop fromFormFieldGroupcomponent. - Remove deprecated
layoutproperty onBoxandInlinecomponents’cssprop. Use thestackproperty instead. - Remove deprecated
onCloseprop fromFocusViewcomponent. Use thesetShownprop instead. - Remove deprecated
onKeyPressprop fromTextAreaandTextFieldcomponents. - The
onChangeprop in theDateFieldcomponent now directly receives the value instead of the change event. - The
layoutprop values in theFormFieldGroupcomponent have changed fromrowandcolumntohorizontalandvertical.
8.11.0
- Add
org_to userContext.id
8.10.0
- Add
isSandboxto userContext.
8.9.3
- Fix the type definition for
SignInView’sonPresscallback argument to match its actual runtime value. - Upgrade
@remote-uidependencies.
8.9.2
- Fix
minTileWidthprop types to accept only compatible values. - Remove
React.type from theRefObject Tooltipcomponent’striggerprop, as it is not supported at runtime. - Add
idprop toTabandTabPanelcomponents to replacetabKey. - Remove deprecation notice from border color properties (
borderColor,borderBottomColor,borderLeftColor,borderRightColor,borderTopColor) in thecssprop ofBoxandInlinecomponents. - Add border style and width properties (
borderStyle,borderWidth,borderBottomStyle,borderBottomWidth,borderLeftStyle,borderLeftWidth,borderRightStyle,borderRightWidth,borderTopStyle,borderTopWidth) to thecssprop ofBoxandInlinecomponents. - Add literal types to the
nameprop on theIconcomponent.
8.9.1
- Use fixed dependency versions.
- Fix test wrapper find methods.
8.9.0
- Add
valueprop toDateFieldcomponent. - Add deprecation notice to the
backgroundproperty onBoxandInlinecomponents’cssprop. Use thebackgroundColorproperty instead. - Add deprecation notice to the
classNameprop onButtonandLinkcomponents. - Add deprecation notice to the
invalidprop onFormFieldGroupcomponent. - Add deprecation notice to the
layoutproperty onBoxandInlinecomponents’cssprop. Use thestackproperty instead. - Add deprecation notice to the
tabKeyprop onTabandTabPanelcomponents. - Add deprecation notice to the border color properties (
borderColor,borderTopColor,borderRightColor,borderBottomColor,borderLeftColor) onBoxandInlinecomponents’cssprop. Use thekeylineproperty for border styling instead. - Remove deprecation notice from
valueandcheckedprops.
8.8.0
- Add
StripeFileUploadercomponent. - Add
platformprop to environment context. - Add
appContextto theExtensionContextValuetype. - Add types for
AuthorizedPermissionandAuthorizedContentSecurityPolicy. - Add some utility functions for interacting with
appContext:getUserAuthorizedPermissions: Gets the intersection of the app’s authorized permissions and those of the current Dashboard user.isPermissionAuthorized: Indicates if a permission is in the app’s authorized permissions.isSourceInAuthorizedCSP: Indicates if a URL is in the app’s authorized connect or image sources.
8.7.0
- Add
rolesto the account passed to extensions in theuserContextproperty.
8.6.0
- Add
secondaryActionprop toSignInView. - Add
targettoSignInViewaction props. - Allow both
hrefandonPressonSignInViewaction props.
8.5.0
- Add
constantsprop to environment context.
8.4.1
- Add
SignInViewcomponent.
8.3.0
- Remove unsupported
contentUsesproperty fromTableCellandTableHeaderCelltyping. - Updated
useToastto returnshowanddismissutility methods.
8.2.0
StripeAppsHttpResponse.now returns a rejected promise if the HTTP response body was empty.prototype. toJSON() - Add support for calling
fetchStripeSignaturewith nested JSON. - Fix
debugto filter props according toalloption. - Add
tabKeytoTabandTabPanel. - Upgrade
stripepackage dependency to^9..11. 0 - Add
externaltoLink. - Add
setShownprop toFocusView. - Add
showToastutility function for rendering toast notifications at the bottom of an app’s view.
8.1.0
- Fix
ExtensionContextValuetyping to marknameandobjectContextvalues as possiblynull. - Add
textAligntoBoxcss. - Make
onSaveprop optional forSettingsViewcomponents. - Upgrade to
@remote-ui/react4.5.2. - Add
Sparklinecomponent.
8.0.0
- Add deprecation notice to the
valueprop onTextArea,TextField, andSelectcomponents. - Add deprecation notice to the
checkedprop onCheckbox,Radio, andSwitchcomponents. - Remove unsupported
outerRefprops from inputs.
7.1.0
- Add
brandIconandbrandColortoContextView.
7.0.0
- Deprecate
Noticecomponent; useBannerinstead. - Add
overflowXandoverflowYtoBoxcss.
6.3.1
- Internal update, no user-facing changes.
6.3.0
- Add
Bannercomponent. - Add deprecation warning for
Noticecomponent. - Add
localetoExtensionContextValue['oauthContext']. - Add
overflowWrapandwordBreaktoBoxcssproperties. - Add
textTransformtoBoxandInlinecssproperties. - Add
primaryAction,secondaryAction, andfooterContentproperties toContextView. - Add
whiteSpacetoBoxcssproperties.
6.2.0
BarChartandLineChartimprovements:- Configurable axis formatting.
- Configurable value formatting.
- Configurable channel domains.
- Configurable channel ranges.
- Show/hide axis labels and ticks in charts.
- Show/hide grid lines in charts.
- Show/hide tooltips in chart presets.
- Show/hide legends in chart presets.
6.1.0
- Add a confirmation dialog to
FocusView. - Add
ChipandChipListcomponents. - Update the
getDashboardUserEmailutility to return the email directly and reject the promise if there’s an error. - Fix React components not being accepted in the
labelprop of form elements. - Expose
text-overflow: ellipsisandword-wrap: normal | break-wordonBoxcss. - Add
countryto the account passed to extensions in theuserContextproperty. - Add
data:URL support for theImgcomponent. Learn more about theImgcomponent.
6.0.0
- Deprecate email in view context.
- Consolidated utilities in
/utilspath. - Fixed react-reconciler dependency issue affecting unit tests.
5.0.1
- Fix prop types for
Switch,CheckboxandRadio.
5.0.0
- Adds the
Accordion,Icon,Spinner, andTooltipcomponents. - Adds tooltips to
BarChartandLineChart. - Fix prop typing for
BarChartandLineChart. - Deprecates legacy view context parameters.
- Enables setting width through
css={{ width: .on. }} Select,TextArea,TextField,Button, andLink. - Enables setting internal horizontal alignment through
css={{ alignX: .on. }} ButtonandLink. - Adds the
clipboardWriteTextfunction. - Adds the
getDashboardUserEmailfunction.
4.0.0
- Deprecates the
slotproperty.
3.2.0
- Adds the
createOAuthStatefunction. - Adds
oauthContextto theExtensionContextValuetype.
3.1.0
- Adds the
Imgcomponent.
3.0.0
- Adds support for the
Notice,Charts, andTabscomponents. - Breaking changes:
ListItem: Previously, content passed as children would be the primary content rendered in the component. Now, main content is passed to thetitleprop. Thedescriptionslot has also been reassigned to asecondaryTitleprop.MenuTrigger: This component has been deprecated in favor of atriggerprop on theMenucomponent. Slot API usage has also been removed.
- Removed permissions from being passed into the user context.
2.2.1
- Expose
docs.files injson dist.
2.2.0
- Add
actionsprop toContextView.
2.1.0
- Introduces
ButtonGroupcomponent. - Removes
margin-bottomfrom form controls. - Gives Button
white-space: nowrapandalignY: centerby default. - Button themes now set a
min-heighton all size variants. - Makes
LinkandButtonshrink to fit their content. - Exposes
defaultValueattribute onTextFieldandTextArea. - Allows
erroranddescriptionto be hidden on form controls through thehiddenElementsprop. - Exposes
invalidandsizeprops onSelectandTextArea. - Exposes
defaultCheckedattribute onRadio. - Exposes
resizeableandrowsprops onTextArea. - Fixes invalid state on control components.
- Fixes
ChiponDropdownfiring twice. - Fixes
Dividerrendering.
2.0.3
- Returns a promise from
useRefreshDashboardDatathat resolves after dashboard data is refreshed. - Adds
fetchStripeSignaturemethod that optionally accepts additional request payload. Signature can be used to make authenticated request to your app’s backend. - Fixes an issue where the test element check method
.would sometimes fail to identify a component.is
2.0.2
- Fixes an issue with the
testingpackage in which comopnents with fragment props were not findable usingwrapper..find()
2.0.1
2.0.0
- Fixes a render error with
SettingsView. - Updates
SettingsViewtypes to match the available component props. - Adds a
getMockContextPropshelper for testing. Learn more about context props. - List component now accepts
React.as a valid type to theReactNode valueprop, rather than just astring. - Adds hover state to ListItem components.
- Updates ListItem component such that hover state is only visible when there is an action associated.
- Fix Select rendering when multiple is true.
- Fix Checkbox onChange firing twice.
1.1.7
- Adds a “testing” module, which includes helpers for writing Jest tests for apps. Learn more about UI testing.
- Fixes some components that take React nodes as props:
MenuGroupnow supports thetitleprop.FocusViewnow supports thefooterContentprop.SettingsViewnow supports theheaderActionsprop.
- Some type fixes and grammar updates.
1.1.6
- Added types for
FocusView,SettingsView, andContextView. - Exporting a new constant
STRIPE_from http_client to be used when initializing the Stripe API client.API_ KEY