You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docsite/api/intro.md
+1-8Lines changed: 1 addition & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,4 @@ slug: /
7
7
8
8
Welcome to the React Native macOS API reference documentation. This section covers macOS-specific props and events that extend the standard React Native components.
9
9
10
-
## View Component Extensions
11
-
12
-
React Native macOS extends the standard View component with additional props and events designed specifically for macOS:
13
-
14
-
-**[View Props](./view-props.md)** - macOS-specific properties for customizing view behavior
15
-
-**[View Events](./view-events.md)** - macOS-specific events for handling user interactions
16
-
17
-
These extensions allow you to build truly native macOS experiences while leveraging the React Native framework.
10
+
Most of the additional functionality out of React Native macOS directly is in the form of additional props and callback events implemented on `<View>`, to provide macOS and desktop specific behavior
React Native macOS extends the standard React Native View component with additional events that are specific to macOS. These events allow you to respond to macOS-specific user interactions such as keyboard input, mouse movements, drag and drop operations, and more.
9
9
10
-
## Events
10
+
## Focus
11
11
12
-
### `onBlur`
13
-
14
-
Fired when the view loses focus.
15
-
16
-
**Event Data:** Standard focus event
17
-
18
-
This event is useful for implementing custom focus management and validation logic when a view loses keyboard focus.
19
-
20
-
---
21
-
22
-
### `onDoubleClick`
23
-
24
-
Fired when the user double-clicks on the view.
25
-
26
-
**Event Data:** Mouse event with the following properties:
27
-
-`clientX`: Horizontal position in the target view
Fired when a drag operation enters the view's bounds.
50
-
51
-
**Event Data:** Drag event with mouse position and data transfer information
52
-
53
-
This event is fired when the user drags content over the view. Use this to provide visual feedback that the view can accept the dragged content.
54
-
55
-
---
56
-
57
-
### `onDragLeave`
58
-
59
-
Fired when a drag operation leaves the view's bounds.
12
+
This event is useful for implementing custom focus management and showing focus-specific UI elements. For these to fire, the prop [focusable](view-props#focusable) must be set.
60
13
61
-
**Event Data:** Drag event with mouse position and data transfer information
14
+
### `onFocus`
62
15
63
-
This event is fired when the user drags content away from the view. Use this to remove any visual feedback shown during drag enter.
16
+
Fired when the view receives focus.
64
17
65
18
---
66
19
67
-
### `onDrop`
68
-
69
-
Fired when the user drops content onto the view.
70
-
71
-
**Event Data:** Drag event with the following properties:
72
-
- Mouse position (`clientX`, `clientY`, `screenX`, `screenY`)
Copy file name to clipboardExpand all lines: docsite/api/view-props.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
-
sidebar_label: 'View Props (macOS)'
2
+
sidebar_label: 'Props'
3
3
sidebar_position: 1
4
4
---
5
5
6
-
# View Props (macOS)
6
+
# Props
7
7
8
-
React Native macOS extends the standard React Native View component with additional props that are specific to macOS. These props allow you to customize the behavior and appearance of views to take advantage of macOS-specific features.
8
+
React Native macOS extends the standard React Native `<View>` component with additional props that are specific to macOS. These props allow you to customize the behavior and appearance of views to take advantage of macOS-specific features.
9
9
10
10
## Props
11
11
@@ -29,7 +29,7 @@ Enables the vibrancy effect for the view, allowing it to blend with the content
29
29
| ---- | ------- |
30
30
| bool |`false`|
31
31
32
-
When `true`, the view will use macOS vibrancy effects, creating a translucent appearance that adapts to the content behind the window.
32
+
When `true`, the view will use macOS vibrancy effects, creating a translucent appearance that adapts to the content behind the window. This makes a difference when content is placed on top of a native [NSVisualEffectView](https://developer.apple.com/documentation/appkit/nsvisualeffectview), such as with the native module [VibrancyView](https://github.com/microsoft/fluentui-react-native/tree/main/packages/experimental/VibrancyView)
33
33
34
34
---
35
35
@@ -41,7 +41,7 @@ Specifies the mouse cursor to display when hovering over the view.
41
41
| ------ |
42
42
| string |
43
43
44
-
Sets the cursor style. Common values include `'pointer'`, `'default'`, `'text'`, etc.
44
+
Sets the cursor style. This extends the React Native prop to support a larger range of the W3C cursor types supported on web.
45
45
46
46
---
47
47
@@ -53,7 +53,7 @@ Specifies the types of dragged content that the view accepts for drag and drop o
53
53
| --------------- |
54
54
| array of string |
55
55
56
-
An array of UTI (Uniform Type Identifier) strings that the view will accept. For example: `['public.file-url', 'public.text']`.
56
+
An array of UTI (Uniform Type Identifier) strings that the view will accept. Currently supported: `['fileUrl', 'image', 'string']`.
57
57
58
58
---
59
59
@@ -71,7 +71,7 @@ When `true`, macOS will draw the standard focus ring around the view when it rec
71
71
72
72
### `focusable`
73
73
74
-
Determines whether the view can receive keyboard focus.
74
+
Determines whether the view can receive keyboard focus. This prop has been extended from React Native Core to support all views.
0 commit comments