Utilities for controlling the cursor style when hovering over an element.

React propsCSS Properties
cursor={keyword}cursor: {keyword};


Use cursor="auto" to allow the browser to change the cursor based on the current content (e.g. automatically change to text cursor when hovering over text).

Hover over this text
<x.div cursor="auto">Hover over this text</x.div>


Use cursor="default" to change the mouse cursor to always use the platform-dependent default cursor (usually an arrow).

Hover over this text
<x.div cursor="default">Hover over this text</x.div>


Use cursor="pointer" to change the mouse cursor to indicate an interactive element (usually a pointing hand).

Hover over this text
<x.div cursor="pointer">Hover over this text</x.div>


Use cursor="wait" to change the mouse cursor to indicate something is happening in the background (usually an hourglass or watch).

Hover over this text
<x.div cursor="wait">Hover over this text</x.div>


Use cursor="text" to change the mouse cursor to indicate the text can be selected (usually an I-beam shape).

Hover over this text
<x.div cursor="text">Hover over this text</x.div>


Use cursor="move" to change the mouse cursor to indicate something that can be moved.

Hover over this text
<x.div cursor="move">Hover over this text</x.div>

Not allowed

Use cursor="not-allowed" to change the mouse cursor to indicate something can not be interacted with or clicked.

Hover over this text
<x.div cursor="not-allowed">Hover over this text</x.div>


To control cursor style at a specific breakpoint, use responsive object notation. For example, adding the property cursor={{ md: "pointer" }} to an element would apply the cursor="pointer" utility at medium screen sizes and above.

<x.div cursor={{ md: 'pointer' }} />

For more information about xstyled's responsive design features, check out Responsive Design documentation.

Edit this page on GitHub