salla-reviews-page

A full reviews page for the store's product reviews: a sort dropdown, a masonry grid of salla-review-card items, and a "load more" button.

A full reviews page for the store's product reviews: a sort dropdown, a masonry grid of salla-review-card items, and a "load more" button. It takes no props: it loads 8 reviews per request from the reviews API and keeps the chosen sort and the current page in the page URL query string (read again on load). Sort values are latest (default), oldest, top_rating and bottom_rating. Use it as the main content of a store reviews page.

Use it

In HTML or JSX, use the tag <salla-reviews-page> with the Attribute names below. In React, the wrapper takes the Property names (camelCase).

import { SallaReviewsPage } from '@salla.sa/twilight-components-react/reviews-page';

Client-only. On the server this wrapper renders a placeholder (a skeleton, or nothing), and the real component mounts in the browser. Do not rely on it for content that search engines must see.

Example

import { SallaReviewsPage } from '@salla.sa/twilight-components-react/reviews-page';

export function Example() {
  return (
    <SallaReviewsPage />
  );
}

Renders: <salla-review-card>, <salla-button>.

On this page