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

@owlagency/cursorchange

v0.0.2

Published

Плагин для замены курсора на кастомный

Downloads

1

Readme

Change Cursor

Плагин для замены курсора на кастомный

Разработка студии OWL Agency.
Для вопросов и предложений: [email protected]

Инициализация плагина

<script src="https://unpkg.com/@owlagency/cursorchange/dist/index.min.js"></script>
npm i @owlagency/cursorchange
import Cursor from "cursors";

var cursor = new Cursor({
	currentClass: '.owl',
	allowsBackground: ['left', 'right', 'lb'],
	hoveredCursor: true,
	kitCursors: {
		'owl': ['lb', 'right'],
		'svg': ['left']
	},
  fade: false
});

cursor.init();
 <img src="example/img/owl_logo.svg" class="owl" alt="owl" style="position: absolute" />
  <div class="svg" style="position: absolute">
      <svg
        xmlns="http://www.w3.org/2000/svg"
        width="28"
        height="28"
        viewBox="0 0 28 28"
        fill="none">
        <path
          fill-rule="evenodd"
          clip-rule="evenodd"
          d="M6.92943 19.5322C3.47274 16.0755 3.47274 10.4711 6.92943 7.0144C10.3861 3.5577 15.9905 3.5577 19.4472 7.0144C22.6068 10.174 22.8784 15.128 20.2619 18.5961L23.7543 22.0885L22.3877 23.455L18.9371 20.0044C15.4594 22.981 10.2208 22.8236 6.92943 19.5322ZM18.0807 8.38097C15.3787 5.67901 10.998 5.67901 8.29601 8.38097C5.59405 11.0829 5.59405 15.4637 8.29601 18.1656C10.998 20.8676 15.3787 20.8676 18.0807 18.1656C20.7826 15.4637 20.7826 11.0829 18.0807 8.38097Z"
          fill="#C4C4C4" />
      </svg>
    </div>
 <div class="lb" style="width: 40%; height: 300px; background-color: royalblue"></div>
 <div class="right" style="width: 40%; height: 300px; background-color: brown"></div>

params

currentClass(string) - селектор для установки курсора

allowsBackground(array) - классы, над которыми допустима смена курсора

hoveredCursor(boolean) - false - перманентый курсор; по умолчанию true

fade(boolean) - появляение курсора с fade, тянется из cdn

kitCursors(object) - наборы курсоров 'svg' : ['left', 'right']

methods

init() - инициализация плагина

update(selector) - принудительно обновить текущий курсор (не сработает для набора курсоров)

remove() - удалить все курсоры

info

Для работы курсора, заменяемые элементы должны иметь absolute/fixed позиционирование

Существует проблема с круглыми svg картинками – края бьются и их лучше задавать стилями