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 🙏

© 2024 – Pkg Stats / Ryan Hefner

float-my-vue

v0.0.3

Published

<img width="300" alt="image" align="left" src="https://user-images.githubusercontent.com/5548950/236342921-71cc0711-fad6-48a1-ab87-f24c79fe24f8.png">

Downloads

2

Readme

Float My Vue

Float My Vue is a lightweight and versatile Vue.js library that simplifies the positioning and handling of floating elements such as tooltips, popovers and more.

Features

  • Automatic positioning and repositioning of floating elements
  • Fully customizable
  • Easy integration with existing Vue projects
  • Built-in accessibility features
  • Slot support for custom content
  • Responsive design

Installation

Install the package using npm:

npm install float-my-vue

Setup

Import FloatMyVue in the components where you would like to use it:

import { FloatMyVue } from 'float-my-vue';

And import the styles in the main file of your project (or wherever you prefer while making sure that the styles are loaded before the component is used):

import 'float-my-vue/style.css';

Usage

Basic Usage

By default you can use the component with some styled content:

<FloatMyVue side="right">
    <template #reference>Open!</template>
    <template #content>Content</template>
</FloatMyVue>

Also you can use a light theme:

<FloatMyVue side="right" color="light">
    <template #reference>Open!</template>
    <template #content>Content</template>
</FloatMyVue>

Customization

You can change the position of the floating element:

<FloatMyVue side="right" side="right"> <!-- left, top, bottom -->
    <template #reference>Open!</template>
    <template #content>Content</template>
</FloatMyVue>

You can change the size of the arrow:

<FloatMyVue side="right" :arrow-size="50">
    <template #reference>Open!</template>
    <template #content>Content</template>
</FloatMyVue>

You can adjust the position of the floating element:

<FloatMyVue side="right" :offset="{ x: 123, y: 321 }">
    <template #reference>Open!</template>
    <template #content>Content</template>
</FloatMyVue>

You can control the open/close state externally:

<FloatMyVue side="right" :open="true">
    <template #reference>Open!</template>
    <template #content>Content</template>
</FloatMyVue>

Slots

There are slots that allow you to customize the content:

<FloatMyVue side="right" color="light">
    <template #reference>Open!</template>
    <template #arrow>⬇️</template>
    <template #float>This doesn't look good</template>
</FloatMyVue>