{"name":"input-group","title":"Input Group","description":"","kind":"component","category":"inputs","status":"beta","props":{"start":{"type":"node","description":"Addon before the Input: text, an icon, a Kbd, or a Button (ghost, xs, square, muted, with a tooltip)."},"end":{"type":"node","description":"Addon after the Input, as start."},"value":{"type":"string","model":true,"description":"The Input's value. Controlled: value with onChange. Uncontrolled: defaultValue."},"size":{"type":"enum","values":["xs","sm","md","lg"],"default":"md","description":"The shared control's sizes (`lib/control.ts`): xs 24px, sm 28px, md 32px, lg 36px, with their text and padding."},"variant":{"type":"enum","values":["outline","subtle","ghost"],"default":"outline","description":"The shared control's looks (`lib/control.ts`), at every size. outline: the form field (field colour, hairline). subtle: the inspector (inset grey, no edge). ghost: nothing until touched. Focused, open and invalid look the same in every variant."},"mono":{"type":"boolean","default":false},"invalid":{"type":"boolean","default":false,"description":"aria-invalid on the Input; the group shows the red ring."},"disabled":{"type":"boolean","default":false},"placeholder":{"type":"string"}},"playground":{"name":"Playground","props":{"start":"https://","end":".example.dev","placeholder":"feat-usage-alerts","aria-label":"Preview URL","size":"md","variant":"outline","mono":false,"invalid":false,"disabled":false},"width":320},"exampleFiles":[{"file":"search-projects","title":"Search projects"},{"file":"spending-limit","title":"Spending limit in dollars"},{"file":"api-key","title":"API key with a copy button"},{"file":"command-search","title":"Top bar search with a shortcut"},{"file":"preview-url","title":"Preview URL in a side panel"}],"worstCase":[{"name":"Long addons","props":{"start":"https://northwind-industries-holdings.","end":".example.com/suppliers","placeholder":"path","aria-label":"Address"},"width":280},{"name":"Long value","props":{"start":"@","value":"bartholomew.fitzgerald@northwind-industries-holdings.example.com","aria-label":"Email"},"width":280},{"name":"One character","props":{"end":"%","value":"5","aria-label":"Discount"},"width":120},{"name":"Right-to-left","props":{"start":"ر.س","value":"١٢٫٥٠","aria-label":"Price"},"width":200},{"name":"Narrow","props":{"start":"https://","end":".com","placeholder":"site","aria-label":"Website"},"width":120}],"anatomy":[{"part":"root","element":"div","description":"The field: the shared control (`lib/control.ts`), field kind: its sizes and looks, the hover fill, the accent ring while focus is inside, the red ring when it is invalid, half opacity when disabled. class and style land here; every other attribute on the Input."},{"part":"start","element":"span","optional":true,"description":"Addon before the Input: text ink-2, nowrap, icons ink-3 and 14px; as far from the edge as the Input's text (the size's padding), 4px around a Button (2px up to 28px)."},{"part":"input","element":"input","description":"The Input component (data-input-group=\"input\"), transparent, without its own ring; 8px from an addon."},{"part":"end","element":"span","optional":true,"description":"Addon after the Input, as the start addon."}],"states":["hover","focus","invalid","disabled"],"tokens":["color.field","color.surface","color.hover","color.ink","color.ink-2","color.ink-3","color.accent","color.accent-tint","color.red","color.red-tint","shadow.hairline","radius.control","text.xs","text.sm","duration.fast","duration.base"],"a11y":{"keyboard":["The Input's: standard text editing; Tab moves to a Button in an addon, then on"],"notes":["Addon text is not part of the Input's name: name the Input with a Field label or an aria-label, and say the unit there when it matters.","A Button in an addon is a real Button with its own name (a tooltip names an icon-only one).","Text is 16px on touch devices (the Input's)."]},"motion":["the Input's: the ring over duration.base and the fill over duration.fast, on the group","nothing else moves"]}