npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@iliasnolsson/adaptive-dialog

v1.2.2

Published

System for dynamically presenting dialogs

Readme

@iliasnolsson/adaptive-dialog

Overview

adaptive-dialog is a flexible and feature-rich dialog component for Vue.js applications. It provides a dynamic dialog presentation which adapts to its surrounding environment and provides several utilities to make the positioning and presentation of your dialogs intuitive and visually appealing.

Installation

npm install @iliasnolsson/adaptive-dialog

Components

1. AdaptiveDialog

Main dialog component which adapts its position and presentation based on various properties.

Properties:

  • isOpen: Boolean to control the visibility of the dialog. Can be used with v-model:is-open for two-way binding.

  • areaIdentifier: Identifier of the area which encloses this dialog. The dialog will ensure it is contained within this area.

  • anchorIdentifier: Identifier of the element which this dialog anchors to when presented.

  • anchorExactLocation: Use to specify an exact location to anchor the dialog.

  • presentationDirection: Direction in which the dialog should present itself.

  • backgroundClickToClose: If true, clicking the background will close the dialog.

  • backgroundInteractive: If true, background elements remain interactive when the dialog is open.

  • styling: Object to specify custom styles for the dialog.

  • backdropStyling: Object to specify custom styles for the dialog backdrop.

  • waitUntilLoaded: If true, waits until content within the dialog is loaded before presenting the dialog.

Usage:

<AdaptiveDialog v-model:is-open="dialogOpen" area-identifier="test-area" ...>
  <!-- Dialog content goes here -->
</AdaptiveDialog>

2. AdaptiveDialogDirection

Enum which provides multiple positioning directions for the dialog.

  • MidXMinY: Top Center
  • MidXMaxY: Bottom Center
  • MinXMidY: Left Center
  • MaxXMidY: Right Center
  • MinXMinY: Top Left
  • MaxXMinY: Top Right
  • MinXMaxY: Bottom Left
  • MaxXMaxY: Bottom Right
  • Auto: Automatically chooses the best direction to fit within the enclosure area or document window.

3. AdaptiveDialogArea

A helper component to define an area for the dialog.

Properties:

  • identifier: Unique identifier for this area.

  • inset: Minimum spacing between the dialog and the area edges.

Usage:

<AdaptiveDialogArea identifier="test-area" :inset="10">
  <!-- Area content goes here -->
</AdaptiveDialogArea>

4. AdaptiveDialogAnchor

A helper component to define an anchor for the dialog.

Properties:

  • identifier: Unique identifier for this anchor.

  • minimumSpacing: Minimum spacing between the dialog and the anchor.

Usage:

<AdaptiveDialogAnchor identifier="my-anchor" :minimumSpacing="5">
  <!-- Anchor content goes here -->
</AdaptiveDialogAnchor>

Example

<AdaptiveDialogArea identifier="test-area" :inset="10">
  <div class="test-area">
    <!-- Some content inside the area -->
  </div>
</AdaptiveDialogArea>

<AdaptiveDialog area-identifier="test-area" ...>
  <!-- Dialog content -->
</AdaptiveDialog>

Note: The AdaptiveDialog does not need to be defined within the AdaptiveDialogArea element. It can be defined anywhere in your Vue component or template.

Contribution

Feel free to submit issues and enhancement requests. Contributions are welcome!

License

MIT