Velocity X Components

E-Commerce

Stock/Availability Indicator

Dot-and-label status line that derives in-stock/low-stock/out-of-stock from a quantity and threshold, or accepts an explicit status.

Subscription Included with the Velocity Components subscription.
bash
$ velocityx add stock-availability-indicator

Built for astro.

Full docs for Stock/Availability Indicator →

Needs a licence key — subscribe here, then velocityx loginonce.

astro v1.0.0
Stock/Availability Indicator
In stock Only 3 left Out of stock Backordered — ships Nov 3

Props

NameTypeRequiredDefaultDescription
quantitynumberNo
lowStockThresholdnumberNo5
status'in-stock' | 'low-stock' | 'out-of-stock' | 'backorder'No
expectedDatestringNo
classNamestringNo''

File this creates

The CLI writes this path into your project, relative to its root — nothing else moves.

text
components/velocity/stock-availability-indicator/StockAvailabilityIndicator.astro

Using the Stock/Availability Indicator component

Install it with velocityx add stock-availability-indicator. The CLI writes the source straight into your project — no runtime dependency, no registry lock-in, and it themes itself from the same primary-*/accent-* scale as the rest of the library.

More from E-Commerce.