Skip to content

FactProps

Defined in: react/src/facts.tsx:30

fact: "name" | "amount" | "price" | "currency" | "availability" | "sku" | "description"

Defined in: react/src/facts.tsx:36

Which fact: name, price (formatted for the page language), amount (the raw decimal string), currency, availability (shown with labels), sku or description.


fallback: string

Defined in: react/src/facts.tsx:45

The text the page shows when the fact is not stated or cannot be read. It also sets the space the fact may take: a value that would not fit it is not shown. For availability, make it the longest label.


optional labels?: Partial<Record<"in_stock" | "out_of_stock", string>>

Defined in: react/src/facts.tsx:41

With fact="availability": your words for each state, for example { in_stock: "In stock", out_of_stock: "Sold out" }. The label for the stated state is shown. With no label for that state, no labels, or an unknown state, the fallback stays. Ignored for other facts.


product: string

Defined in: react/src/facts.tsx:32

The product’s id or handle.