Skip to content

Commit 28a16ae

Browse files
committed
fix: visionHoverStyle ref
1 parent a0a1560 commit 28a16ae

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

content/guide/visionos.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,18 @@ You can use new @nativescript/core APIs to easily enable visionOS [hover styles]
139139

140140
Apple discusses some of the important spatial considerations with these effects in [this session](https://developer.apple.com/videos/play/wwdc2023/111215/).
141141

142-
Each view can specify it's own custom `hoverStyle` as follows:
142+
Each view can specify it's own custom `visionHoverStyle` as follows:
143143

144144
```xml
145-
<GridLayout hoverStyle="{{customHoverStyle}}" tap="{{tapAction}}"/>
145+
<GridLayout visionHoverStyle="{{visionHoverStyle}}" tap="{{tapAction}}"/>
146146
```
147147

148-
The `hoverStyle` property can be defined as a `string` or `VisionHoverOptions`.
148+
The `visionHoverStyle` property can be defined as a `string` or `VisionHoverOptions`.
149149

150150
```ts
151151
import { VisionHoverOptions } from '@nativescript/core'
152152

153-
const hoverStyle: VisionHoverOptions = {
153+
const visionHoverStyle: VisionHoverOptions = {
154154
effect: 'highlight',
155155
shape: 'rect',
156156
shapeCornerRadius: 16,
@@ -171,15 +171,15 @@ export type VisionHoverOptions = {
171171
}
172172
```
173173
174-
When a `string` is provided, it will look for predefined `hoverStyle`'s within the `TouchManager.visionHoverOptions` that match the string name. This allows you to predefine and share custom hoverStyle's across your entire app.
174+
When a `string` is provided, it will look for predefined `visionHoverStyle`'s within the `TouchManager.visionHoverOptions` that match the string name. This allows you to predefine and share custom visionHoverStyle's across your entire app.
175175
176176
You can enable these effects globally throughout your app for any view which has a `tap` binding by enabling:
177177
178178
```ts
179179
TouchManager.enableGlobalHoverWhereTap = true
180180
```
181181
182-
This allows you to predefine any number of custom `hoverStyle`'s you'd like to use throughout your app. You could do so in the `app.ts` or `main.ts` (aka, bootstrap file), for example:
182+
This allows you to predefine any number of custom `visionHoverStyle`'s you'd like to use throughout your app. You could do so in the `app.ts` or `main.ts` (aka, bootstrap file), for example:
183183
184184
```ts
185185
TouchManager.enableGlobalHoverWhereTap = true
@@ -201,18 +201,18 @@ TouchManager.visionHoverOptions = {
201201
}
202202
```
203203
204-
You could then apply custom `hoverStyle`'s by their name anywhere in your app:
204+
You could then apply custom `visionHoverStyle`'s by their name anywhere in your app:
205205
206206
```xml
207-
<GridLayout hoverStyle="default" tap="tapAction"/>
208-
<GridLayout hoverStyle="slimBox" tap="tapAction"/>
209-
<GridLayout hoverStyle="round" tap="tapAction"/>
207+
<GridLayout visionHoverStyle="default" tap="tapAction"/>
208+
<GridLayout visionHoverStyle="slimBox" tap="tapAction"/>
209+
<GridLayout visionHoverStyle="round" tap="tapAction"/>
210210
```
211211
212212
You can also disable a hoverStyle on any view by adding the `visionIgnoreHoverStyle` property if desired.
213213
214214
::: info Note
215-
When no `hoverStyle` is defined and not using `TouchManager.enableGlobalHoverWhereTap`, visionOS will use default behavior by enabling hoverStyle's on standard controls as mentioned. Other views would have no hoverStyle as expected.
215+
When no `visionHoverStyle` is defined and not using `TouchManager.enableGlobalHoverWhereTap`, visionOS will use default behavior by enabling hoverStyle's on standard controls as mentioned. Other views would have no hoverStyle as expected.
216216
:::
217217
218218
### View template visionOS scoping

0 commit comments

Comments
 (0)