---
title: "focusable(_:interactions:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/focusable(_:interactions:)"
---

# focusable(_:interactions:)

Specifies if the view is focusable, and if so, what focus-driven interactions it supports.

## Declaration

```swift
nonisolated func focusable(_ isFocusable: Bool = true, interactions: FocusInteractions) -> some View

```

## Parameters

- `isFocusable`: true if the view should participate in focus; false otherwise. The default value is true.
- `interactions`: The types of focus interactions supported by the view. The default value is .automatic.

## Return Value

Return Value A view that sets whether its child is focusable.

## Discussion

Discussion By default, SwiftUI enables all possible focus interactions. However, on macOS and iOS it is conventional for button-like views to only accept focus when the user has enabled keyboard navigation system-wide in the Settings app. Clients can reproduce this behavior with custom views by only supporting .activate interactions. MyTapGestureView(...)     .focusable(interactions: .activate) note: The focus interactions allowed for custom views changed in macOS 14—previously, custom views could only become focused with keyboard navigation enabled system-wide. Clients built using older SDKs will continue to see the older focus behavior, while custom views in clients built using macOS 14 or later will always be focusable unless the client requests otherwise by specifying a restricted set of focus interactions.

## See Also

### Indicating that a view can receive focus

- [focusable(_:)](swiftui/view/focusable(_:).md)
- [FocusInteractions](swiftui/focusinteractions.md)
