Skip to content

Quantity

  • Purpose: quantity stepper container; holds the clamp bounds and owns the logic. Child controls find their nearest change-quantity and call step() / set(); it emits the clamped quantity.
  • Attributes:
    • min : number = 1 - minimum quantity (also the default current value).
    • max : number = Infinity - maximum quantity.
  • Required ancestor / context: storesynk-product (consumes productContext).
  • Children: decrease-quantity, input-quantity or show-quantity, increase-quantity.
  • Events: emits sf:quantity-change (bubbles, composed; clamped detail.quantity).
  • State it sets: none on itself.
  • Purpose: click control; steps the nearest change-quantity by +1. Plain HTMLElement (the element itself is the button).
  • Attributes: none. Required ancestor: change-quantity (SSK-108).
  • Events / state: none (calls change-quantity.step(1)).
  • Purpose: click control; steps the nearest change-quantity by -1.
  • Attributes: none. Required ancestor: change-quantity (SSK-108).
  • Events / state: none (calls change-quantity.step(-1)).
  • Purpose: editable quantity field; renders/owns an <input type="number"> kept in sync with the product’s quantity. On change, calls change-quantity.set(value).
  • Attributes: none.
  • Required ancestor / context: change-quantity (calls its set()); consumes productContext to read the current quantity. (SSK-108.)
  • Children: optionally an <input> (else it creates one).
  • Events / state: none of its own.

Imported from the Storesynk skill v0.1.0 (references/component-reference.md). To change this page, change it there.