Курсор с ховер-эффектом
Кастомный курсор с ховер-эффектом, меняющий форму с квадрата на круг
Инструкция к настройке
2 Шаг:
Создаем в самом начале страницы блок T-123 и вставляем в следующий код:
1 Шаг:
Для корректной работы модификации подключаем в настройках сайта библиотеку jQuery:
Настройки сайта — Еще — Подключить jQuery на страницах сайта
<style>

.custom-cursor {
position: fixed;
pointer-events: none;
z-index: 99999;
width: 12px;
height: 12px;
background: #000;
border-radius: 0;
transform: translate(-50%, -50%);
transition: width 0.25s ease, height 0.25s ease, border-radius 0.25s ease, background 0.25s ease;
will-change: transform, width, height, border-radius;
}

/* Состояние при наведении на интерактивные элементы */
.custom-cursor.hover {
width: 30px;
height: 30px;
border-radius: 50%;
background: #111;
}
</style>

<div class="custom-cursor" id="cursor"></div>

<script>
(function() {
const cursor = document.getElementById('cursor');
let mouseX = 0, mouseY = 0;
let cursorX = 0, cursorY = 0;

document.addEventListener('mousemove', (e) => {
mouseX = e.clientX;
mouseY = e.clientY;
});

function animate() {
cursorX += (mouseX - cursorX) * 0.15;
cursorY += (mouseY - cursorY) * 0.15;
cursor.style.left = cursorX + 'px';
cursor.style.top = cursorY + 'px';
requestAnimationFrame(animate);
}
animate();

const targets = document.querySelectorAll('a, button, .t-btn, .t-link, input, .t-submit, [role="button"]');
targets.forEach(el => {
el.addEventListener('mouseenter', () => cursor.classList.add('hover'));
el.addEventListener('mouseleave', () => cursor.classList.remove('hover'));
});
})();
</script>
Скопировать
Копирование кода · Tilda (.code-copy)
Доступ к 50+ модификациями навсегда
Обновления библиотеки
Оповещения о новых модификациях в канале
Поддержка модов при изменениях в Tilda
4 999 руб.
Доступ к 15 модификациями
Обновления библиотеки
0 руб.
Тарифы
© Ковалева Дарья Сергеевна, 2026
Модификации
Бесплатные модификации
Модификации в подписке
Калькулятор расчета стоимости проекта
Навигация
ИНН: 482114338078
Публичная оферта
Политика обработки данных
Обсудить проект
Made on
Tilda