@balasaravanan/cursor-follower-v2
v2.0.4
Published
A minimal cursor follower design package for your web projects that is compatible in both React.js and Next.js (JavaScript and TypeScript)
Readme
��#� �=��� �@�b�a�l�a�s�a�r�a�v�a�n�a�n�/�c�u�r�s�o�r�-�f�o�l�l�o�w�e�r�-�v�2�
�
�
�
�A� �l�i�g�h�t�w�e�i�g�h�t� �a�n�d� �c�u�s�t�o�m�i�z�a�b�l�e� �R�e�a�c�t� �c�o�m�p�o�n�e�n�t� �t�h�a�t� �v�i�s�u�a�l�l�y� �f�o�l�l�o�w�s� �t�h�e� �u�s�e�r�'�s� �c�u�r�s�o�r� �u�s�i�n�g� �s�m�o�o�t�h� �a�n�i�m�a�t�i�o�n�s�.� �W�o�r�k�s� �s�e�a�m�l�e�s�s�l�y� �i�n� �R�e�a�c�t� �a�n�d� �N�e�x�t�.�j�s�,� �w�i�t�h� �s�u�p�p�o�r�t� �f�o�r� �J�a�v�a�S�c�r�i�p�t� �a�n�d� �T�y�p�e�S�c�r�i�p�t�.�
�
�
�
�#�#� �=� �F�e�a�t�u�r�e�s�
�
�
�
�=ر�� �D�o�t� �+� �o�u�t�l�i�n�e� �c�u�r�s�o�r� �f�o�l�l�o�w�e�r� �e�f�f�e�c�t�
�
�
�
��&� �W�o�r�k�s� �w�i�t�h� �R�e�a�c�t� �&� �N�e�x�t�.�j�s� �(�J�S� �+� �T�S�)�
�
�
�
�=ب� �S�m�o�o�t�h� �a�n�i�m�a�t�e�(�)�-�b�a�s�e�d� �m�o�t�i�o�n�
�
�
�
�>ض� �L�i�g�h�t�w�e�i�g�h�t� �a�n�d� �z�e�r�o� �d�e�p�e�n�d�e�n�c�i�e�s�
�
�
�
�#�#� �=��� �I�n�s�t�a�l�l�a�t�i�o�n�
�
�
�
����b�a�s�h�
�
�
�
�n�p�m� �i� �@�b�a�l�a�s�a�r�a�v�a�n�a�n�/�c�u�r�s�o�r�-�f�o�l�l�o�w�e�r�-�v�2�
�
�
�
����
�
�
�
�#�#� �>���
=ػ� �U�s�a�g�e�
�
�
�
�#�#�#� �R�e�a�c�t�.�j�s� �a�n�d� �J�a�v�a�S�c�r�i�p�t�
�
�
�
����j�s�x�
�
�i�m�p�o�r�t� �C�u�r�s�o�r�F�o�l�l�o�w�e�r� �f�r�o�m� �"�@�b�a�l�a�s�a�r�a�v�a�n�a�n�/�c�u�r�s�o�r�-�f�o�l�l�o�w�e�r�-�v�2�"�;�
�
�
�
�f�u�n�c�t�i�o�n� �A�p�p�(�)� �{�
�
� � �r�e�t�u�r�n� �(�
�
� � � � �<�C�u�r�s�o�r�F�o�l�l�o�w�e�r�>�
�
� � � � � � �<�h�1�>�H�e�l�l�o� �W�o�r�l�d�<�/�h�1�>�
�
� � � � �<�/�C�u�r�s�o�r�F�o�l�l�o�w�e�r�>�
�
� � �)�;�
�
�}�
�
����
�
�
�
�#�#�#� �R�e�a�c�t�.�j�s� �a�n�d� �T�y�p�e�S�c�r�i�p�t�
�
�
�
����j�s�x�
�
�i�m�p�o�r�t� �C�u�r�s�o�r�F�o�l�l�o�w�e�r� �f�r�o�m� �"�@�b�a�l�a�s�a�r�a�v�a�n�a�n�/�c�u�r�s�o�r�-�f�o�l�l�o�w�e�r�-�v�2�"�;�
�
�
�
�f�u�n�c�t�i�o�n� �A�p�p�(�)� �{�
�
� � �r�e�t�u�r�n� �(�
�
� � � � �<�C�u�r�s�o�r�F�o�l�l�o�w�e�r�>�
�
� � � � � � �<�h�1�>�H�e�l�l�o� �W�o�r�l�d�<�/�h�1�>�
�
� � � � �<�/�C�u�r�s�o�r�F�o�l�l�o�w�e�r�>�
�
� � �)�;�
�
�}�
�
����
�
�
�
�#�#�#� �N�e�x�t�.�j�s� �a�n�d� �J�a�v�a�S�c�r�i�p�t�
�
�
�
����j�s�x�
�
�"�u�s�e� �c�l�i�e�n�t�"�;�
�
�
�
�i�m�p�o�r�t� �C�u�r�s�o�r�F�o�l�l�o�w�e�r� �f�r�o�m� �"�@�b�a�l�a�s�a�r�a�v�a�n�a�n�/�c�u�r�s�o�r�-�f�o�l�l�o�w�e�r�-�v�2�"�;�
�
�
�
�e�x�p�o�r�t� �d�e�f�a�u�l�t� �f�u�n�c�t�i�o�n� �H�o�m�e�(�)� �{�
�
� � �r�e�t�u�r�n� �(�
�
� � � � �<�C�u�r�s�o�r�F�o�l�l�o�w�e�r�>�
�
� � � � � � �<�h�1�>�W�e�l�c�o�m�e� �t�o� �N�e�x�t�.�j�s�<�/�h�1�>�
�
� � � � �<�/�C�u�r�s�o�r�F�o�l�l�o�w�e�r�>�
�
� � �)�;�
�
�}�
�
����
�
�
�
�#�#�#� �N�e�x�t�.�j�s� �a�n�d� �T�y�p�e�S�c�r�i�p�t�
�
�
�
����j�s�x�
�
�"�u�s�e� �c�l�i�e�n�t�"�;�
�
�
�
�i�m�p�o�r�t� �C�u�r�s�o�r�F�o�l�l�o�w�e�r� �f�r�o�m� �"�@�b�a�l�a�s�a�r�a�v�a�n�a�n�/�c�u�r�s�o�r�-�f�o�l�l�o�w�e�r�-�v�2�"�;�
�
�
�
�e�x�p�o�r�t� �d�e�f�a�u�l�t� �f�u�n�c�t�i�o�n� �H�o�m�e�(�)� �{�
�
� � �r�e�t�u�r�n� �(�
�
� � � � �<�C�u�r�s�o�r�F�o�l�l�o�w�e�r�>�
�
� � � � � � �<�h�1�>�W�e�l�c�o�m�e� �t�o� �N�e�x�t�.�j�s�<�/�h�1�>�
�
� � � � �<�/�C�u�r�s�o�r�F�o�l�l�o�w�e�r�>�
�
� � �)�;�
�
�}�
�
����
�
�
�
�#�#� �=��� �F�i�l�e� �S�t�r�u�c�t�u�r�e�
�
�
�
����b�a�s�h�
�
�
�
�s�r�c�/�
�
�%�%�% �C�u�r�s�o�r�F�o�l�l�o�w�e�r�.�t�s�x� � � � � � � � � �#� �R�e�a�c�t� �c�o�m�p�o�n�e�n�t� �(�T�y�p�e�S�c�r�i�p�t�)�
�
�%�%�% �i�n�d�e�x�.�t�s� � � � � � � � � � � � � � � � � � � �#� �E�n�t�r�y� �f�i�l�e�
�
�%�%�% �i�n�d�e�x�.�c�s�s� � � � � � � � � � � � � � � � � � �#� �B�a�s�i�c� �s�t�y�l�e�s�
�
�
�
����
�
�
�
�#�#� �' �C�o�m�p�a�t�i�b�i�l�i�t�y�
�
�
�
�' �R�e�a�c�t� �1�7�+�
�
�
�
�' �N�e�x�t�.�j�s� �A�p�p�/�P�a�g�e�s� �R�o�u�t�e�r�
�
�
�
�' �T�y�p�e�S�c�r�i�p�t� �&� �J�a�v�a�S�c�r�i�p�t�
�
�
