![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@lion/overlays
Advanced tools
Supports different types of overlays like dialogs, toasts, tooltips, dropdown, etc.
Manages their position on the screen relative to other elements, including other overlays.
Its purpose is to make it easy to use our Overlay System declaratively. It can be easily extended where needed, to override event listeners and more.
See lion-dialog and lion-tooltip for example Web Component implementations using the Overlay System.
.config
object to set or update the OverlayController's configurationUsually you will use lion-dialog
(or lion-tooltip
if this makes more sense).
npm i --save @lion/overlays
npm i --save @lion/dialog
import '@lion/dialog/define';
html`
<lion-dialog .config=${{
placementMode: 'global',
viewportConfig: { placement: 'bottom-right' },
}}>
<div slot="content">
This is an overlay
<button
@click=${e => e.target.dispatchEvent(new Event('close-overlay', { bubbles: true }))}
>x</button>
<div>
<button slot="invoker">
Click me
</button>
</lion-dialog>
`;
Or by creating a controller yourself
import { OverlayController } from '@lion/overlays';
const ctrl = new OverlayController({
...withModalDialogConfig(),
invokerNode,
contentNode,
});
Or creating your own Web Component which uses the Overlay System
import { LitElement, html } from '@lion/core';
import { OverlayMixin, withModalDialogConfig } from '@lion/overlays';
class MyOverlayComponent extends OverlayMixin(LitElement) {
_defineOverlayConfig() {
return {
...withModalDialogConfig(),
};
}
_setupOpenCloseListeners() {
super._setupOpenCloseListeners();
this.__toggle = () => {
this.opened = !this.opened;
};
if (this._overlayInvokerNode) {
this._overlayInvokerNode.addEventListener('click', this.__toggle);
}
}
_teardownOpenCloseListeners() {
super._teardownOpenCloseListeners();
if (this._overlayInvokerNode) {
this._overlayInvokerNode.removeEventListener('click', this.__toggle);
}
}
render() {
return html`
<slot name="invoker"></slot>
<div id="overlay-content-node-wrapper">
<slot name="content"></slot>
</div>
`;
}
}
Please check the system rationals folder, where we go more in-depth.
aria-controls
as support for it is not quite there yetaria-haspopup
. People knowing the haspopup and hear about it don’t expect a dialog to open (at this moment in time) but expect a sub-menu. Until support for the dialog value has better implementation, it’s probably best to not use aria-haspopup on the element that opens the modal dialog.FAQs
Overlays System using lit-html for rendering
The npm package @lion/overlays receives a total of 1,594 weekly downloads. As such, @lion/overlays popularity was classified as popular.
We found that @lion/overlays demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.