An availability label derives from inventory and any reservation policy. Keep the visible wording consistent with the action a visitor can actually take.
Worked example
// components/StockAvailabilityLabel.tsx
export default function StockAvailabilityLabel({ stock = 8 }: { stock?: number } = {}) {
return (
<span role="status">
{stock === 0 ? "Sold out" : stock < 4 ? "Only " + stock + " left" : "In stock"}
</span>
);
}Implementation notes
An item can have positive stock while being unavailable for sale. Separate raw quantity from availability when reservations or release dates are involved.
Try it yourself
Compare zero stock, low stock and a quantity already reserved.
Open the React example →Editorial date May 2, 2026 · Published December 6, 2026