@stackline/react-multiselect-dropdown 19.0.2 → 19.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @stackline/react-multiselect-dropdown
2
2
 
3
- > A maintained React multiselect dropdown for React 19 applications, with controlled React state, searchable/grouped options, lazy loading hooks, custom render functions, skins, body-overlay positioning, and ADA-compliant keyboard/ARIA behavior.
3
+ > A maintained React multiselect dropdown for React 19 applications, with controlled React state, custom slots, headless/state hooks, searchable/grouped options, lazy loading hooks, custom render functions, skins, body-overlay positioning, and accessibility-focused and keyboard/ARIA tested behavior.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@stackline/react-multiselect-dropdown.svg?style=flat-square)](https://www.npmjs.com/package/@stackline/react-multiselect-dropdown)
6
6
  [![npm downloads](https://img.shields.io/npm/dt/@stackline/react-multiselect-dropdown.svg?style=flat-square)](https://www.npmjs.com/package/@stackline/react-multiselect-dropdown)
@@ -12,7 +12,7 @@
12
12
 
13
13
  **[Documentation & Live Demos](https://alexandro.net/docs/react/multiselect/)** | **[React 19 Demo](https://alexandro.net/docs/react/multiselect/react-19/)** | **[React 19 StackBlitz](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Fbasic%2Fbasic.component.tsx&startScript=start&initialpath=%2Fbasic)** | **[npm](https://www.npmjs.com/package/@stackline/react-multiselect-dropdown)** | **[Issues](https://github.com/alexandroit/react-multiselect-dropdown/issues)** | **[Repository](https://github.com/alexandroit/react-multiselect-dropdown)**
14
14
 
15
- **Latest tested package release:** `19.0.2` for React `19.x`
15
+ **Latest React 19 release:** `19.1.0` for React `19.x`
16
16
 
17
17
  ---
18
18
 
@@ -24,9 +24,9 @@
24
24
 
25
25
  `@stackline/react-multiselect-dropdown` provides a maintained React multiselect component for applications that need predictable selection state, search, grouping, skins, keyboard support, and live tested examples.
26
26
 
27
- The package is built around a controlled React API: pass `data`, bind `selectedItems`, receive updates through `onChange`, and customize behavior through a `settings` object. It also supports custom React render functions for option rows and selected badges, lazy loading callbacks, imperative `ref` methods, and body-overlay positioning for dialogs or clipped containers.
27
+ The package is built around a controlled React API: pass `data`, bind `selectedItems`, receive updates through `onChange`, and customize behavior through a `settings` object. It also supports a Slots API for replacing component structure without losing ARIA/focus behavior, a headless `useMultiSelectDropdown` hook, a lower-level `useMultiSelectState` hook, custom React render functions for option rows and selected badges, lazy loading callbacks, imperative `ref` methods, and body-overlay positioning for dialogs or clipped containers.
28
28
 
29
- The current package release is `19.0.2` for React 19.x applications. It was tested in a clean React `19.2.4` application before public npm publication. This patch keeps the React 19 line aligned with the Angular visual contract and centers placeholder/single-value text vertically while preserving left alignment.
29
+ The current stable React 19 release is `19.1.0`. It adds guided structural slots, a headless hook, a state hook, a type-safe factory helper, and a strengthened combobox contract while keeping the styled `<MultiSelectDropdown />` component compatible with the existing visual contract.
30
30
 
31
31
  ## Features
32
32
 
@@ -35,6 +35,9 @@ The current package release is `19.0.2` for React 19.x applications. It was test
35
35
  | React 19 tested release line | Yes |
36
36
  | Multi-select and single-select modes | Yes |
37
37
  | Controlled and uncontrolled selection | Yes |
38
+ | Guided Slots API for custom HTML structure | Yes |
39
+ | Headless `useMultiSelectDropdown` hook | Yes |
40
+ | State-only `useMultiSelectState` hook | Yes |
38
41
  | Search and filter | Yes |
39
42
  | Group by field | Yes |
40
43
  | Custom item render functions | Yes |
@@ -43,7 +46,11 @@ The current package release is `19.0.2` for React 19.x applications. It was test
43
46
  | Add-new-item from search text | Yes |
44
47
  | Ref methods for open, close, focus, select all, and clear | Yes |
45
48
  | Built-in `classic`, `material`, `dark`, `custom`, and `brand` skins | Yes |
46
- | ADA-compliant keyboard navigation, focus states, and ARIA labels | Yes |
49
+ | Accessibility-focused and keyboard/ARIA tested navigation, focus states, and ARIA labels | Yes |
50
+ | Multiselect options expose both `aria-selected` and `aria-checked` | Yes |
51
+ | Backspace/Escape combobox contract | Yes |
52
+ | Async add-item stale response protection | Yes |
53
+ | Selected object preservation across async data refreshes | Yes |
47
54
  | Dialog and overflow-container support through `appendToBody` / `tagToBody` | Yes |
48
55
  | Left-aligned, vertically centered placeholder and single-value text | Yes |
49
56
  | Versioned docs builds per React line | Yes |
@@ -55,16 +62,20 @@ The current package release is `19.0.2` for React 19.x applications. It was test
55
62
  3. [Setup](#setup)
56
63
  4. [Styling and Skins](#styling-and-skins)
57
64
  5. [Basic Usage](#basic-usage)
58
- 6. [React 19 StackBlitz Playground](#react-19-stackblitz-playground)
59
- 7. [Official React 19 Test Matrix](#official-react-19-test-matrix)
60
- 8. [Custom Render Functions](#custom-render-functions)
61
- 9. [Forms and Controlled State](#forms-and-controlled-state)
62
- 10. [Lazy Loading and Dynamic Data](#lazy-loading-and-dynamic-data)
63
- 11. [Dialogs and Overflow Containers](#dialogs-and-overflow-containers)
64
- 12. [Events](#events)
65
- 13. [Ref Methods](#ref-methods)
66
- 14. [Run Locally](#run-locally)
67
- 15. [License](#license)
65
+ 6. [Customization Paths](#customization-paths)
66
+ 7. [Slots API](#slots-api)
67
+ 8. [Headless Usage](#headless-usage)
68
+ 9. [Combobox Contract](#combobox-contract)
69
+ 10. [React 19 StackBlitz Playground](#react-19-stackblitz-playground)
70
+ 11. [Official React 19 Test Matrix](#official-react-19-test-matrix)
71
+ 12. [Custom Render Functions](#custom-render-functions)
72
+ 13. [Forms and Controlled State](#forms-and-controlled-state)
73
+ 14. [Lazy Loading and Dynamic Data](#lazy-loading-and-dynamic-data)
74
+ 15. [Dialogs and Overflow Containers](#dialogs-and-overflow-containers)
75
+ 16. [Events](#events)
76
+ 17. [Ref Methods](#ref-methods)
77
+ 18. [Run Locally](#run-locally)
78
+ 19. [License](#license)
68
79
 
69
80
  ## React Version Compatibility
70
81
 
@@ -74,15 +85,15 @@ Each package family installs on its matching React family. Keep the package fami
74
85
  | :---: | :---: | :---: | :---: | :--- |
75
86
  | **17.x** | **React 17 only** | **`>=17.0.0 <18.0.0`** | **17.0.0 -> 17.0.2** | [React 17 family docs](https://alexandro.net/docs/react/multiselect/react-17/) |
76
87
  | **18.x** | **React 18 only** | **`>=18.0.0 <19.0.0`** | **18.0.0 -> 18.3.1** | [React 18 family docs](https://alexandro.net/docs/react/multiselect/react-18/) |
77
- | **19.x** | **React 19 only** | **`>=19.0.0 <20.0.0`** | **19.0.2 -> 19.2.4** | [React 19 family docs](https://alexandro.net/docs/react/multiselect/react-19/) |
88
+ | **19.x** | **React 19 only** | **`>=19.0.0 <20.0.0`** | **19.1.0 -> 19.2.4** | [React 19 family docs](https://alexandro.net/docs/react/multiselect/react-19/) |
78
89
 
79
90
  ## Installation
80
91
 
81
92
  ```bash
82
- npm install @stackline/react-multiselect-dropdown@19.0.2 --save-exact
93
+ npm install @stackline/react-multiselect-dropdown@19.1.0 --save-exact
83
94
  ```
84
95
 
85
- Install `19.0.2` for React 19.x applications. The package includes its component styles and injects them at runtime, so no extra CSS import is required for the default experience. This release also keeps empty placeholders visually centered in the trigger on desktop and mobile.
96
+ Install `19.1.0` for React 19.x applications. The styled component includes its component styles and injects them at runtime. The headless hook does not inject CSS and lets your application own the markup and styling.
86
97
 
87
98
  ## Setup
88
99
 
@@ -144,7 +155,7 @@ Built-in skins:
144
155
  ## Basic Usage
145
156
 
146
157
  ```tsx
147
- import { useMemo, useState } from 'react';
158
+ import { useState } from 'react';
148
159
  import {
149
160
  MultiSelectDropdown,
150
161
  type DropdownSettings
@@ -206,6 +217,302 @@ export function CountrySelector() {
206
217
  }
207
218
  ```
208
219
 
220
+ ## Customization Paths
221
+
222
+ Use the API layer that matches the amount of control your team needs:
223
+
224
+ | Layer | Best for | What you own |
225
+ | :--- | :--- | :--- |
226
+ | `<MultiSelectDropdown />` | Fast forms, filters, dashboards, and admin screens. | Data, selected state, settings, events, and optional render functions. |
227
+ | `createMultiSelectDropdown<T>()` | Teams that want to bind the item type once for a feature or design-system wrapper. | A typed component family, typed settings, typed slots, and typed hooks. |
228
+ | `slots` | Custom HTML around the proven component behavior. | Specific DOM pieces such as trigger, badges, menu, search, groups, options, and footer. |
229
+ | `useMultiSelectDropdown` | Fully custom interfaces and design systems. | All markup and CSS, while Stackline provides state, ARIA prop getters, keyboard flow, grouping, and callbacks. |
230
+ | `useMultiSelectState` | Advanced state engines or existing combobox shells. | Every element, every event binding, and all visual behavior. |
231
+
232
+ For most teams, start with the component. Use `slots` when the component works but your layout needs a different shell. Use the headless hooks when the application must own the whole combobox contract.
233
+
234
+ ## Type-Safe Factory
235
+
236
+ Use `createMultiSelectDropdown<T>()` when a feature, package, or design-system wrapper should bind the item type once and reuse it across the component, settings, slots, and hooks.
237
+
238
+ This is optional. The normal `<MultiSelectDropdown />` API remains the fastest path for most screens.
239
+
240
+ ```tsx
241
+ import { useMemo, useState } from 'react';
242
+ import {
243
+ createMultiSelectDropdown
244
+ } from '@stackline/react-multiselect-dropdown';
245
+
246
+ type Country = {
247
+ id: number;
248
+ itemName: string;
249
+ capital: string;
250
+ region: string;
251
+ };
252
+
253
+ const CountryMultiselect = createMultiSelectDropdown<Country>();
254
+
255
+ const countrySettings = CountryMultiselect.defineSettings({
256
+ text: 'Choose countries',
257
+ primaryKey: 'id',
258
+ labelKey: 'itemName',
259
+ searchBy: ['itemName', 'capital'],
260
+ groupBy: 'region',
261
+ enableSearchFilter: true,
262
+ badgeShowLimit: 2
263
+ });
264
+
265
+ const countrySlots = CountryMultiselect.defineSlots({
266
+ Option: ({ props, option, checkbox }) => (
267
+ <div {...props}>
268
+ {checkbox}
269
+ <strong>{option.item.itemName}</strong>
270
+ <small>{option.item.capital} - {option.item.region}</small>
271
+ </div>
272
+ )
273
+ });
274
+
275
+ export function CountryFilter({ countries }: { countries: Country[] }) {
276
+ const [selectedCountries, setSelectedCountries] = useState<Country[]>([]);
277
+
278
+ return (
279
+ <CountryMultiselect.Dropdown
280
+ data={countries}
281
+ selectedItems={selectedCountries}
282
+ onChange={setSelectedCountries}
283
+ settings={countrySettings}
284
+ slots={countrySlots}
285
+ />
286
+ );
287
+ }
288
+ ```
289
+
290
+ With the factory, `primaryKey`, `labelKey`, `searchBy`, and `groupBy` are checked against `keyof Country`. Typos such as `labelKey: 'itemname'` or `searchBy: ['city']` fail at compile time.
291
+
292
+ ## Slots API
293
+
294
+ Slots let you replace the visible HTML pieces while the package still owns the tested selection, filtering, keyboard, focus, ARIA, body overlay, and async behavior.
295
+
296
+ The important rule is simple: spread the supplied `props` onto the element that plays that role. Those props carry the required refs, ARIA attributes, keyboard handlers, click handlers, ids, classes, and positioning styles.
297
+
298
+ ```tsx
299
+ import { useMemo, useState } from 'react';
300
+ import {
301
+ MultiSelectDropdown,
302
+ type DropdownSettings,
303
+ type MultiSelectDropdownSlots
304
+ } from '@stackline/react-multiselect-dropdown';
305
+
306
+ type Country = {
307
+ id: number;
308
+ itemName: string;
309
+ capital: string;
310
+ region: string;
311
+ };
312
+
313
+ const countrySlots: MultiSelectDropdownSlots<Country> = {
314
+ Trigger: ({ props, children, state }) => (
315
+ <div {...props} className={`${props.className} country-trigger`}>
316
+ <span className="country-trigger-summary">
317
+ {state.selectedItems.length ? `${state.selectedItems.length} selected` : 'Choose countries'}
318
+ </span>
319
+ {children}
320
+ </div>
321
+ ),
322
+ Badge: ({ props, item, removeButton }) => (
323
+ <span {...props} className={`${props.className} country-badge`}>
324
+ <strong>{item.itemName}</strong>
325
+ {removeButton}
326
+ </span>
327
+ ),
328
+ Option: ({ props, option, checkbox }) => (
329
+ <div {...props} className={`${props.className} country-option`}>
330
+ {checkbox}
331
+ <span>
332
+ <strong>{option.label}</strong>
333
+ <small>{option.item.capital} - {option.item.region}</small>
334
+ </span>
335
+ </div>
336
+ ),
337
+ MenuFooter: ({ props, state }) => (
338
+ <div {...props}>
339
+ {state.filteredItems.length} visible options
340
+ </div>
341
+ )
342
+ };
343
+
344
+ export function CountrySelector() {
345
+ const [selectedCountries, setSelectedCountries] = useState<Country[]>([]);
346
+ const settings = useMemo<DropdownSettings<Country>>(
347
+ () => ({
348
+ text: 'Choose countries',
349
+ enableSearchFilter: true,
350
+ groupBy: 'region',
351
+ primaryKey: 'id',
352
+ labelKey: 'itemName',
353
+ badgeShowLimit: 2,
354
+ skin: 'classic'
355
+ }),
356
+ []
357
+ );
358
+
359
+ return (
360
+ <MultiSelectDropdown
361
+ data={countries}
362
+ selectedItems={selectedCountries}
363
+ onChange={setSelectedCountries}
364
+ settings={settings}
365
+ slots={countrySlots}
366
+ />
367
+ );
368
+ }
369
+ ```
370
+
371
+ Available slots:
372
+
373
+ `Root`, `Trigger`, `Value`, `Placeholder`, `SingleValue`, `BadgeList`, `Badge`, `BadgeLabel`, `BadgeRemove`, `Actions`, `OverflowCounter`, `ClearAll`, `Arrow`, `Menu`, `Toolbar`, `BulkActions`, `SelectAll`, `AddNewItem`, `Search`, `OptionList`, `Group`, `GroupHeader`, `GroupAction`, `Option`, `Checkbox`, `LoadingState`, `EmptyState`, and `MenuFooter`.
374
+
375
+ ## Headless Usage
376
+
377
+ Use `useMultiSelectDropdown` when you want Stackline selection, filtering, keyboard handling, ARIA props, grouping, limits, and callbacks without the built-in DOM/CSS.
378
+
379
+ The flag sample below uses SVG country icons from `flag-icons`. You can replace that import with your own icon system if your app already has one.
380
+
381
+ ```bash
382
+ npm install flag-icons
383
+ ```
384
+
385
+ ```tsx
386
+ import { useState } from 'react';
387
+ import 'flag-icons/css/flag-icons.min.css';
388
+ import { useMultiSelectDropdown } from '@stackline/react-multiselect-dropdown';
389
+
390
+ const countries = [
391
+ { id: 1, itemName: 'Brazil', flag: 'BR', capital: 'Brasilia', region: 'Americas' },
392
+ { id: 2, itemName: 'Canada', flag: 'CA', capital: 'Ottawa', region: 'Americas' },
393
+ { id: 3, itemName: 'Portugal', flag: 'PT', capital: 'Lisbon', region: 'Europe' }
394
+ ];
395
+
396
+ function flagClass(code: string) {
397
+ return `fi fi-${code.toLowerCase()}`;
398
+ }
399
+
400
+ export function HeadlessCountries() {
401
+ const [selectedItems, setSelectedItems] = useState([countries[0]]);
402
+ const dropdown = useMultiSelectDropdown({
403
+ data: countries,
404
+ selectedItems,
405
+ onChange: setSelectedItems,
406
+ settings: {
407
+ text: 'Choose countries',
408
+ enableSearchFilter: true,
409
+ searchPlaceholderText: 'Search country',
410
+ groupBy: 'region',
411
+ primaryKey: 'id',
412
+ labelKey: 'itemName',
413
+ badgeShowLimit: 2,
414
+ clearAll: true
415
+ }
416
+ });
417
+
418
+ return (
419
+ <div className="country-picker" {...dropdown.getRootProps()}>
420
+ <button className="country-trigger" {...dropdown.getTriggerProps()}>
421
+ <span>{dropdown.label}</span>
422
+ <strong>{dropdown.isOpen ? 'Close' : 'Open'}</strong>
423
+ </button>
424
+
425
+ <div className="country-chips">
426
+ {dropdown.selectedItems.map((item) => (
427
+ <span className="country-chip" key={dropdown.getItemKey(item)}>
428
+ <span className={`country-flag ${flagClass(item.flag)}`} aria-hidden="true" />
429
+ {dropdown.getItemLabel(item)}
430
+ <button {...dropdown.getRemoveButtonProps(item)}>x</button>
431
+ </span>
432
+ ))}
433
+ </div>
434
+
435
+ {dropdown.isOpen ? (
436
+ <div className="country-panel" {...dropdown.getListboxProps()}>
437
+ <input className="country-search" {...dropdown.getSearchInputProps()} />
438
+
439
+ {dropdown.visibleOptions.map((option) => (
440
+ <div
441
+ key={option.key}
442
+ {...dropdown.getOptionProps(option, {
443
+ className: option.selected ? 'country-option selected' : 'country-option'
444
+ })}>
445
+ <span className={`country-flag ${flagClass(option.item.flag)}`} aria-hidden="true" />
446
+ <span>
447
+ <strong>{option.label}</strong>
448
+ <small>{option.item.capital} - {option.item.region}</small>
449
+ </span>
450
+ <input type="checkbox" checked={option.selected} readOnly />
451
+ </div>
452
+ ))}
453
+ </div>
454
+ ) : null}
455
+ </div>
456
+ );
457
+ }
458
+ ```
459
+
460
+ Use `useMultiSelectState` when you want the selection/filter/grouping engine without prop getters:
461
+
462
+ ```tsx
463
+ import { useMultiSelectState } from '@stackline/react-multiselect-dropdown';
464
+
465
+ const state = useMultiSelectState({
466
+ data: countries,
467
+ selectedItems,
468
+ onChange: setSelectedItems,
469
+ settings: {
470
+ primaryKey: 'id',
471
+ labelKey: 'itemName',
472
+ enableSearchFilter: true
473
+ }
474
+ });
475
+ ```
476
+
477
+ The styled component remains available for drop-in usage. The headless hooks are for teams that want a headless-style ownership model where the application controls layout, elements, and CSS.
478
+
479
+ ## Combobox Contract
480
+
481
+ Version `19.1.0` tightens the interaction details that usually matter most in production forms:
482
+
483
+ | Behavior | Contract |
484
+ | :--- | :--- |
485
+ | Focus after selection/removal | Focus returns to search while the list stays open, or to the trigger when the list closes. |
486
+ | Option selection state | Multiselect options expose matching `aria-selected` and `aria-checked` values. |
487
+ | Backspace in search | Edits the query. With an empty query it does not remove selected values by default. |
488
+ | Backspace/Delete on focused badge remove button | Removes that selected badge. |
489
+ | Escape | Closes the list without clearing selected values. |
490
+ | Async add-item | Late async responses are ignored when a newer add request has already resolved. |
491
+ | Async option refresh | Selected object values are merged into the option source so values are not lost when data refreshes. |
492
+ | Keyboard navigation | Trigger ArrowDown/ArrowUp, option Home/End, and option ids keep focus and ARIA predictable. |
493
+
494
+ Keyboard behavior is enabled by default. You can turn each part off from `settings.keyboard` when an application needs a stricter interaction model:
495
+
496
+ ```tsx
497
+ const settings: DropdownSettings<Country> = {
498
+ text: 'Countries',
499
+ enableSearchFilter: true,
500
+ keyboard: {
501
+ space: true,
502
+ spaceOptionAction: 'toggle',
503
+ tab: true,
504
+ arrows: true,
505
+ escape: true,
506
+ backspaceRemovesLastWhenSearchEmpty: false,
507
+ deleteRemovesFocusedBadge: true
508
+ }
509
+ };
510
+ ```
511
+
512
+ Set any key to `false` to disable that behavior. `backspaceRemovesLastWhenSearchEmpty` can be turned on for applications that want the legacy “empty search removes last badge” pattern. `keyboard.backspace` is still accepted as a deprecated alias for that legacy behavior. `spaceOptionAction` controls only focused options:
513
+ `'toggle'` keeps focus on the current option, while `'toggle-and-next'` toggles and moves to the next enabled option.
514
+ `escapeToClose: false` is still supported and also disables `keyboard.escape`.
515
+
209
516
  ## React 19 StackBlitz Playground
210
517
 
211
518
  Use the dedicated React 19 StackBlitz project when you want a fast editable example without importing the full package repository:
@@ -214,7 +521,7 @@ Use the dedicated React 19 StackBlitz project when you want a fast editable exam
214
521
 
215
522
  | Example | StackBlitz |
216
523
  | :--- | :--- |
217
- | Basic example | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Fbasic%2Fbasic.component.tsx&startScript=start&initialpath=%2Fbasic) |
524
+ | Basic usage | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Fbasic%2Fbasic.component.tsx&startScript=start&initialpath=%2Fbasic) |
218
525
  | Single selection | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Fsingle-selection%2Fsingle-selection.component.tsx&startScript=start&initialpath=%2Fsingle-selection) |
219
526
  | Search filter | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Fsearch-filter%2Fsearch-filter.component.tsx&startScript=start&initialpath=%2Fsearch-filter) |
220
527
  | Custom search from API | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Fcustom-search-api%2Fcustom-search-api.component.tsx&startScript=start&initialpath=%2Fcustom-search-api) |
@@ -224,7 +531,7 @@ Use the dedicated React 19 StackBlitz project when you want a fast editable exam
224
531
  | Templating | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Ftemplating%2Ftemplating.component.tsx&startScript=start&initialpath=%2Ftemplating) |
225
532
  | Template-style forms | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Ftemplate-driven-forms%2Ftemplate-driven-forms.component.tsx&startScript=start&initialpath=%2Ftemplate-driven-forms) |
226
533
  | Reactive forms | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Freactive-forms%2Freactive-forms.component.tsx&startScript=start&initialpath=%2Freactive-forms) |
227
- | Virtual Scrolling | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Fvirtual-scrolling%2Fvirtual-scrolling.component.tsx&startScript=start&initialpath=%2Fvirtual-scrolling) |
534
+ | Long List Keyboard Scroll | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Fvirtual-scrolling%2Fvirtual-scrolling.component.tsx&startScript=start&initialpath=%2Fvirtual-scrolling) |
228
535
  | Lazy Loading from API | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Flazy-loading-api%2Flazy-loading-api.component.tsx&startScript=start&initialpath=%2Flazy-loading-api) |
229
536
  | Data from remote API | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Fremote-data%2Fremote-data.component.tsx&startScript=start&initialpath=%2Fremote-data) |
230
537
  | Using in list for loop | [Open](https://stackblitz.com/github/alexandroit/stackline-react-multiselect-react-19?file=src%2Fexamples%2Flist-loop%2Flist-loop.component.tsx&startScript=start&initialpath=%2Flist-loop) |
@@ -242,7 +549,7 @@ Use the dedicated React 19 StackBlitz project when you want a fast editable exam
242
549
 
243
550
  ## Official React 19 Test Matrix
244
551
 
245
- The React 19 release was tested in a clean React `19.2.4` application with `@stackline/react-multiselect-dropdown@19.0.2`. The docs use the same examples from that test app, including keyboard navigation, focus, ARIA behavior, badge counters, responsive action buttons, scrollable lists, dialog-safe body overlays, and the corrected left-aligned placeholder with vertical centering.
552
+ The React 19 release was tested in a clean React `19.2.4` application with `@stackline/react-multiselect-dropdown@19.1.0`. The docs use the same examples from that test app, including keyboard navigation, focus, ARIA behavior, badge counters, responsive action buttons, scrollable lists, dialog-safe body overlays, the corrected left-aligned placeholder with vertical centering, guided Slots API customization, headless/custom HTML, and the combobox contract checks for Backspace, Escape, focused badge removal, focus, and option ARIA.
246
553
 
247
554
  The same core scenarios are validated for the visual skins:
248
555
 
@@ -263,10 +570,11 @@ The same core scenarios are validated for the visual skins:
263
570
  | 13 | Dialog and overflow container | `{ appendToBody: true, tagToBody: true }` |
264
571
  | 14 | Body overlay auto direction | `{ autoPosition: true, position: 'top' }` |
265
572
  | 15 | Ref methods | `openDropdown`, `closeDropdown`, `selectAll`, `clearSelection` |
573
+ | 16 | Slots API custom HTML | `slots.Trigger`, `slots.Option`, `slots.Search`, `slots.GroupHeader`, `slots.MenuFooter` |
266
574
 
267
575
  ## Custom Render Functions
268
576
 
269
- Use `renderItem` for option rows and `renderBadge` for selected chips:
577
+ Use `renderItem` for option rows and `renderBadge` for selected chips when you only need to replace inner content. Use `slots` when you need to replace component structure such as the trigger, menu, search shell, option row, badge, or footer.
270
578
 
271
579
  ```tsx
272
580
  <MultiSelectDropdown