@3mo/overflow-controller
v0.1.3
Published
A Lit controller for single-line containers that works out which items overflow, for Priority+ toolbars and menu bars.
Readme
Overflow Controller
A Lit controller for single-line containers that works out which items overflow, for Priority+ toolbars and menu bars.
Installation
npm install @3mo/overflow-controllerimport { OverflowController } from '@3mo/overflow-controller'Examples
- Default — Drag the container's end corner to narrow it: items overflow from the end and return, while
reservedSizekeeps room for the badge. - Pinned Items — Items registered as
pinnednever overflow: Save As… and Delete keep their place while the others come and go.
API
Exports
| Name | Kind | Description |
| --- | --- | --- |
| OverflowController | class | Works out which items of a single-line container fit and which overflow - the "Priority+" pattern. |
Links
License
MIT © 3MO GmbH
