Web components overview

Every salla-* web component the storefront can use, with its properties, events, methods and slots.

Salla ships its storefront widgets as web components (<salla-*> tags) in @salla.sa/twilight-components. A theme can use them from React. Each page lists what the component accepts, so an assistant (or you) does not need to guess attributes.

The same data is published with the package as @salla.sa/twilight-components/docs.json.

Which one do I use?

Choose the first that exists:

  1. A native engine component, such as Link, ProductCard or Breadcrumb.
  2. A native React version from @salla.sa/twilight-components-react: SallaButton, SallaProductsList, SallaProductsSlider, SallaSlider (marked native below).
  3. A React wrapper of the web component: import { SallaX } from '@salla.sa/twilight-components-react/x' (marked wrapper). The subpath is the tag without salla-.
  4. The raw tag <salla-x>, only when no wrapper exists.

In a wrapper, set props by their Property name (camelCase). In a raw tag, use the Attribute name (kebab-case). Complex values (objects, arrays) are passed as props, not attributes.

All components

Interface

TagPropertiesEventsMethodsIn React
<salla-accordion>400wrapper
<salla-alert>300wrapper
<salla-badge>300wrapper
<salla-bottom-alert>500wrapper
<salla-breadcrumb>000native
<salla-button>1105native
<salla-count-down>1901wrapper
<salla-drawer>1115wrapper
<salla-infinite-scroll>500wrapper
<salla-list-tile>200wrapper
<salla-loading>400wrapper
<salla-maintenance-alert>000wrapper
<salla-menu>600wrapper
<salla-modal>1425wrapper
<salla-placeholder>300wrapper
<salla-progress-bar>1000wrapper
<salla-skeleton>300wrapper
<salla-slider>221624native
<salla-tabs>200wrapper
<salla-tooltip>300wrapper

Products

Cart and offers

Orders

Reviews

TagPropertiesEventsMethodsIn React
<salla-comment-form>310wrapper
<salla-comments>1001wrapper
<salla-rating-modal>203wrapper
<salla-rating-stars>800wrapper
<salla-review-card>100wrapper
<salla-reviews>700wrapper
<salla-reviews-page>000wrapper
<salla-reviews-summary>100wrapper
<salla-verified-review>100wrapper

Account and loyalty

Form fields

Store and platform

TagPropertiesEventsMethodsIn React
<salla-advertisement>000wrapper
<salla-app-install-alert>000wrapper
<salla-apps-icons>300wrapper
<salla-contacts>500wrapper
<salla-cookies-bar>003wrapper
<salla-hook>101wrapper
<salla-localization-modal>303wrapper
<salla-map>1042wrapper
<salla-metadata>200wrapper
<salla-scopes>203wrapper
<salla-social>000wrapper
<salla-social-share>503wrapper
<salla-trust-badges>100wrapper

On this page