Size Fit Picker

Size Fit Picker is a copy-paste React component that stops wrong shoe or clothing size ordered before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/size-fit-picker
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsWrong shoe or clothing size ordered

Was this component page useful?

How do I install Size Fit Picker?

pnpm dlx shadcn@latest add @bollard/size-fit-picker

The files land in your project. They're yours to edit.

How do I use Size Fit Picker in React?

size-fit-picker-usage.tsx
import { MENS_SHOES, SizeFitPicker, WOMENS_CLOTHING } from "@/components/ui/size-fit-picker"

<SizeFitPicker
  key="shoes"
  chart={MENS_SHOES}
  brand="Nike"
  usual={{ size: "8", system: "UK", brand: "Nike" }}
  defaultSystem="US"
  value={shoe}
  onValueChange={setShoe}
  available={["5", "6", "7", "8", "9", "10", "12"]}
/>

What input mistakes does Size Fit Picker catch?

  • The usual size number picked in the wrong system
  • Brand fit offsets (runs small or large)
  • Switching display systems without changing the pick
  • Sizes without an equivalent in a system

What props does Size Fit Picker accept?

SizeFitPicker props
PropTypeDefault
chart

The size chart. Ships with MENS_SHOES, WOMENS_SHOES and WOMENS_CLOTHING.

SizeChartMENS_SHOES
value

The selected size, written in `valueSystem` (what your stock uses).

string | null—
defaultValue

Starting size when uncontrolled, in valueSystem.

string | nullnull
onValueChange

Called with the size in `valueSystem` and its full row.

(size: string, row: SizeRow) => void—
valueSystem

The system your SKUs and `value` use. Switching the shown system never changes the pick.

SizeSystem"UK"
system

The system the sizes are shown in, controlled.

SizeSystem—
defaultSystem

Initial shown system. Defaults to the shopper's usual system, then `valueSystem`.

SizeSystem—
onSystemChange

Called when the shown size system changes.

(system: SizeSystem) => void—
systems

Systems offered as tabs.

SizeSystem[]["UK", "US", "EU", "IN"]
available

Sizes in stock, in `valueSystem`. Others show as sold out. Omit when everything is in stock.

string[]—
usual

The shopper's remembered size, e.g. from past orders: `{ size: "8", system: "UK", brand: "Nike" }`. Pass `chart` when it came from a different chart (men's vs women's) to convert it by foot length.

{ size: string; system: SizeSystem; brand?: string; chart?: SizeChart }—
brand

This product's brand, so a usual size from the same brand isn't adjusted.

string—
fitOffset

How this product fits compared with a usual size from another brand: 1 means size up one, -1 size down.

number0
messages

Reword or translate any sentence.

Partial<typeof SIZE_FIT_PICKER_MESSAGES>—

* required. Also accepts the native props of <fieldset> (className, aria-*, data-*…), passed through to it.

How is Size Fit Picker accessible?

  • Fieldset labelled by its legend
  • System and size pickers are radiogroups with arrow, Home and End keys
  • Suggestion is a labelled button

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Ships with typical men's shoe, women's shoe and women's clothing charts; brands vary
  • Fit offsets come from your data

What validation rules apply to Size Fit Picker?

Rules not yet verified against an official source.

Built-in size charts are general conversions, not an official standard; not verified against a primary source. Use your brand's own chart. Copied components don't update themselves, so re-check after rule changes (see updating a component).

What expensive mistakes does Size Fit Picker stop?

Wrong shoe or clothing size ordered

Also known as

size chart · size guide · shoe size · uk us eu in · fit · myntra · ecommerce · product page

Field type

What dependencies does Size Fit Picker require?

Size Fit Picker facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameSize Fit Picker
Registry identifier@bollard/size-fit-picker
Install commandnpx shadcn@latest add @bollard/size-fit-picker
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Size Fit Picker

How does Size Fit Picker prevent financial transaction errors?

Size Fit Picker prevents wrong shoe or clothing size ordered. Blocks The usual size number picked in the wrong system, Brand fit offsets (runs small or large), Switching display systems without changing the pick, Sizes without an equivalent in a system before processing. Limitation: apply idempotency keys for size-fit-picker.

How do I install size-fit-picker with shadcn?

Run `npx shadcn@latest add @bollard/size-fit-picker`. Sources added: registry/default/size-fit-picker/size-fit-picker.tsx, registry/default/size-fit-picker/sizes.ts. Package requirements: lucide-react.

What props customize Size Fit Picker?

Size Fit Picker accepts `chart`, `value`, `defaultValue`, `onValueChange`, `valueSystem`. Configures size chart, size guide, shoe size behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of size-fit-picker?

Ships with typical men's shoe, women's shoe and women's clothing charts; brands vary. Fit offsets come from your data Server requirement: backend verification for size-fit-picker.

How does Size Fit Picker meet accessibility guidelines?

Fieldset labelled by its legend. System and size pickers are radiogroups with arrow, Home and End keys. Suggestion is a labelled button. Minimizes errors: uk us size conversion, shoe size chart india.

Which components pair with Size Fit Picker?