v4.0.0 #687
brianvoe
announced in
Announcements
v4.0.0
#687
Replies: 1 comment 1 reply
-
|
Congrats on the release |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Slim Select 4.0.0
The select dropdown, reimagined — again. v4 adds modal mode for mobile-friendly picking, a faster sync and search engine, tighter CSS variable sizing, and a much larger test suite (523 tests).
Docs: https://slimselectjs.com
Get started: https://slimselectjs.com/get-started
Highlights
Modal mode
settings.modal:'off'|'on'|'mobile'(default:'mobile')'on'), the option panel opens as a centered modal with backdrop, close button, Escape/backdrop dismiss, and body scroll lock<label>text oraria-label; override withsettings.modalTitle--ss-modal-height,--ss-modal-width, and--ss-modal-z-indexalwaysOpen: true(inline panels stay inline)Performance & search
<select>and dropdown rebuildskeepSearch: truere-runs the active query when reopeningcontent-visibility: auto; dropdown positioning usesResizeObserverinstead of pollingStyling
--ss-search-heightand--ss-option-heightdefault tovar(--ss-main-height)so single, multi, search, and options stay aligned when you customize height--ss-primary-colorand--ss-bg-color(no separate scroll/track variables)prefers-reduced-motionhonored for panel transitions and value chip removalQuality
Install
Migration guide (3.x → 4.0)
1. Vue & React — options via
dataprop (breaking)Native
<option>children / slots are no longer supported in the framework wrappers. Pass options explicitly:Same shape as core SlimSelect (
text,value, optgroups, etc.).2.
events.searchcallback signature (breaking if you use extra args)Use
catalogto merge API results without losing the original option set. Clearing search restorescatalogautomatically.3. Optgroup select-all label (breaking)
selectAllTexton optgroups anddata-selectalltexton<optgroup>are removed. Labels are always "Select All" or "Unselect All" when every option in the group is selected.4. Modal default on mobile (behavior change)
modaldefaults to'mobile'. Mobile users get a modal instead of a dropdown unless you opt out:5. Custom CSS variables
If you set only
--ss-main-height, search and option rows now follow it. Override explicitly if you need different heights:6.
Option.datafrom HTMLOptions read from
data-*attributes now exposeoption.dataas a plain object, not a liveDOMStringMap. Code that relied onDOMStringMapbehavior or saw[object DOMStringMap]when stringifying should read properties fromoption.datadirectly.7. Closable optgroups (behavior change)
Closable optgroups act as an accordion — opening one closes other open closable groups (including groups that were open because they contained a selected option).
8. Vanilla JS / core API
No import path changes.
slim-select,slim-select/vue,slim-select/react,slim-select/styles, andslim-select/scssare unchanged.Full changelog
See CHANGELOG.md for the complete list of fixes and internal refactors (sync coordinator, lifecycle scheduler, animation helpers, min/max behavior, and more).
This discussion was created from the release v4.0.0.
Beta Was this translation helpful? Give feedback.
All reactions