Widgets API

Fera.js lets you create custom widgets.

On this page

The HTML Widgets API allows you to show certain widgets on the page efficiently without configuring them in Fera.

Warning

Usually the best thing to do is configure widgets from the Fera Widgets interface.

Product Rating Widget#

Product rating widget showing stars and review count on a product page

HTML
<div data-fera-container="product_reviews_summary" data-product-id="{{ product.id }}"></div>

Tip: Same code works in collection pages

You can also use the same snippet to display ratings in your collection page product items like this:

Product rating widget on collection page product items

Product Reviews List Widget#

Product reviews list widget on a product page

HTML
<div data-fera-container="product_reviews" data-product-id="{{ product.id }}"></div>

All Reviews List Widget#

All reviews list widget showing reviews for the whole store

HTML
<div data-fera-container="all_reviews"></div>

Media gallery widget showing customer photos and videos

HTML
<div data-fera-container="store_customer_media"></div>

โ†‘ โ†“ to move, Enter to open, Esc to close