Skip to content

v1.0.5

Choose a tag to compare

@alessia26 alessia26 released this 08 Dec 18:12
· 90 commits to main since this release
a39670e

✨ What’s new

Portal on demand

  • Modals are moved to only when opened in overlay mode.
  • On close, they are restored to their original DOM position.
  • No eager DOM mutations on page load.

Breakpoint-aware overlay behaviour

  • Overlay behaviour is controlled via blx-prop:
  • no prop → overlay enabled on all breakpoints
  • tablet → overlay at ≤ 991px
  • mobile → overlay at ≤ 767px
  • When overlay is not allowed, triggers intentionally do nothing and layout is handled purely via CSS.

Automatic reset on resize

  • If a modal is open in overlay mode and the viewport leaves its allowed breakpoint range, the modal closes and is restored inline.
  • Scroll lock and open state are always safely released.

Improved inline + overlay pattern

Enables patterns such as:

  • sidebar / drawer on desktop
  • modal overlay on tablet and mobile
  • No reinitialisation, no mode switching, no layout guessing in JavaScript.