<!--
{
  "availability" : [
    "Xcode: 15.0.0 -",
    "macOS: 14.0.0 -",
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -"
  ],
  "documentType" : "article",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Focus-Cookbook-sample",
  "metadataVersion" : "0.1.0",
  "role" : "sampleCode",
  "title" : "Focus Cookbook: Supporting and enhancing focus-driven interactions in your SwiftUI app"
}
-->

# Focus Cookbook: Supporting and enhancing focus-driven interactions in your SwiftUI app

Create custom focusable views with key-press handlers that accelerate keyboard input and support movement, and control focus programmatically.

## Overview

> Note: This sample code project is associated with WWDC23 session 
> [10162: The SwiftUI
> cookbook for focus](https://developer.apple.com/wwdc23/10162/).

---

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)