Q3
  • Introduction
  • Related Projects
  • Roadmap
  • API
    • Core
      • Rest
      • Session
      • Schema plugins
    • Schemas
      • Rates
      • Rebates
      • Permissions
    • Utils
      • Subdocuments
      • Soft deleting
  • Client
    • gatsby-theme-q3
    • q3-components
      • Quantity
    • q3-ui-cart
      • Drawer
    • Admin
      • Builders
      • Containers
        • Contexts
    • Datatables
      • TableBadge
    • Forms
      • Field
      • Presets
        • <PasswordChange />
    • Repeater
    • UI
      • CallToAction
      • Avatar
      • CollapsiblePanel
      • SubMenu
Powered by GitBook
On this page

Was this helpful?

  1. Client
  2. q3-components

Quantity

Number input for incrementing whole numbers

yarn add q3-components

Quantity is used extensively in the q3-ui-cart package. For more examples, I'd suggest taking a look at the repository.

MyQuantity.jsx
import React from 'react';
import { Quantity } from 'q3-components';

export default () => (
    <Quantity variant="spread" size="small"> 
        {(quantity, reset) => null}
    </Quantity>
);

Props

Prop

Type

Description

size

string

Use either "small" or "large"; it defaults to "regular"

variant

string

Use either "spread" or "stacked" to control the toggle display

Previousq3-componentsNextq3-ui-cart

Last updated 5 years ago

Was this helpful?