focusable

Specifies if the view is focusable.

View ModifieriOS 17.0+macOS 12.0+tvOS 15.0+watchOS 8.0+

Overloads

2 ways to call compose().focusable(). Each is one SwiftUI overload, picked by the arguments you pass.

React
compose().focusable(isFocusable?: boolean)
Swift
nonisolated func focusable(_ isFocusable: Bool = true) -> some View

Parameters

  • isFocusableboolean

    A Boolean value that indicates whether this view is focusable.

Return value

A view that sets whether a view is focusable.

See also

More in Focus.