os-rep-spotlight (Rep Spotlight)
What it is
Section titled “What it is”os-rep-spotlight renders the section the referring rep published for their site: their photo, their name, a paragraph in their own words, and their favorite products as os-single-product cards.
Reps on the account types the store enables write this section themselves, under My Site in their Open Shop account, and the store turns rep sites on and may review them. The storefront only ever receives the live version, through OpenShop.referral.current.branding.
Tag name
Section titled “Tag name”os-rep-spotlight (Rep Spotlight)
Attributes / parameters
Section titled “Attributes / parameters”| name | type | required | default | description |
|---|---|---|---|---|
product-url-prefix | string | No | None | product-url-prefix="/products" — Prefix used to build product page URLs for the favorite cards, so each links to <prefix>/<slug>. Without it the cards do not link to a product page. |
What it renders
Section titled “What it renders”In order, inside a <section>:
- The photo, when the rep added one. It is landscape and already sized for display.
- The rep’s name as an
<h2>. This is the referral’sdisplayName: the company they sell under, or their first and last name. - The paragraph, with the rep’s line breaks kept.
- The favorites, in the rep’s order, as a product grid: one column, two from 768px, three from 1024px.
The favorites load in one request before the cards render. A favorite this shopper cannot buy — inactive, or limited by purchase eligibility — is left out, and the grid is omitted when none are left.
The component renders nothing:
- until the tracker resolves the referral,
- when there is no referral,
- when the rep has nothing to show: the store has rep sites off, the rep switched theirs off or never published it, or the store hid it.
It updates in place when the referral changes, so a shopper who switches reps never sees the previous rep’s section.
<os-referral-tracker hide-text="true"></os-referral-tracker>
<os-rep-spotlight product-url-prefix="/products"></os-rep-spotlight><os-rep-spotlight product-url-prefix="/products"></os-rep-spotlight>export function Home() { return <os-rep-spotlight product-url-prefix="/products"></os-rep-spotlight>;}In Webflow, keep os-referral-tracker in the site-wide footer embed and put only the spotlight on the home page.
Styling (CSS variables)
Section titled “Styling (CSS variables)”These are in addition to the global tokens inherited by every component. The component has no shadow DOM, so these classes are also open to your own CSS:
| Class | Element |
|---|---|
.os-rep-spotlight | The root <section>. |
.os-rep-spotlight-photo | The photo. |
.os-rep-spotlight-name | The rep’s name. |
.os-rep-spotlight-paragraph | The paragraph. |
.os-rep-spotlight-products | The favorites grid. |
Layout & photo
Section titled “Layout & photo”| CSS variable | Default |
|---|---|
--os-rep-spotlight-max-width | 978px |
--os-rep-spotlight-gap | 24px |
--os-rep-spotlight-photo-radius | 8px |
--os-rep-spotlight-photo-aspect-ratio | 16 / 9 |
Name & paragraph
Section titled “Name & paragraph”| CSS variable | Default |
|---|---|
--os-rep-spotlight-name-color | var(--os-foreground) |
--os-rep-spotlight-name-font-size | 24px |
--os-rep-spotlight-name-font-weight | 600 |
--os-rep-spotlight-paragraph-color | var(--os-muted-foreground) |
--os-rep-spotlight-paragraph-font-size | 16px |
--os-rep-spotlight-paragraph-line-height | 1.6 |
Favorites
Section titled “Favorites”| CSS variable | Default |
|---|---|
--os-rep-spotlight-products-gap | 20px |
The cards themselves are os-single-product cards and take its --os-pc-* variables.