Skip to main content

Customize Hosted Fields

You can fully control the appearance of input fields in the Hosted Fields Checkout using the stylesheet.overrides object when initializing your widget. This gives you the flexibility to match the style of your brand and user interface.

Example Integration

Here's how you can inject custom style variables into your widget configuration:

ui: {
stylesheet: {
overrides: {
'usp-input-text-color': '#000000',
'usp-input-border-color': '#ACACAC',
'usp-input-height': '2.6rem',
'usp-input-border-radius': '4px',
'usp-input-bg-color': '#FFFFFF'
}
}
}
Tip

You don't need to specify all variables. Just override the ones you want to change.

Available Input Style Variables

VariableDescriptionTypeExample
usp-input-widthSpecifies the width of the input fieldlength300px
usp-input-bg-colorBackground color of the input fieldcolor#FFFFFF
usp-input-border-colorBorder color of the input fieldcolor#ACACAC
usp-input-border-radiusBorder radius of the input fieldlength4px
usp-input-border-widthBorder width of the input fieldlength1px
usp-input-focused-border-colorBorder color when the field is focusedcolor#7A7A7A
usp-input-heightHeight of the input fieldlength2.6rem
usp-input-l-widthWidth of the large-sized inputlength500px
usp-input-m-widthWidth of the medium-sized inputlength290px
usp-input-s-widthWidth of the small-sized inputlength110px
usp-input-xs-widthWidth of the extra small-sized inputlength90px
usp-input-placeholder-colorPlaceholder text colorcolor#ACACAC
usp-input-text-colorText color of user inputcolor#000000