Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Product
  • Overview
  • Usage
  • Components Customization
  • Elements
    • Apps Icons
    • Breadcrumb
    • Color Picker
    • Conditional Fields
    • Count Down
    • Filters
    • Infinite Scroll
    • List Tile
    • Loading
    • Map
    • Modal
    • Placeholder
    • Progress Bar
    • Rating Stars
    • Reviews
    • Reviews Summary
    • Sheet
    • Skeleton
    • Slider
    • Social
    • Social Share
    • Tabs
  • Form
    • Button
    • Bottom Alert
    • Contacts
    • Date Time Picker
    • File Upload
    • Menu
    • Quantity Input
    • Select
    • Tel Input
  • Product
    • Add Product
    • Advertisement
    • Comments
    • Conditional Offer
    • Gifting
    • Installment
    • Meta Data
    • Offer
    • Offer Modal
    • Orders
    • Payments
    • Product Availability
    • Product Card
    • Products List
    • Product Options
    • Product Size Guide
    • Products Slider
    • Quick Buy
    • Quick Order
    • Scopes
    • Search
  • User
    • Cart Summary
    • Localization
    • Login
    • Loyalty
    • Rating
    • User Menu
    • User Profile
    • User Settings
    • Verify
  1. Product

Product Card

The <salla-product-card> web component is used to contain content and actions about a single product in a card display mode. The component incorporates options for displaying images, hovering over buttons, product information, and more.

Example#

Product Card

Usage#

HTML
SASS

Properties#

PropertyAttributeDescriptionTypeDefault
Full Imagefull-imageWhether or not to show the full image on the card.booleanundefined
Hide Add Buttonhide-add-btnWhether or not to hide the "add to cart" button.booleanundefined
HorizontalhorizontalWhether or not to show the product card as Horizontal card.booleanundefined
SpecialspecialWhether or not to show the product card as Special card.booleanundefined
MinimalminimalWhether or not to show the product card as Minimal card.booleanundefined
ProductproductThe product's data.stringundefined
Shadow On Hovershadow-on-hoverWhether or not to support the effect of shadow on hover.booleanundefined
Show Quantityshow-quantityWhether or not to show quantity.booleanundefined

Slots#

Theslots makes it customizable to modify certain labels, such as add-to-cart-label.
SlotDescription
"add-to-cart-label"The add to cart text label

Custom Salla Product Card Component#

Note
The above mentioned content represents the default salla-product-card component. If you want to further customize the component and build your own product card component, please read further in this section
The developer can fully customize cards which comes within the Product Lists when calling the component, by utilizing the custom-salla-product-card phrase. That allows developers to create their own custom product cards that is returned when the salla-products-list is called.
The following code is about defining a custom HTML element called custom-salla-product-card that extends the functionality of a standard HTML element.
The custom element is defined using the customElements object provided by the browser, and is given the name custom-salla-product-card that Salla has pre-deifned. This element is then assigned to the class variable, say ProductCard, which extends the HTMLElement class.
The ProductCard class has two methods: connectedCallback and render. The connectedCallback method is called automatically by the browser when the element is added to the DOM, and the render method is used to generate the content for the custom element.
Information
📚 Learn more about Custom Components Mozilla and Salla Developer Portal, as well as Theme Raed.
Structure
Example
Modified at 2024-08-18 09:50:14
Previous
Product Availability
Next
Products List