Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

The Element Container


Style the Element container Style the container you mount an Element to as if it were an `

on your page. For example, to controlpaddingandborderon anElement, set these properties on the container. This is usually done by re-using the classes that you have applied to your DOM

elements. After theElementis mounted, the.StripeElementclass is added to the container. Additionally, the following classes are automatically added to the container when theElementis complete, empty, focused, invalid, or autofilled by the browser: *.StripeElement--complete*.StripeElement--empty*.StripeElement--focus*.StripeElement--invalid*.StripeElement--webkit-autofill(Chrome and Safari only) These class names can be customized using theclasses` option when you create an Element.

Last verified 2026-09-24

Is this helpful?