v1.2
MENU ANIMATIONS
ADVANCED EFFECTS
CORE BACKGROUND
UI SURECART
BUTTONS
SureStock
Displays a dynamic stock indicator with color-coded status bar for SureCart products. Automatically syncs with product inventory and updates in real-time. Features customizable thresholds, colors, and text labels. Shows visual urgency through color changes as stock decreases. Perfect for creating scarcity and driving purchase decisions.
Thresholds
Maximum stock value used to calculate the percentage fill. Set this to your typical full inventory level for accurate visual representation.
Default: 100
Percentage below which stock is considered low. Triggers the low stock color to create urgency. Great for encouraging quick purchases.
Default: 20%
Percentage below which stock is considered medium. Shows the medium stock color as a gentle reminder that inventory is decreasing.
Default: 50%
Colors
Color displayed when stock is above medium threshold. Typically green to indicate healthy inventory levels and availability.
Default: #22c55e (green)
Color displayed when stock falls between low and medium thresholds. Usually amber or yellow to signal moderate availability.
Default: #f59e0b (amber)
Color displayed when stock drops below low threshold. Red creates urgency and encourages immediate action from buyers.
Default: #ef4444 (red)
Color of the stock count text. Should contrast well with your background for readability.
Default: #ffffff
Background color of the entire stock indicator container. Use transparent or subtle colors to blend with your product cards.
Default: transparent
Border color around the stock indicator container. Set to transparent for no border or use subtle colors for definition.
Default: transparent
Background color of the progress bar track. The unfilled portion of the bar. Use a subtle color that contrasts with the fill.
Default: rgba(255,255,255,0.1)
Text
Text displayed after the stock number. Use "units", "items", "left", or any custom label that fits your product type.
Default: "units"
Text displayed after the unit suffix. Common options include "in stock", "available", "remaining".
Default: "in stock"
Message displayed when stock reaches zero. Make it clear but not discouraging. Consider "Sold out" or "Back soon".
Default: "Out of stock"
Appearance
Height of the progress bar in pixels. Smaller values (4-6px) look subtle, larger values (8-12px) are more prominent.
Default: 6
Corner rounding of the container. Use 0 for sharp corners or higher values for a softer, rounded look.
Default: 12
Internal spacing around the content. Larger padding creates more breathing room inside the container.
Default: 16
Behavior
Automatically hides the entire stock indicator when stock reaches zero. Useful if you prefer to show nothing rather than an "out of stock" message.
Default: Off
Performance
This element is lightweight and won't slow down your site. Uses MutationObserver for efficient real-time stock updates without polling. CSS transitions provide smooth visual feedback. Compatible with SureCart's dynamic product data and works seamlessly with product grids and single product pages.
