Updates the default layout for Payment ElementBreaking changes
What’s new
The default layout for the Payment Element now displays as an accordion
instead of as tabs
. We also updated the behavior of leaving the defaultCollapsed
value undefined, which now collapses when multiple payment methods are displayed.
Why is this a breaking change?
This breaking change affects you if your integration uses the default value, and was designed to rely on a tabs
layout instead of an accordion
layout. To migrate, either set the layout value to tabs
or change your design to match the accordion
layout.
If your defaultCollapsed
value is undefined and you want to restore the previous behavior, you can set the value to true.
Impact
Using an accordion
layout and collapsing multiple payment methods can help improve conversion rates for mobile users.