Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div id="rjs_cursor" class="rjs-cursor">
  <div class="rjs-cursor-icon"></div>


                .rjs-cursor {
  width: 12px;
  height: 12px;
  position: fixed;      /* Fixed position.. */
  top: 0;               /* at the top left.. */
  left: 0;
  z-index: 999999;      /* above everything else. */
  pointer-events: none; /* Cant't be clicked. */
  transition: none;     /* Cursor is always accurate */
  opacity: 0;        /* Hidden by default */

.rjs-cursor-icon {      /* Styling for the visible part */
  width: 100%;
  height: 100%;
  border-radius: 100%;  /* Circle */
  background-color: rgba(123, 123, 123, 0.7); /* Backup value */

.rjs-cursor.rjs_cursor_visible { opacity: 1; }
.rjs-cursor.rjs_cursor_hidden { opacity: 0; }

/* Display the cursors at the correct time */
* { cursor: none; }

@media (pointer: none), (pointer: coarse) {
    #rjs_cursor, #rjs_cursor .rjs-cursor-icon { display: none !important; visibility: hidden; opacity: 0; }

    * { cursor: auto !important; }

/* The body element is required to fill the complete browser. This will be the case on almost every website that has content. Otherwise you could add this as a fallback */

body { min-width: 100vw; min-height: 100vh; margin: 0; } */


                var rjs_cursor =  document.getElementById("rjs_cursor"); //Getting the cursor
var body =  document.querySelector("body"); //Get the body element

//Functions for showing and hiding the cursor
//They are referenced the 
 function rjs_show_cursor(e) { //Function to show/hide the cursor
    if(rjs_cursor.classList.contains('rjs_cursor_hidden')) {

function rjs_hide_cursor(e) {    if(rjs_cursor.classList.contains('rjs_cursor_visible')) {

function rjs_mousemove(e) { //Function to correctly position the cursor
    rjs_show_cursor(); //Toggle show/hide
    var rjs_cursor_width = rjs_cursor.offsetWidth * 0.5;
    var rjs_cursor_height = rjs_cursor.offsetHeight * 0.5;

    var rjs_cursor_x = e.clientX - rjs_cursor_width; //x-coordinate
    var rjs_cursor_y = e.clientY - rjs_cursor_height; //y-coordinate
    var rjs_cursor_pos = `translate(${rjs_cursor_x}px, ${rjs_cursor_y}px)`; = rjs_cursor_pos;

window.addEventListener('mousemove', rjs_mousemove); //Attach an event listener
body.addEventListener('mouseleave', rjs_hide_cursor);