Skip to main content

Custom HTML and CSS in the cart

Inject custom HTML and CSS for advanced cart customization.

A
Written by Aditya Singh

Advanced β€” for merchants comfortable with HTML and CSS.

Two slots

Custom HTML

Injected into a defined region of the drawer (above items, below items, etc.). Use for custom callouts, embeds, or merch-specific copy.

Custom CSS

Scoped to .ia-cart-root. Use specific selectors so you don't break the editor preview.

Best practices

  • Test in preview before publishing β€” broken CSS can hide the entire drawer.

  • Use specific class selectors, not generic tags. .ia-cart-root .my-banner is safer than div.

  • Avoid !important unless you really need to override a base style.

  • Don't inject scripts that fetch external resources synchronously β€” it slows the drawer.

When to ask for help

If your custom CSS works in preview but not on the live storefront, the issue is usually theme CSS specificity. Reach out to support with a screenshot and your snippet.

Did this answer your question?