<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macOS: 15.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/PointerStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12PointerStyleV"
  },
  "title" : "PointerStyle"
}
-->

# PointerStyle

A style describing the appearance of the pointer (also called a cursor) when
it’s hovered over a view.

```
struct PointerStyle
```

## Overview

Use the [`pointerStyle(_:)`](/documentation/SwiftUI/View/pointerStyle(_:)) view modifier to set a view’s pointer style.

For guidance on choosing an appropriate pointer style, refer to
<doc://com.apple.documentation/design/Human-Interface-Guidelines/pointing-devices>
in the Human Interface Guidelines.

## Topics

### Getting built-in pointer styles

[`default`](/documentation/SwiftUI/PointerStyle/default)

The pointer style that uses the default platform appearance.

[`horizontalText`](/documentation/SwiftUI/PointerStyle/horizontalText)

The pointer style appropriate for selecting or inserting text in a
horizontal layout.

[`verticalText`](/documentation/SwiftUI/PointerStyle/verticalText)

The pointer style appropriate for selecting or inserting text in a
vertical layout.

[`rectSelection`](/documentation/SwiftUI/PointerStyle/rectSelection)

The pointer style appropriate for precise rectangular selection, such
as selecting a portion of an image or multiple lines of text.

[`grabIdle`](/documentation/SwiftUI/PointerStyle/grabIdle)

The pointer style appropriate to indicate that dragging to reposition
content within specific bounds, such as panning a large image, is
possible.

[`grabActive`](/documentation/SwiftUI/PointerStyle/grabActive)

The pointer style appropriate for actively dragging to reposition
content within specific bounds, such as panning a large image.

[`link`](/documentation/SwiftUI/PointerStyle/link)

The pointer style appropriate for content opens a URL link to a
webpage, document, or other item when clicked.

[`zoomIn`](/documentation/SwiftUI/PointerStyle/zoomIn)

The pointer style appropriate to indicate that the content can be
zoomed in.

[`zoomOut`](/documentation/SwiftUI/PointerStyle/zoomOut)

The pointer style appropriate to indicate that the content can be
zoomed out.

[`frameResize(position:directions:)`](/documentation/SwiftUI/PointerStyle/frameResize(position:directions:))

The pointer style for resizing a rectangular frame from a specific edge
or corner.

[`columnResize(directions:)`](/documentation/SwiftUI/PointerStyle/columnResize(directions:))

The pointer style for resizing a column, or vertical division.

[`rowResize(directions:)`](/documentation/SwiftUI/PointerStyle/rowResize(directions:))

The pointer style for resizing a row, or horizontal division.

### Creating custom pointer styles

[`image(_:hotSpot:)`](/documentation/SwiftUI/PointerStyle/image(_:hotSpot:))

Initializes a pointer style with a given image and hot spot.

[`shape(_:eoFill:size:)`](/documentation/SwiftUI/PointerStyle/shape(_:eoFill:size:))

Initializes a pointer style with a given shape.

### Supporting types

[`HorizontalDirection`](/documentation/SwiftUI/HorizontalDirection)

A direction on the horizontal axis.

[`VerticalDirection`](/documentation/SwiftUI/VerticalDirection)

A direction on the vertical axis.

[`FrameResizePosition`](/documentation/SwiftUI/FrameResizePosition)

The position along the perimeter of a rectangular frame (its edges and
corners) from which it’s resized.

[`FrameResizeDirection`](/documentation/SwiftUI/FrameResizeDirection)

The direction in which a rectangular frame can be resized.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)