Lynx

cursor

Introduction

The cursor CSS property controls the mouse pointer displayed when the pointer hovers over an element.

Examples

Syntax

cursor: pointer;

Values

Lynx currently supports keyword values only, such as pointer, text, grab, and other standard cursor keywords.

Lynx Mini App Syntax

You can declare cursor the same way as other CSS properties.

<view class="clickable">
  <text>Hover me</text>
</view>
.clickable {
  cursor: pointer;
}

If your compiler pipeline does not apply cursor as expected, prefer declaring it in a stylesheet selector or class.

React Syntax

<view style={{ cursor: 'pointer' }}>
  <text>Hover me</text>
</view>

Formal Definition

Initial valueauto
Applies toall elements
Inheritedyes
Animatableno

Formal Syntax

cursor: <cursor-keyword>;

Differences from Web

  • Only keyword values are supported.
  • URL-based cursors, local image cursors, and custom hotspot positions are not supported.

Notes

  • To allow cursor to inherit in Lynx, enable CSS inheritance in your front-end configuration.
  • You can also explicitly add cursor to customCSSInheritanceList.
  • See enableCSSInheritance and customCSSInheritanceList for more details.

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.