[{"data":1,"prerenderedAt":1869},["ShallowReactive",2],{"cmdk-index":3,"content:\u002Fheadless\u002Fuse-combobox":236},[4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232],{"path":5,"title":6,"description":7},"\u002Fcomponents\u002Faccordion","Accordion","A disclosure list built entirely on native \u003Cdetails>\u002F\u003Csummary> elements — zero JavaScript, zero\nARIA reinvention. The browser supplies the disclosure role, aria-expanded, Enter\u002FSpace toggling,\nfocus, and find-in-page expansion for free. Single-open (exclusive) mode uses the platform\nexclusive-accordion feature (Baseline 2024): every \u003Cdetails> shares one auto-generated name, so\nthe browser closes siblings when one opens. multiple drops the shared name so each item opens\nindependently.",{"path":9,"title":10,"description":11},"\u002Fcomponents\u002Falert","Alert","A styled, accessible notification banner. Its live-region politeness is derived from the color —\nurgent danger \u002F warn render role=\"alert\" (assertive), everything else role=\"status\" (polite) —\nso a non-urgent banner isn't announced assertively (override with the live prop). It supports an\noptional icon, a title, body text, an actions row, and a dismiss button.",{"path":13,"title":14,"description":15},"\u002Fcomponents\u002Favatar","Avatar","A data-display component that shows an image, or initials derived from text when there is no\nimage (or while it loads). Supports a title \u002F subtitle column for list and profile UIs.",{"path":17,"title":18,"description":19},"\u002Fcomponents\u002Fbadge","Badge","A small status or count indicator. Attach it to any element as a floating pip, drop it inline next\nto text, or render it standalone — all three modes share the same class surface.",{"path":21,"title":22,"description":23},"\u002Fcomponents\u002Fbutton","Button","A styled, accessible button. Dynamic state is expressed through real attributes — disabled becomes\na true disabled (or aria-disabled for link buttons), loading sets aria-busy, and it ships a\nvisible :focus-visible ring.",{"path":25,"title":26,"description":27},"\u002Fcomponents\u002Fcard","Card","A surface container for grouping related content — a header (prepend slot · title · subtitle ·\nappend slot), a body, and optional action rows. It is the most composed styled component, yet the\nstandalone markup is just nested .ori-card__* elements, so it works without Vue.",{"path":29,"title":30,"description":31},"\u002Fcomponents\u002Fcheckbox","Checkbox","A styled, accessible checkbox built on a real \u003Cinput type=\"checkbox\"> — kept in the DOM\n(visually hidden over a custom box) so keyboard, focus, and native form submission work for free.\nThe accent color and :focus-visible ring are driven by the ori-color token; invalid sets\naria-invalid; disabled is the native attribute.",{"path":33,"title":34,"description":35},"\u002Fcomponents\u002Fcolor-picker","Color picker","An accessible color picker: a 2D saturation × brightness area, a hue slider, a hex field, and\noptional preset swatches — an inline panel you compose into an OriPopover for a\nswatch-triggered flow. Behaviour lives in the framework-agnostic useColorPicker (a zero-dependency sRGB +\n2D-area engine, no adapter or machine); the styled component reuses OriSlider for the\nhue channel and OriInput for the hex field. v-model carries a lowercase color\nstring; the internal working model is HSVA, so the hue survives when you drag into a corner and back.",{"path":37,"title":38,"description":39},"\u002Fcomponents\u002Fcombobox","Combobox","A filterable single-select listbox — type to filter, navigate with the keyboard, pick one. It is the\nfirst component driven end-to-end by @oriui\u002Fheadless: the state machine + prop-getters own the\nbehaviour (open\u002Fclose, filtering, the active-descendant highlight, selection, and the full\nWAI-ARIA keyboard), and OriCombobox renders the styled shell on top. Unlike the pure-CSS\ncomponents, the behaviour needs JavaScript — the standalone classes give you the look, and\nuseCombobox gives you the behaviour for any UI.",{"path":41,"title":42,"description":43},"\u002Fcomponents\u002Fdialog","Dialog","A modal dialog — the library's first genuinely interactive component, built on the native\n\u003Cdialog> element. Unlike the styled-only components, a dialog needs behaviour: focus trap, scroll\nlock, Esc-to-close, click-outside dismissal, and the full WAI-ARIA keyboard contract. All of it comes\nfrom the platform via showModal() — no state-machine dependency and no adapter to wire. The styled\nOriDialog supplies only the markup and tokens.",{"path":45,"title":46,"description":47},"\u002Fcomponents\u002Fdivider","Divider","A horizontal (default) or vertical rule that separates content. An optional centered label turns it\ninto a visual break like the classic \"OR\" between form sections. A pure layout\u002Fstructure primitive —\nno interactive behaviour, no variants, no size scale.",{"path":49,"title":50,"description":51},"\u002Fcomponents\u002Ffield","Field","The shared shell for form controls — one source of truth for the label \u002F hint \u002F error \u002F\nrequired contract that Input, Select,\nTextarea, Combobox, Slider,\nRadioGroup, and ColorPicker otherwise each wire\nby hand. Wrap a control in OriField and it adopts the field's id, aria-describedby,\naria-invalid, required, disabled, and size — and stops rendering its own label and helper, so\nthere is exactly one of each, wired identically every time. Group and composite controls (RadioGroup,\nCombobox's listbox, ColorPicker) name themselves via aria-labelledby pointing at the field's label.",{"path":53,"title":54,"description":55},"\u002Fcomponents\u002Ficon","Icon","A styled, accessible SVG icon. Decorative by default — renders with aria-hidden=\"true\" and no\nrole. Pass a label to expose it to assistive technology as an image: the icon switches to\nrole=\"img\" + aria-label automatically.",{"path":57,"title":58,"description":59},"\u002Fcomponents\u002Finput","Input","A labelled, accessible text field with v-model. State is expressed through real attributes — the\nnative disabled, aria-invalid when there is an error, and an aria-describedby that points at\nthe rendered hint or error. The label is wired to the field with for\u002Fid (auto-generated via\nuseId when you don't pass one), and arbitrary native attributes (name, autocomplete,\ninputmode, …) fall through to the underlying \u003Cinput>.",{"path":61,"title":62,"description":63},"\u002Fcomponents\u002Fjoin","Join","A thin wrapper that collapses the shared radii and borders of adjacent controls so they read as one\nsegmented unit — button groups, input+button combos, segmented toolbars. No visual styling of its\nown: all colour, size, and variant tokens live on the children.",{"path":65,"title":66,"description":67},"\u002Fcomponents\u002Fkbd","Kbd","A keyboard-key chip — a semantic \u003Ckbd> element styled as a monospace bordered chip. Use it to\nrepresent individual keys, modifier keys, or multi-key shortcuts inline in prose or UI hints.",{"path":69,"title":70,"description":71},"\u002Fcomponents\u002Flink","Link","An inline prose link — the right choice when a destination lives in running text. Distinct from\nOriButton rendered as=\"a\": a button that navigates is still a button; a link in a sentence is\nOriLink. Underlined by default (the affordance survives without color), with a _hover mode that\nhides the underline at rest and reveals it on hover. A visible :focus-visible ring uses the same\ncolor as the text.",{"path":73,"title":74,"description":75},"\u002Fcomponents\u002Fmenu","Menu","A WAI-ARIA menu button: a trigger opens a roving-tabindex action list. Unlike the Popover, open\u002Fclose,\nfocus movement, and click-outside dismissal are driven entirely by the @oriui\u002Fheadless menu\nmachine in JavaScript, not the Popover API — so the panel is not top-layer and carries a z-index. The\npanel is still placed with the same CSS Anchor Positioning primitive as the Popover (ori-anchored),\nzero positioning JS.",{"path":77,"title":78,"description":79},"\u002Fcomponents\u002Fpopover","Popover","A positioned overlay for supplementary content — a menu, a filter panel, a rich hint — tethered to a\ntrigger. It runs entirely on the platform: the trigger opens the panel through the Popover API\n(top-layer, light-dismiss, Esc — zero JS), and the panel is placed with CSS Anchor Positioning\n(anchor-name \u002F position-anchor + position-area, with a collision flip via\nposition-try-fallbacks) — zero positioning JS, no scroll\u002Fresize listeners. Baseline 2026, with\ngraceful degradation: an older engine still opens the panel and places it, just without the\ncollision-aware flip.",{"path":81,"title":82,"description":83},"\u002Fcomponents\u002Fprogress","Progress","A horizontal progress bar that communicates task completion. It supports a determinate mode (a\nknown value out of a max) and an indeterminate mode (animated sweep) for tasks with no\nmeasurable progress. State is expressed through ARIA attributes — aria-valuenow is omitted when\nindeterminate, giving screen readers the correct cue automatically.",{"path":85,"title":86,"description":87},"\u002Fcomponents\u002Fradio","Radio","A \"choose one\" compound control. A role=\"radiogroup\" container names the set via\naria-labelledby; each option is a real \u003Cinput type=\"radio\"> sharing a single name — so the\nbrowser enforces single-select and native form submission — visually hidden behind a styled circle.\nPass the options as an array; per-option disabled is supported.",{"path":89,"title":90,"description":91},"\u002Fcomponents\u002Fselect","Select","A native-first styled select control with v-model. The browser owns the dropdown, full keyboard\ninteraction, type-ahead, and all ARIA semantics — oriUI only styles the closed control and draws a\ndecorative chevron. It shares the form-control contract of Input and\nTextarea: a built-in label, hint, error, and required asterisk, all\nwired for accessibility. State is expressed through real attributes — native disabled and\naria-invalid=\"true\" (not classes) — and arbitrary native attrs (name, autocomplete, …) fall\nthrough to the \u003Cselect> via inheritAttrs:false.",{"path":93,"title":94,"description":95},"\u002Fcomponents\u002Fskeleton","Skeleton","A loading placeholder that signals content is on its way. An animated shimmer sweep sweeps across the\nblock; on devices that request reduced motion the shimmer stops and the tinted block alone signals the\nloading state. Size it with an inline style or a utility class — the skeleton itself carries no\nintrinsic width or height beyond a 1em minimum height.",{"path":97,"title":98,"description":99},"\u002Fcomponents\u002Fslider","Slider","A styled, accessible range control built on a native \u003Cinput type=\"range\">. Because the\nunderlying element is real HTML, the browser supplies role=\"slider\", the full keyboard contract\n(arrow keys, Home\u002FEnd, PageUp\u002FPageDown), and screen-reader value announcements for free — no\nJavaScript bridge needed. Colour and the filled-track portion are driven by CSS custom properties;\nv-model carries a number.",{"path":101,"title":102,"description":103},"\u002Fcomponents\u002Fspinner","Spinner","An accessible loading indicator — renders role=\"status\" with an aria-label (default \"Loading\")\nso assistive technology announces the busy state without any extra work. Use it standalone for a\npage-level or section-level loader, or embed it inline inside a button or label.",{"path":105,"title":106,"description":107},"\u002Fcomponents\u002Fstack","Stack","The workhorse layout primitive — two flex modes in one component. A stack (ori-stack) is a\nflex column: children flow top-to-bottom with a consistent gap. A cluster (ori-cluster) is a\nwrapping flex row: children flow left-to-right, wrap onto new lines, and are centered on the\ncross-axis — ideal for tag clouds, button groups, and badge sets.",{"path":109,"title":110,"description":111},"\u002Fcomponents\u002Fsurface","Surface","An elevated floating surface — a lifted panel with a surface background, an optional hairline, a\ncorner radius, and a mode-aware shadow, and nothing else. No padding, no header\u002Ftitle semantics: it\nis just the box, and the caller owns the layout inside. It's the building block for chrome that floats\nover content — a toolbar island, a zoom control, a side panel, a menu popout's container — and the\nelevation counterpart to Card, which is a content card (padding + header \u002F\ntitle \u002F body \u002F actions).",{"path":113,"title":114,"description":115},"\u002Fcomponents\u002Fswitch","Switch","An on\u002Foff toggle built on a real \u003Cinput type=\"checkbox\" role=\"switch\"> — kept in the DOM\n(visually hidden over a track + thumb) so keyboard, focus, and form submission work for free, and\nassistive technology announces it as a switch. v-model is a boolean. The \"on\" track color and the\n:focus-visible ring both come from the ori-color token; the track and thumb scale with\nori-font-size so size is a single prop.",{"path":117,"title":118,"description":119},"\u002Fcomponents\u002Ftabs","Tabs","An accessible tabs widget with automatic activation. The tablist holds a roving tabindex so\nTab \u002F Shift+Tab enter and leave the group as a single keyboard stop; arrow keys move between\ntabs and immediately select them. State is expressed through real ARIA attributes — aria-selected\ndrives both the active indicator and the label colour; disabled is the native button attribute.",{"path":121,"title":122,"description":123},"\u002Fcomponents\u002Ftag","Tag","A compact label for categorising, filtering, or annotating content — status chips, keyword\nbadges, and removable filter pills. State is expressed through real attributes: aria-disabled\ndisables the tag and its close button without removing it from the DOM.",{"path":125,"title":126,"description":127},"\u002Fcomponents\u002Ftextarea","Textarea","A labelled, accessible multiline text field with v-model. State is expressed through real\nattributes — the native disabled, aria-invalid when there is an error, and an aria-describedby\nthat points at the rendered hint or error. The label is wired to the field with for\u002Fid\n(auto-generated via useId when you don't pass one). Unlike a single-line input the field has no\nfixed height — it grows from a rows-based min-height and stays user-resizable.",{"path":129,"title":130,"description":131},"\u002Fcomponents\u002Ftoast","Toast","An imperative notification system. Push a toast from anywhere with useToast() and render\n\u003COriToaster \u002F> once near the app root to display the queue. No event bus, no Vuex, no provide\u002Finject —\njust a module-level reactive queue that every call site shares.",{"path":133,"title":134,"description":135},"\u002Fcomponents\u002Ftoolbar","Toolbar","A WAI-ARIA toolbar: a set of related controls that share a single Tab stop, navigated internally\nwith the arrow keys via roving tabindex (real DOM focus, not aria-activedescendant). Five\ncomponents make it up — OriToolbar (the root, role=\"toolbar\"), OriToolbarButton (an item —\ncomposes OriButton), OriToolbarSeparator (a perpendicular divider), and a paired\nOriToolbarToggleGroup \u002F OriToolbarToggleItem for a segmented single- or multi-select toggle.\nUnlike the data-driven OriMenu (an items array plus a machine), a toolbar is compositional —\nyou assemble it from slotted components in whatever order and combination you need — so the behaviour\nunderneath, useToolbar from @oriui\u002Fheadless, is a provide\u002Finject\nroving-focus context rather than a state machine over an array.",{"path":137,"title":138,"description":139},"\u002Fcomponents\u002Ftooltip","Tooltip","A CSS-driven tooltip that shows additional context when a control is focused or hovered. The bubble\nis always in the DOM (so the aria-describedby reference is never dangling) and shown\u002Fhidden\nentirely in CSS — no JS state machine, no positioning engine. Show is pure :focus-within (keyboard)\nand :hover wrapped in @media (hover: hover) (pointer, without sticking open on touch).",{"path":141,"title":142,"description":143},"\u002Fguides\u002Fcss","Using the CSS layer","oriUI is three independent layers woven around one set of design tokens. The @oriui\u002Fcss layer is\njust standalone .ori-* classes plus the token theming — no Vue, no build step, no Tailwind. You\nship the stylesheet and write classes. This is how oriUI works with htmx, Astro, or plain HTML —\nthe DaisyUI niche, minus Tailwind.",{"path":145,"title":146,"description":147},"\u002Fguides\u002Fcustomization","Customization","Make it yours — without authoring a whole skin. Most products need one thing: their brand color and\ntheir corner radius on top of accessible, ready-made components. oriUI lets you do that by repointing\na handful of design tokens — a few CSS custom properties in your own stylesheet, no rewrite, no fork.\nThis is the prototype fast, scale without rewriting payoff: the same \u003COriButton> you shipped on\nday one becomes on-brand by the time you ship to users, and nothing about the component changes.",{"path":149,"title":150,"description":151},"\u002Fguides\u002Fdesign-tokens","Design tokens","oriUI is three independent layers woven around one set of design tokens. This page is the\ncatalog — every token, and the resolution model that turns a raw value into the colour a component\npaints. The chain is short and deliberate: a primitive feeds a semantic role, a role feeds a\nper-instance alias, and components read only the alias. That indirection is what lets a single\nclass repoint a single token — the whole zero-runtime theming story rests on it.",{"path":153,"title":154,"description":155},"\u002Fguides\u002Fskins","Skin gallery","A skin is a named palette — a set of token overrides applied with one attribute on \u003Chtml>\n(data-ori-skin). Every skin repoints only the four skinnable roles (primary · secondary ·\nsurface · background, each with a -light and -dark source); the status hues (success ·\nwarn · danger · info) stay shared, and every pairing targets WCAG AA for body text. Switching\na skin is a single attribute write — zero runtime, no recompute, no flash.",{"path":157,"title":158,"description":159},"\u002Fguides\u002Ftheming","Theming","A theme is a mode (light or dark) layered over a skin (a named palette). Both are pure\nattribute toggles on \u003Chtml> — flipping either repoints the active --ori-color-* aliases through\nCSS custom properties, so everything reskins at once with no JavaScript, no recompute, no flash.\nThis is the same zero-runtime story across every layer: a Vue app, the standalone @oriui\u002Fcss\nclasses, htmx fragments, or hand-written HTML all theme identically.",{"path":161,"title":162,"description":163},"\u002Fheadless\u002Fcore","Core","The framework-agnostic heart of the headless layer: a behaviour contract plus a zero-dependency\nnative engine, written in vanilla TypeScript. Every framework binding consumes the same contract,\nso a primitive behaves identically wherever it runs — and the behaviour stays swappable per primitive,\nwithout touching markup.",{"path":165,"title":166,"description":167},"\u002Fheadless\u002Fuse-color-picker","useColorPicker","A headless sRGB color picker — a 2D saturation × brightness area, a hue channel, an optional\nalpha channel, a hex field, and optional preset swatches, assembled from ready-to-bind\nprop-getters. It owns the working color as an internal HSVA object (so the hue survives a grayscale\nround-trip when you drag into a corner and back) and composes a zero-dependency sRGB engine plus pure\n2D-area math from the core: parseColor \u002F formatColor (loose parse in, lowercase string out),\nhsvToRgb \u002F rgbToHex \u002F rgbToHsl (hex \u002F rgb \u002F hsv \u002F hsl conversion), readableInk (WCAG-luminance\nink over a swatch), and resolveAreaPosition \u002F stepAreaPosition (pointer → coordinate and keyboard\nstepping across the two axes).",{"path":169,"title":170,"description":171},"\u002Fheadless\u002Fuse-combobox","useCombobox","A headless combobox primitive — an editable text input paired with a popup listbox — implementing\nthe WAI-ARIA combobox with listbox popup pattern: type to filter, navigate with the keyboard via\nactive-descendant, and pick a single option. It owns the behaviour (open\u002Fclose, filtering, the\nhighlight, selection, and the full keyboard) and the ARIA wiring as ready-to-bind prop bags; you own\nthe markup and styles.",{"path":173,"title":174,"description":175},"\u002Fheadless\u002Fuse-dialog","useDialog","A headless modal dialog primitive built on the native \u003Cdialog> element — focus trap, scroll lock,\nEscape to close, focus return, and aria-modal semantics all come from the platform via\nshowModal(). It owns the open state and the ARIA wiring as ready-to-bind prop bags; you own the\nmarkup and styles (you render the \u003Cdialog> and drive showModal() \u002F close() from open).",{"path":177,"title":178,"description":179},"\u002Fheadless\u002Fuse-disclosure","useDisclosure","A headless show \u002F hide primitive for disclosure widgets — expandable panels, accordions, menus,\nthe collapsible sidebar groups on this very site. It owns the open state, the WAI-ARIA wiring, and the\ntoggle handler; you own the markup and the styles.",{"path":181,"title":182,"description":183},"\u002Fheadless\u002Fuse-dismissable","useDismissable","A headless dismiss layer — the \"close the overlay on an outside interaction\" glue a non-platform\noverlay needs, the pattern Radix DismissableLayer \u002F Floating-UI useDismiss standardise. While\nenabled, it attaches document listeners and calls onDismiss() when an interaction lands outside\nthe overlay's own elements. Each overlay picks the strategy that fits it:",{"path":185,"title":186,"description":187},"\u002Fheadless\u002Fuse-menu","useMenu","A headless menu button primitive built on the WAI-ARIA menu-button pattern — a trigger that opens a\npopup menu of actions, with roving tabindex, arrow \u002F Home \u002F End navigation, and Enter \u002F Space\nactivation. It owns the open state and the highlighted item and exposes the ARIA wiring as ready-to-bind\nprop bags; you own the markup, the styles, and the DOM focus (roving needs real focus, and\nclick-outside \u002F focus-return are host concerns a state projection can't reach).",{"path":189,"title":190,"description":191},"\u002Fheadless\u002Fuse-tabs","useTabs","A headless WAI-ARIA tabs widget with automatic activation — a tablist of tabs behind a single\nTab stop, navigated with the arrow keys via roving tabindex (real DOM focus, not\naria-activedescendant), where moving focus also selects. It is data-driven: you pass the tabs\narray plus the selected value, and it returns the tablist prop bag plus per-tab and per-panel\nprop-getters (ids, aria-selected, aria-controls, aria-labelledby, roving tabindex, hidden).",{"path":193,"title":194,"description":195},"\u002Fheadless\u002Fuse-theme","useTheme","A headless light \u002F dark theme controller — it owns the mode setting, resolves auto against the OS\nscheme live, persists the choice, and applies it to the DOM. It applies through applyTheme, which sets\nthe ori-theme_{light,dark} class (removing the opposite — exactly one is on at a time) and works\naround a bug in current Chromium where a runtime theme toggle otherwise leaves styled components\npainting the previous theme's colours until they re-render.",{"path":197,"title":198,"description":199},"\u002Fheadless\u002Fuse-toast","useToast","A headless toast queue — an imperative notification store you call from anywhere (toast('Saved'))\nand render once near the app root. The behaviour is a framework-agnostic engine (a plain array + a Set\nof listeners + auto-dismiss timers) projected into the host framework's reactivity: a Vue reactive\narray and a Svelte readable store. It is a client-side singleton — every useToast() call\nshares the one queue, so a push from anywhere reaches the single renderer.",{"path":201,"title":202,"description":203},"\u002Fheadless\u002Fuse-token","useToken","A reactive token bridge — it resolves an --ori-* design token to its computed value in JS, for\ncanvas \u002F WebGL \u002F chart painters (Konva, ECharts, …) that draw outside the CSS cascade yet must follow the\nactive skin. It reads through a hidden probe, because the obvious API is a trap: getComputedStyle(el).getPropertyValue('--x') hands back the unresolved var() chain (oriUI aliases chain), not a color —\nsubstitution only happens at a real property's computed-value time.",{"path":205,"title":206,"description":207},"\u002Fheadless\u002Fuse-toolbar","useToolbar","A headless WAI-ARIA toolbar — a set of related controls behind a single Tab stop, navigated\ninternally with the arrow keys via roving tabindex (real DOM focus, not aria-activedescendant).\nThe root owns orientation \u002F loop \u002F direction and a single keydown handler; each item registers itself\nand receives its roving tabindex, so a toolbar is assembled from arbitrary slotted components\nrather than a fixed data array.",{"path":209,"title":210,"description":211},"\u002Foverview\u002Faccessibility","Accessibility","Accessibility in oriUI is structural, not a coat of polish on top. The same decisions that make\nthe components correct for assistive technology also make them themeable and framework-agnostic — they\nare the same source of truth, not a separate effort.",{"path":213,"title":214,"description":215},"\u002Foverview\u002Fapplicability","Applicability","oriUI is three independently-consumable layers woven around one token contract. The promise is\nprototype fast, scale without rewriting: reach for the styled Vue components first, drop to the\nheadless behaviour when you need control, or drop to the standalone CSS when you leave Vue entirely —\nwithout changing your design tokens. This page maps each layer to where it runs.",{"path":217,"title":218,"description":219},"\u002Foverview\u002Fcheat-sheet","Cheat sheet","Everything in one page — install, the class model, every component, and the design tokens. For the\nmachine-readable version (e.g. to paste into an AI), fetch \u002Fllms.txt (index) or\n\u002Fllms-full.txt (every page concatenated).",{"path":221,"title":222,"description":223},"\u002Foverview\u002Fcomparisons","Idea & comparisons","oriUI's one-line idea — prototype fast, scale without rewriting — falls out of a single\narchitectural choice: three layers woven around one token contract, so you can change depth\n(styled → headless → CSS) without changing your design system. This page sets that idea next to the\nlibraries oriUI learns from, and is honest about where it does and doesn't compete.",{"path":225,"title":226,"description":227},"\u002Foverview\u002Fget-started","Get started","oriUI is a layered Vue 3 UI library. Install it and import only what you need.",{"path":229,"title":230,"description":231},"\u002Foverview\u002Finstallation","Installation","oriUI is three layers in two packages. Install only the layer you need — they share one token\ncontract, so you can add another later without reworking what you built.",{"path":233,"title":234,"description":235},"\u002Foverview\u002Fintroduction","Introduction","oriUI (織り, ori — \"weaving\") is a layered Vue 3 UI library. The idea in one line:\nprototype fast, scale without rewriting. Start with ready-made styled components; when you need\nmore control, drop down to the behavior or the raw CSS — without throwing away your work, because\nevery layer is woven around the same design tokens.",{"id":237,"title":170,"body":238,"description":171,"extension":1864,"meta":1865,"navigation":1059,"path":169,"seo":1866,"stem":1867,"__hash__":1868},"docs\u002Fheadless\u002Fuse-combobox.md",{"type":239,"value":240,"toc":1856},"minimark",[241,245,263,316,321,352,356,386,525,539,604,608,630,994,998,1012,1431,1453,1467,1615,1624,1627,1633,1748,1815,1819,1852],[242,243,170],"h1",{"id":244},"usecombobox",[246,247,248,249,253,254,258,259,262],"p",{},"A headless ",[250,251,252],"strong",{},"combobox"," primitive — an editable text input paired with a popup listbox — implementing\nthe WAI-ARIA ",[255,256,257],"em",{},"combobox with listbox popup"," pattern: type to filter, navigate with the keyboard via\nactive-descendant, and pick a single option. It owns the behaviour (open\u002Fclose, filtering, the\nhighlight, selection, and the full keyboard) and the ARIA wiring as ready-to-bind prop bags; ",[250,260,261],{},"you own\nthe markup and styles",".",[246,264,265,266,269,270,277,278,283,284,288,289,293,294,296,297,300,301,304,305,310,311,315],{},"This is the ",[250,267,268],{},"Vue"," binding; the framework-agnostic core lives in ",[271,272,273],"a",{"href":161},[274,275,276],"code",{},"@oriui\u002Fheadless",",\nand the styled ",[271,279,280],{"href":37},[274,281,282],{},"OriCombobox"," is built on it. Unlike\n",[271,285,286],{"href":173},[274,287,174],{}," \u002F ",[271,290,291],{"href":177},[274,292,178],{}," lean on a\nzero-dependency native platform default; a combobox has no native primitive, so ",[274,295,170],{},"'s\n",[250,298,299],{},"default"," is the core ",[250,302,303],{},"state machine + prop-getters",". Like the overlays it still resolves through the\n",[271,306,307],{"href":161},[274,308,309],{},"OriHeadless"," contract, so an app can swap a custom \u002F Zag-backed engine — the native\ncore adapter is simply the default. It is the first behavior to fully exercise the\n",[271,312,313],{"href":161},[274,314,276],{}," engine.",[317,318,320],"h2",{"id":319},"import","Import",[322,323,328],"pre",{"className":324,"code":325,"language":326,"meta":327,"style":327},"language-ts shiki shiki-themes github-light github-dark","import { useCombobox } from '@oriui\u002Fheadless\u002Fvue';\n","ts","",[274,329,330],{"__ignoreMap":327},[331,332,335,338,342,345,349],"span",{"class":333,"line":334},"line",1,[331,336,319],{"class":337},"szBVR",[331,339,341],{"class":340},"sVt8B"," { useCombobox } ",[331,343,344],{"class":337},"from",[331,346,348],{"class":347},"sZZnC"," '@oriui\u002Fheadless\u002Fvue'",[331,350,351],{"class":340},";\n",[317,353,355],{"id":354},"options","Options",[246,357,358,359,362,363,365,366,369,370,373,374,377,378,381,382,385],{},"Pass an options object — or a getter returning one, to stay reactive (the styled component passes\n",[274,360,361],{},"() => ({ … })","). ",[274,364,354],{},", ",[274,367,368],{},"disabled",", and ",[274,371,372],{},"filter"," are read live; ",[274,375,376],{},"id"," and the initial ",[274,379,380],{},"value"," \u002F\n",[274,383,384],{},"inputValue"," are read once at setup.",[387,388,389,408],"table",{},[390,391,392],"thead",{},[393,394,395,399,402,405],"tr",{},[396,397,398],"th",{},"Option",[396,400,401],{},"Type",[396,403,404],{},"Default",[396,406,407],{},"Description",[409,410,411,431,452,471,489,508],"tbody",{},[393,412,413,418,423,428],{},[414,415,416],"td",{},[274,417,354],{},[414,419,420],{},[274,421,422],{},"ComboboxItem[]",[414,424,425],{},[250,426,427],{},"required",[414,429,430],{},"The full option list. Reactive — filtering re-runs when it changes.",[393,432,433,437,442,449],{},[414,434,435],{},[274,436,376],{},[414,438,439],{},[274,440,441],{},"string",[414,443,444,445,448],{},"auto (",[274,446,447],{},"useId",")",[414,450,451],{},"Stable base id for the part ARIA wiring; auto-generated when omitted (pass one for stable SSR).",[393,453,454,458,463,468],{},[414,455,456],{},[274,457,380],{},[414,459,460],{},[274,461,462],{},"string | null",[414,464,465],{},[274,466,467],{},"null",[414,469,470],{},"Initial selected value (uncontrolled).",[393,472,473,477,481,486],{},[414,474,475],{},[274,476,384],{},[414,478,479],{},[274,480,441],{},[414,482,483],{},[274,484,485],{},"''",[414,487,488],{},"Initial input text (uncontrolled).",[393,490,491,495,500,505],{},[414,492,493],{},[274,494,368],{},[414,496,497],{},[274,498,499],{},"boolean",[414,501,502],{},[274,503,504],{},"false",[414,506,507],{},"Disable the control; also closes the listbox.",[393,509,510,514,519,522],{},[414,511,512],{},[274,513,372],{},[414,515,516],{},[274,517,518],{},"(item: ComboboxItem, query: string) => boolean",[414,520,521],{},"substring",[414,523,524],{},"Filter predicate; default = case-insensitive substring on the label. Swap for fuzzy \u002F async.",[246,526,527,528,531,532,534,535,538],{},"Each option is a ",[274,529,530],{},"ComboboxItem"," — ",[274,533,380],{}," is the stable identity, ",[274,536,537],{},"label"," is what the input shows:",[322,540,542],{"className":324,"code":541,"language":326,"meta":327,"style":327},"interface ComboboxItem {\n    value: string;\n    label: string;\n    disabled?: boolean;\n}\n",[274,543,544,556,572,584,598],{"__ignoreMap":327},[331,545,546,549,553],{"class":333,"line":334},[331,547,548],{"class":337},"interface",[331,550,552],{"class":551},"sScJk"," ComboboxItem",[331,554,555],{"class":340}," {\n",[331,557,559,563,566,570],{"class":333,"line":558},2,[331,560,562],{"class":561},"s4XuR","    value",[331,564,565],{"class":337},":",[331,567,569],{"class":568},"sj4cs"," string",[331,571,351],{"class":340},[331,573,575,578,580,582],{"class":333,"line":574},3,[331,576,577],{"class":561},"    label",[331,579,565],{"class":337},[331,581,569],{"class":568},[331,583,351],{"class":340},[331,585,587,590,593,596],{"class":333,"line":586},4,[331,588,589],{"class":561},"    disabled",[331,591,592],{"class":337},"?:",[331,594,595],{"class":568}," boolean",[331,597,351],{"class":340},[331,599,601],{"class":333,"line":600},5,[331,602,603],{"class":340},"}\n",[317,605,607],{"id":606},"returns","Returns",[246,609,610,611,614,615,618,619,622,623,288,626,629],{},"A control object — the reactive state plus the prop bags you bind to each part. Every ",[274,612,613],{},"*Props"," value is\na ",[274,616,617],{},"ComputedRef","; bind it with ",[274,620,621],{},"v-bind",". The ",[274,624,625],{},"get*",[274,627,628],{},"set*"," and the action members are plain functions.",[387,631,632,643],{},[390,633,634],{},[393,635,636,639,641],{},[396,637,638],{},"Property",[396,640,401],{},[396,642,407],{},[409,644,645,660,679,693,711,729,748,772,791,821,842,858,882,913,931,946,961,979],{},[393,646,647,652,657],{},[414,648,649],{},[274,650,651],{},"open",[414,653,654],{},[274,655,656],{},"ComputedRef\u003Cboolean>",[414,658,659],{},"Whether the listbox is open.",[393,661,662,666,671],{},[414,663,664],{},[274,665,380],{},[414,667,668],{},[274,669,670],{},"ComputedRef\u003Cstring | null>",[414,672,673,674,676,677,262],{},"The selected option's ",[274,675,380],{},", or ",[274,678,467],{},[393,680,681,685,690],{},[414,682,683],{},[274,684,384],{},[414,686,687],{},[274,688,689],{},"ComputedRef\u003Cstring>",[414,691,692],{},"The current input text.",[393,694,695,700,704],{},[414,696,697],{},[274,698,699],{},"highlightedValue",[414,701,702],{},[274,703,670],{},[414,705,706,707,676,709,262],{},"The active (keyboard-highlighted) option's ",[274,708,380],{},[274,710,467],{},[393,712,713,718,723],{},[414,714,715],{},[274,716,717],{},"items",[414,719,720],{},[274,721,722],{},"ComputedRef\u003CComboboxItem[]>",[414,724,725,726,262],{},"The visible (filtered) options — render these, and pass their index into ",[274,727,728],{},"getOptionProps",[393,730,731,736,741],{},[414,732,733],{},[274,734,735],{},"rootProps",[414,737,738],{},[274,739,740],{},"ComputedRef\u003Cobject>",[414,742,743,744,747],{},"The wrapper element (",[274,745,746],{},"data-state",").",[393,749,750,755,759],{},[414,751,752],{},[274,753,754],{},"labelProps",[414,756,757],{},[274,758,740],{},[414,760,761,762,765,766,288,768,771],{},"The ",[274,763,764],{},"\u003Clabel>"," wiring (",[274,767,376],{},[274,769,770],{},"for"," → the input).",[393,773,774,779,783],{},[414,775,776],{},[274,777,778],{},"controlProps",[414,780,781],{},[274,782,740],{},[414,784,785,786,288,788,747],{},"The control wrapper around input + triggers (",[274,787,746],{},[274,789,790],{},"data-disabled",[393,792,793,798,802],{},[414,794,795],{},[274,796,797],{},"inputProps",[414,799,800],{},[274,801,740],{},[414,803,761,804,807,808,288,811,288,814,288,817,820],{},[274,805,806],{},"role=\"combobox\""," input: ",[274,809,810],{},"aria-autocomplete",[274,812,813],{},"aria-expanded",[274,815,816],{},"aria-controls",[274,818,819],{},"aria-activedescendant"," plus the input & keydown handlers.",[393,822,823,828,832],{},[414,824,825],{},[274,826,827],{},"triggerProps",[414,829,830],{},[274,831,740],{},[414,833,834,835,365,838,288,840,747],{},"The open\u002Fclose toggle button (",[274,836,837],{},"tabindex=\"-1\"",[274,839,813],{},[274,841,816],{},[393,843,844,849,853],{},[414,845,846],{},[274,847,848],{},"clearTriggerProps",[414,850,851],{},[274,852,740],{},[414,854,855,856,747],{},"The clear button (",[274,857,837],{},[393,859,860,865,869],{},[414,861,862],{},[274,863,864],{},"listboxProps",[414,866,867],{},[274,868,740],{},[414,870,761,871,874,875,365,878,881],{},[274,872,873],{},"role=\"listbox\""," popup (",[274,876,877],{},"aria-labelledby",[274,879,880],{},"hidden"," while closed).",[393,883,884,889,894],{},[414,885,886],{},[274,887,888],{},"getOptionProps(item, index)",[414,890,891],{},[274,892,893],{},"(item: ComboboxItem, index: number) => object",[414,895,896,897,365,900,365,903,906,907,910,911,262],{},"Per-option prop bag (",[274,898,899],{},"role=\"option\"",[274,901,902],{},"aria-selected",[274,904,905],{},"data-highlighted",", click \u002F pointermove). ",[274,908,909],{},"index"," must be the position in ",[274,912,717],{},[393,914,915,920,925],{},[414,916,917],{},[274,918,919],{},"getOptionState(item)",[414,921,922],{},[274,923,924],{},"(item: ComboboxItem) => { highlighted: boolean; selected: boolean }",[414,926,761,927,930],{},[274,928,929],{},"{ highlighted, selected }"," state for the item — for conditional classes.",[393,932,933,938,943],{},[414,934,935],{},[274,936,937],{},"setOpen(open)",[414,939,940],{},[274,941,942],{},"(open: boolean) => void",[414,944,945],{},"Open \u002F close the listbox imperatively.",[393,947,948,953,958],{},[414,949,950],{},[274,951,952],{},"setInputValue(next)",[414,954,955],{},[274,956,957],{},"(next: string) => void",[414,959,960],{},"Set the input text (filters and opens).",[393,962,963,968,973],{},[414,964,965],{},[274,966,967],{},"select(item)",[414,969,970],{},[274,971,972],{},"(item: ComboboxItem) => void",[414,974,975,976,978],{},"Commit a selection — reflects its ",[274,977,537],{}," into the input and closes.",[393,980,981,986,991],{},[414,982,983],{},[274,984,985],{},"clear()",[414,987,988],{},[274,989,990],{},"() => void",[414,992,993],{},"Clear the selection and the input.",[317,995,997],{"id":996},"usage","Usage",[246,999,1000,1001,1003,1004,1006,1007,1009,1010,565],{},"Bind each part's prop bag with ",[274,1002,621],{},", render ",[274,1005,717],{},", and pass the same ",[274,1008,909],{}," you iterate with into\n",[274,1011,728],{},[322,1013,1017],{"className":1014,"code":1015,"language":1016,"meta":327,"style":327},"language-vue shiki shiki-themes github-light github-dark","\u003Cscript setup lang=\"ts\">\nimport { useCombobox } from '@oriui\u002Fheadless\u002Fvue';\n\nconst cb = useCombobox(() => ({\n    options: [\n        { label: 'Apple', value: 'apple' },\n        { label: 'Banana', value: 'banana' },\n        { label: 'Cherry', value: 'cherry' }\n    ]\n}));\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n    \u003Cdiv v-bind=\"cb.rootProps.value\">\n        \u003Clabel v-bind=\"cb.labelProps.value\">Fruit\u003C\u002Flabel>\n\n        \u003Cdiv v-bind=\"cb.controlProps.value\">\n            \u003Cinput v-bind=\"cb.inputProps.value\" placeholder=\"Search a fruit…\" @blur=\"cb.setOpen(false)\" \u002F>\n            \u003Cbutton v-bind=\"cb.triggerProps.value\">▾\u003C\u002Fbutton>\n\n            \u003Cul v-bind=\"cb.listboxProps.value\">\n                \u003Cli\n                    v-for=\"(item, index) in cb.items.value\"\n                    :key=\"item.value\"\n                    v-bind=\"cb.getOptionProps(item, index)\"\n                    :data-selected=\"cb.getOptionState(item).selected\"\n                >\n                    {{ item.label }}\n                \u003C\u002Fli>\n            \u003C\u002Ful>\n        \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n\u003C\u002Ftemplate>\n","vue",[274,1018,1019,1043,1055,1061,1084,1089,1107,1122,1138,1144,1150,1160,1165,1175,1194,1216,1221,1237,1272,1294,1299,1316,1325,1336,1347,1358,1369,1375,1381,1392,1402,1412,1422],{"__ignoreMap":327},[331,1020,1021,1024,1028,1031,1034,1037,1040],{"class":333,"line":334},[331,1022,1023],{"class":340},"\u003C",[331,1025,1027],{"class":1026},"s9eBZ","script",[331,1029,1030],{"class":551}," setup",[331,1032,1033],{"class":551}," lang",[331,1035,1036],{"class":340},"=",[331,1038,1039],{"class":347},"\"ts\"",[331,1041,1042],{"class":340},">\n",[331,1044,1045,1047,1049,1051,1053],{"class":333,"line":558},[331,1046,319],{"class":337},[331,1048,341],{"class":340},[331,1050,344],{"class":337},[331,1052,348],{"class":347},[331,1054,351],{"class":340},[331,1056,1057],{"class":333,"line":574},[331,1058,1060],{"emptyLinePlaceholder":1059},true,"\n",[331,1062,1063,1066,1069,1072,1075,1078,1081],{"class":333,"line":586},[331,1064,1065],{"class":337},"const",[331,1067,1068],{"class":568}," cb",[331,1070,1071],{"class":337}," =",[331,1073,1074],{"class":551}," useCombobox",[331,1076,1077],{"class":340},"(() ",[331,1079,1080],{"class":337},"=>",[331,1082,1083],{"class":340}," ({\n",[331,1085,1086],{"class":333,"line":600},[331,1087,1088],{"class":340},"    options: [\n",[331,1090,1092,1095,1098,1101,1104],{"class":333,"line":1091},6,[331,1093,1094],{"class":340},"        { label: ",[331,1096,1097],{"class":347},"'Apple'",[331,1099,1100],{"class":340},", value: ",[331,1102,1103],{"class":347},"'apple'",[331,1105,1106],{"class":340}," },\n",[331,1108,1110,1112,1115,1117,1120],{"class":333,"line":1109},7,[331,1111,1094],{"class":340},[331,1113,1114],{"class":347},"'Banana'",[331,1116,1100],{"class":340},[331,1118,1119],{"class":347},"'banana'",[331,1121,1106],{"class":340},[331,1123,1125,1127,1130,1132,1135],{"class":333,"line":1124},8,[331,1126,1094],{"class":340},[331,1128,1129],{"class":347},"'Cherry'",[331,1131,1100],{"class":340},[331,1133,1134],{"class":347},"'cherry'",[331,1136,1137],{"class":340}," }\n",[331,1139,1141],{"class":333,"line":1140},9,[331,1142,1143],{"class":340},"    ]\n",[331,1145,1147],{"class":333,"line":1146},10,[331,1148,1149],{"class":340},"}));\n",[331,1151,1153,1156,1158],{"class":333,"line":1152},11,[331,1154,1155],{"class":340},"\u003C\u002F",[331,1157,1027],{"class":1026},[331,1159,1042],{"class":340},[331,1161,1163],{"class":333,"line":1162},12,[331,1164,1060],{"emptyLinePlaceholder":1059},[331,1166,1168,1170,1173],{"class":333,"line":1167},13,[331,1169,1023],{"class":340},[331,1171,1172],{"class":1026},"template",[331,1174,1042],{"class":340},[331,1176,1178,1181,1184,1187,1189,1192],{"class":333,"line":1177},14,[331,1179,1180],{"class":340},"    \u003C",[331,1182,1183],{"class":1026},"div",[331,1185,1186],{"class":551}," v-bind",[331,1188,1036],{"class":340},[331,1190,1191],{"class":347},"\"cb.rootProps.value\"",[331,1193,1042],{"class":340},[331,1195,1197,1200,1202,1204,1206,1209,1212,1214],{"class":333,"line":1196},15,[331,1198,1199],{"class":340},"        \u003C",[331,1201,537],{"class":1026},[331,1203,1186],{"class":551},[331,1205,1036],{"class":340},[331,1207,1208],{"class":347},"\"cb.labelProps.value\"",[331,1210,1211],{"class":340},">Fruit\u003C\u002F",[331,1213,537],{"class":1026},[331,1215,1042],{"class":340},[331,1217,1219],{"class":333,"line":1218},16,[331,1220,1060],{"emptyLinePlaceholder":1059},[331,1222,1224,1226,1228,1230,1232,1235],{"class":333,"line":1223},17,[331,1225,1199],{"class":340},[331,1227,1183],{"class":1026},[331,1229,1186],{"class":551},[331,1231,1036],{"class":340},[331,1233,1234],{"class":347},"\"cb.controlProps.value\"",[331,1236,1042],{"class":340},[331,1238,1240,1243,1246,1248,1250,1253,1256,1258,1261,1264,1266,1269],{"class":333,"line":1239},18,[331,1241,1242],{"class":340},"            \u003C",[331,1244,1245],{"class":1026},"input",[331,1247,1186],{"class":551},[331,1249,1036],{"class":340},[331,1251,1252],{"class":347},"\"cb.inputProps.value\"",[331,1254,1255],{"class":551}," placeholder",[331,1257,1036],{"class":340},[331,1259,1260],{"class":347},"\"Search a fruit…\"",[331,1262,1263],{"class":551}," @blur",[331,1265,1036],{"class":340},[331,1267,1268],{"class":347},"\"cb.setOpen(false)\"",[331,1270,1271],{"class":340}," \u002F>\n",[331,1273,1275,1277,1280,1282,1284,1287,1290,1292],{"class":333,"line":1274},19,[331,1276,1242],{"class":340},[331,1278,1279],{"class":1026},"button",[331,1281,1186],{"class":551},[331,1283,1036],{"class":340},[331,1285,1286],{"class":347},"\"cb.triggerProps.value\"",[331,1288,1289],{"class":340},">▾\u003C\u002F",[331,1291,1279],{"class":1026},[331,1293,1042],{"class":340},[331,1295,1297],{"class":333,"line":1296},20,[331,1298,1060],{"emptyLinePlaceholder":1059},[331,1300,1302,1304,1307,1309,1311,1314],{"class":333,"line":1301},21,[331,1303,1242],{"class":340},[331,1305,1306],{"class":1026},"ul",[331,1308,1186],{"class":551},[331,1310,1036],{"class":340},[331,1312,1313],{"class":347},"\"cb.listboxProps.value\"",[331,1315,1042],{"class":340},[331,1317,1319,1322],{"class":333,"line":1318},22,[331,1320,1321],{"class":340},"                \u003C",[331,1323,1324],{"class":1026},"li\n",[331,1326,1328,1331,1333],{"class":333,"line":1327},23,[331,1329,1330],{"class":551},"                    v-for",[331,1332,1036],{"class":340},[331,1334,1335],{"class":347},"\"(item, index) in cb.items.value\"\n",[331,1337,1339,1342,1344],{"class":333,"line":1338},24,[331,1340,1341],{"class":551},"                    :key",[331,1343,1036],{"class":340},[331,1345,1346],{"class":347},"\"item.value\"\n",[331,1348,1350,1353,1355],{"class":333,"line":1349},25,[331,1351,1352],{"class":551},"                    v-bind",[331,1354,1036],{"class":340},[331,1356,1357],{"class":347},"\"cb.getOptionProps(item, index)\"\n",[331,1359,1361,1364,1366],{"class":333,"line":1360},26,[331,1362,1363],{"class":551},"                    :data-selected",[331,1365,1036],{"class":340},[331,1367,1368],{"class":347},"\"cb.getOptionState(item).selected\"\n",[331,1370,1372],{"class":333,"line":1371},27,[331,1373,1374],{"class":340},"                >\n",[331,1376,1378],{"class":333,"line":1377},28,[331,1379,1380],{"class":340},"                    {{ item.label }}\n",[331,1382,1384,1387,1390],{"class":333,"line":1383},29,[331,1385,1386],{"class":340},"                \u003C\u002F",[331,1388,1389],{"class":1026},"li",[331,1391,1042],{"class":340},[331,1393,1395,1398,1400],{"class":333,"line":1394},30,[331,1396,1397],{"class":340},"            \u003C\u002F",[331,1399,1306],{"class":1026},[331,1401,1042],{"class":340},[331,1403,1405,1408,1410],{"class":333,"line":1404},31,[331,1406,1407],{"class":340},"        \u003C\u002F",[331,1409,1183],{"class":1026},[331,1411,1042],{"class":340},[331,1413,1415,1418,1420],{"class":333,"line":1414},32,[331,1416,1417],{"class":340},"    \u003C\u002F",[331,1419,1183],{"class":1026},[331,1421,1042],{"class":340},[331,1423,1425,1427,1429],{"class":333,"line":1424},33,[331,1426,1155],{"class":340},[331,1428,1172],{"class":1026},[331,1430,1042],{"class":340},[246,1432,1433,1434,1437,1438,1442,1443,1445,1446,1448,1449,1452],{},"The machine keeps no notion of validation, ",[274,1435,1436],{},"v-model",", or blur-to-close — those live in the consumer. The\nstyled ",[271,1439,1440],{"href":37},[274,1441,282],{}," wraps exactly this pattern and layers the form contract\n(label \u002F hint \u002F error \u002F ",[274,1444,427],{},"), ",[274,1447,1436],{}," sync, and ",[274,1450,1451],{},"@blur=\"setOpen(false)\""," on top.",[246,1454,761,1455,1458,1459,1462,1463,1466],{},[250,1456,1457],{},"Svelte"," binding is the same — the composable returns stores (auto-subscribe with ",[274,1460,1461],{},"$","), and the\nitem prop-getters are a store of a function (",[274,1464,1465],{},"$getOptionProps(item, i)","):",[322,1468,1472],{"className":1469,"code":1470,"language":1471,"meta":327,"style":327},"language-svelte shiki shiki-themes github-light github-dark","\u003Cscript>\n    import { useCombobox } from '@oriui\u002Fheadless\u002Fsvelte';\n\n    const { items, rootProps, labelProps, controlProps, inputProps, triggerProps, listboxProps, getOptionProps, getOptionState, setOpen } =\n        useCombobox({\n            options: [\n                { label: 'Apple', value: 'apple' },\n                { label: 'Banana', value: 'banana' },\n                { label: 'Cherry', value: 'cherry' }\n            ]\n        });\n\u003C\u002Fscript>\n\n\u003Cdiv {...$rootProps}>\n    \u003Clabel {...$labelProps}>Fruit\u003C\u002Flabel>\n\n    \u003Cdiv {...$controlProps}>\n        \u003Cinput {...$inputProps} placeholder=\"Search a fruit…\" on:blur={() => setOpen(false)} \u002F>\n        \u003Cbutton {...$triggerProps}>▾\u003C\u002Fbutton>\n\n        \u003Cul {...$listboxProps}>\n            {#each $items as item, i}\n                \u003Cli {...$getOptionProps(item, i)} data-selected={$getOptionState(item).selected}>\n                    {item.label}\n                \u003C\u002Fli>\n            {\u002Feach}\n        \u003C\u002Ful>\n    \u003C\u002Fdiv>\n\u003C\u002Fdiv>\n","svelte",[274,1473,1474,1479,1484,1488,1493,1498,1503,1508,1513,1518,1523,1528,1533,1537,1542,1547,1551,1556,1561,1566,1570,1575,1580,1585,1590,1595,1600,1605,1610],{"__ignoreMap":327},[331,1475,1476],{"class":333,"line":334},[331,1477,1478],{},"\u003Cscript>\n",[331,1480,1481],{"class":333,"line":558},[331,1482,1483],{},"    import { useCombobox } from '@oriui\u002Fheadless\u002Fsvelte';\n",[331,1485,1486],{"class":333,"line":574},[331,1487,1060],{"emptyLinePlaceholder":1059},[331,1489,1490],{"class":333,"line":586},[331,1491,1492],{},"    const { items, rootProps, labelProps, controlProps, inputProps, triggerProps, listboxProps, getOptionProps, getOptionState, setOpen } =\n",[331,1494,1495],{"class":333,"line":600},[331,1496,1497],{},"        useCombobox({\n",[331,1499,1500],{"class":333,"line":1091},[331,1501,1502],{},"            options: [\n",[331,1504,1505],{"class":333,"line":1109},[331,1506,1507],{},"                { label: 'Apple', value: 'apple' },\n",[331,1509,1510],{"class":333,"line":1124},[331,1511,1512],{},"                { label: 'Banana', value: 'banana' },\n",[331,1514,1515],{"class":333,"line":1140},[331,1516,1517],{},"                { label: 'Cherry', value: 'cherry' }\n",[331,1519,1520],{"class":333,"line":1146},[331,1521,1522],{},"            ]\n",[331,1524,1525],{"class":333,"line":1152},[331,1526,1527],{},"        });\n",[331,1529,1530],{"class":333,"line":1162},[331,1531,1532],{},"\u003C\u002Fscript>\n",[331,1534,1535],{"class":333,"line":1167},[331,1536,1060],{"emptyLinePlaceholder":1059},[331,1538,1539],{"class":333,"line":1177},[331,1540,1541],{},"\u003Cdiv {...$rootProps}>\n",[331,1543,1544],{"class":333,"line":1196},[331,1545,1546],{},"    \u003Clabel {...$labelProps}>Fruit\u003C\u002Flabel>\n",[331,1548,1549],{"class":333,"line":1218},[331,1550,1060],{"emptyLinePlaceholder":1059},[331,1552,1553],{"class":333,"line":1223},[331,1554,1555],{},"    \u003Cdiv {...$controlProps}>\n",[331,1557,1558],{"class":333,"line":1239},[331,1559,1560],{},"        \u003Cinput {...$inputProps} placeholder=\"Search a fruit…\" on:blur={() => setOpen(false)} \u002F>\n",[331,1562,1563],{"class":333,"line":1274},[331,1564,1565],{},"        \u003Cbutton {...$triggerProps}>▾\u003C\u002Fbutton>\n",[331,1567,1568],{"class":333,"line":1296},[331,1569,1060],{"emptyLinePlaceholder":1059},[331,1571,1572],{"class":333,"line":1301},[331,1573,1574],{},"        \u003Cul {...$listboxProps}>\n",[331,1576,1577],{"class":333,"line":1318},[331,1578,1579],{},"            {#each $items as item, i}\n",[331,1581,1582],{"class":333,"line":1327},[331,1583,1584],{},"                \u003Cli {...$getOptionProps(item, i)} data-selected={$getOptionState(item).selected}>\n",[331,1586,1587],{"class":333,"line":1338},[331,1588,1589],{},"                    {item.label}\n",[331,1591,1592],{"class":333,"line":1349},[331,1593,1594],{},"                \u003C\u002Fli>\n",[331,1596,1597],{"class":333,"line":1360},[331,1598,1599],{},"            {\u002Feach}\n",[331,1601,1602],{"class":333,"line":1371},[331,1603,1604],{},"        \u003C\u002Ful>\n",[331,1606,1607],{"class":333,"line":1377},[331,1608,1609],{},"    \u003C\u002Fdiv>\n",[331,1611,1612],{"class":333,"line":1383},[331,1613,1614],{},"\u003C\u002Fdiv>\n",[246,1616,1617,1618,1621,1622,262],{},"In Svelte the options are a ",[274,1619,1620],{},"MaybeReactive"," — pass a store instead of a plain object to react to a\nchanging option list or ",[274,1623,368],{},[317,1625,210],{"id":1626},"accessibility",[246,1628,1629,1630,1632],{},"Implements the WAI-ARIA ",[250,1631,257],{}," pattern; the prop bags carry the wiring.",[1306,1634,1635,1662,1696,1709,1731],{},[1389,1636,1637,1639,1640,1642,1643,365,1646,1649,1650,369,1652,1654,1655,1657,1658,1661],{},[274,1638,797],{}," set ",[274,1641,806],{}," with ",[274,1644,1645],{},"aria-autocomplete=\"list\"",[274,1647,1648],{},"autocomplete=\"off\"",",\n",[274,1651,813],{},[274,1653,816],{}," pointing at the listbox; the highlighted option is referenced by\n",[274,1656,819],{}," — focus never leaves the input, so no roving ",[274,1659,1660],{},"tabindex"," is needed.",[1389,1663,1664,1639,1666,365,1668,1670,1671,1673,1674,1676,1677,1679,1680,1642,1682,1684,1685,1688,1689,1691,1692,1695],{},[274,1665,864],{},[274,1667,873],{},[274,1669,877],{}," (the element you bind ",[274,1672,754],{}," to), and\n",[274,1675,880],{}," while closed. Options from ",[274,1678,728],{}," are ",[274,1681,899],{},[274,1683,902],{},"; a\ndisabled item carries ",[274,1686,1687],{},"aria-disabled"," and is skipped by keyboard navigation. Each option also exposes\n",[274,1690,905],{}," (active) and ",[274,1693,1694],{},"data-state=\"checked|unchecked\""," for styling.",[1389,1697,1698,288,1700,1679,1702,1704,1705,288,1707,262],{},[274,1699,827],{},[274,1701,848],{},[274,1703,837],{}," buttons (the input keeps focus) with\naccessible labels (\"Open \u002F Close suggestions\", \"Clear selection\"); the trigger also carries\n",[274,1706,813],{},[274,1708,816],{},[1389,1710,1711,1712,1714,1715,1718,1719,1722,1723,1726,1727,1730],{},"Selecting an option reflects its ",[274,1713,537],{}," into the input and closes the list. The machine does ",[250,1716,1717],{},"not","\ndismiss on blur — wire ",[274,1720,1721],{},"setOpen(false)"," on the input's ",[274,1724,1725],{},"blur"," yourself (as the example and the styled\ncomponent do); ",[274,1728,1729],{},"Tab"," therefore moves focus away but does not itself close the list.",[1389,1732,1733,1734,1736,1737,1739,1740,1742,1743,676,1745,1747],{},"Option ids are derived from the position in ",[274,1735,717],{},", so always pass the same ",[274,1738,909],{}," you iterate\n",[274,1741,717],{}," with into ",[274,1744,888],{},[274,1746,819],{}," will point at the wrong row.",[387,1749,1750,1760],{},[390,1751,1752],{},[393,1753,1754,1757],{},[396,1755,1756],{},"Key",[396,1758,1759],{},"Action",[409,1761,1762,1775,1788,1798,1808],{},[393,1763,1764,1772],{},[414,1765,1766,288,1769],{},[274,1767,1768],{},"↓",[274,1770,1771],{},"↑",[414,1773,1774],{},"Open the list (if closed) and move the highlight to the next \u002F previous enabled option (wraps).",[393,1776,1777,1785],{},[414,1778,1779,288,1782],{},[274,1780,1781],{},"Home",[274,1783,1784],{},"End",[414,1786,1787],{},"Highlight the first \u002F last enabled option (when open).",[393,1789,1790,1795],{},[414,1791,1792],{},[274,1793,1794],{},"Enter",[414,1796,1797],{},"Select the highlighted option (when open).",[393,1799,1800,1805],{},[414,1801,1802],{},[274,1803,1804],{},"Escape",[414,1806,1807],{},"Close the list (when open).",[393,1809,1810,1812],{},[414,1811,401],{},[414,1813,1814],{},"Filter the options and (re)open the list.",[317,1816,1818],{"id":1817},"see-also","See also",[1306,1820,1821,1826,1831,1842],{},[1389,1822,1823,1825],{},[271,1824,276],{"href":161}," — the framework-agnostic contract and the core state machine.",[1389,1827,1828,1830],{},[271,1829,282],{"href":37}," — the styled component built on this primitive.",[1389,1832,1833,1835,1836,1838,1839,1841],{},[271,1834,174],{"href":173}," · ",[271,1837,178],{"href":177}," ·\n",[271,1840,194],{"href":193}," — the other headless primitives.",[1389,1843,1844,1847,1848,1851],{},[271,1845,1846],{"href":141},"CSS layer"," — the standalone ",[274,1849,1850],{},".ori-combobox"," classes for the parts.",[1853,1854,1855],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":327,"searchDepth":558,"depth":558,"links":1857},[1858,1859,1860,1861,1862,1863],{"id":319,"depth":558,"text":320},{"id":354,"depth":558,"text":355},{"id":606,"depth":558,"text":607},{"id":996,"depth":558,"text":997},{"id":1626,"depth":558,"text":210},{"id":1817,"depth":558,"text":1818},"md",{},{"title":170,"description":171},"headless\u002Fuse-combobox","UEKJZGInvleZ57mBmk9umSNG6Ujt6rTrNr-PFkH22uA",1783874706993]