Skip to content

Web Components

Use these framework-agnostic custom elements to render Open Shop commerce UI on any site.

  • Attributes are listed in kebab-case exactly as used on each custom element.
  • If a component has no configurable attributes, the attributes table states None.

Open Shop web components do not use the Shadow DOM. Their internal markup is rendered into the regular light DOM of your page, which means:

  • Your site’s stylesheets apply to them — utility classes flow through normally.
  • You can override any internal style by writing CSS selectors that target the elements inside a component. No ::part(), no :host, no piercing tricks required.
  • The browser’s developer tools show the full component markup, so you can inspect any element and write a selector against it.

Write selectors scoped to the custom element tag so your overrides only affect Open Shop components:

/* Restyle the cart button */
os-cart-button button {
background: #111;
color: #fff;
border-radius: 9999px;
}
/* Restyle product cards inside the product list */
os-product-list .product-card {
border: 1px solid #e5e7eb;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

If a rule isn’t applying, check specificity first — Open Shop’s own styles are plain class selectors, so a slightly more specific selector (or one extra class) is usually enough. Avoid !important unless you’ve ruled out specificity as the cause.