@corndev/ui-overlays
v1.0.0-beta.4
Published
Corn UI — Overlay components: Modal, Drawer, Accordion, Tooltip, Popover
Maintainers
Readme
@corndev/ui-overlays
Overlay components: Modal, Drawer, Accordion, Tooltip, Popover, Menu.
Install
npm install @corndev/ui-overlaysUse
import { createModal } from '@corndev/ui-overlays';
import '@corndev/ui-overlays/styles';Styles
The stylesheet ships with the package and is imported separately, so a page can use the classes with no JavaScript:
import '@corndev/ui-overlays/styles';Components
- Modal — Dialog overlay with focus trap, backdrop, and Escape to close.
- Drawer — Slide-in panel from left or right with focus trap.
- Accordion — Collapsible sections. Vanilla expects [data-accordion-item][data-accordion-trigger] and [data-accordion-item][data-accordion-panel] in markup; React composes Accordion.Item children.
- Tooltip — Small label shown on hover/focus. Auto-flips when near viewport edge.
- Popover — Floating panel anchored to a trigger. Auto-flips when near viewport edge.
- Menu — Dropdown menu anchored to a trigger, with keyboard navigation (arrows/Home/End/Escape) and menu roles. Vanilla takes an items array; React composes MenuItem/MenuSeparator children.
Documentation
- Component documentation
- Installing
- Theming
- llms.txt — the whole API in one file, for coding agents
Licence
MIT © Corndog Development LLC. See LICENSE.
