macos-notch-ui
БесплатноБез исполняемых скриптовНе проверенAdd a Dynamic Island-style notch UI to a macOS app. Use this skill whenever the user wants to create a notch overlay, notch extender, Dynamic Island for Mac…
от fayazara★ 698 звёзд на GitHubОб этом скилле
macOS Notch UI (Dynamic Island Style)
This skill creates a Dynamic Island-style overlay that extends from the MacBook's hardware notch. The overlay is a transparent floating panel positioned flush against the top of the screen, using a custom shape with concave "ear" curves that blend seamlessly with the physical notch cutout.
Architecture
The implementation has 3 parts:
NotchWindow(NSPanel subclass) -- a borderless, transparent, click-through panel atCGShieldingWindowLevelthat sits above everything, including the menu barNotchShape(SwiftUI Shape) -- draws the Dynamic Island silhouette with concave quadratic Bezier curves at the top corners and convex rounded corners at the bottom- Your content view -- whatever you want to show inside the notch (status indicators, waveforms, text, icons)
How It Works
The MacBook notch is a black rectangle at the top-center of the screen. By placing a black-filled NotchShape at that exact position at the highest window level, it visually extends the notch area. Content inside the shape appears to "emerge" from the hardware notch.
The key positioning math:
// Use full screen frame (not visibleFrame) to include the menu bar / notch area
let screen = NSScreen.main!
let x = screen.frame.origin.x + (screen.frame.width - totalWidth) / 2
let y = screen.frame.origin.y + screen.frame.height - totalHeight
Using screen.frame (not screen.visibleFrame) is critical -- visibleFrame excludes the menu bar area where the notch lives.
Reference Files
references/NotchWindow.swift-- Drop-in NSPanel subclass with show/hide and positioningreferences/NotchShape.swift-- The Dynamic Island shape with animatable corner radii
Step-by-Step Integration
1. Add the NotchShape
Copy references/NotchShape.swift. This is a SwiftUI Shape with two configurable corner radii:
topCornerRadius(default 10) -- the concave "ear" curves at the top that mimic the hardware notch's inverse cornersbottomCornerRadius(default 16) -- the standard convex rounded corners at the bottom
Both are animatable via animatableData, so SwiftUI can smoothly interpolate shape changes.
2. Create Your Content View
Build whatever you want to show inside the notch. The content should be clipped to NotchShape and filled with black background:
struct NotchContentView: View {
var isVisible: Bool
var body: some View {
HStack {
Image(systemName: "mic.fill")
.foregroundStyle(.red)
Text("Recording")
.font(.system(size: 13, weight: .medium))
.foregroundStyle(.white)
}
.frame(width: isVisible ? 200 : 0)
.frame(height: 32)
.background(NotchShape().fill(.black))
.clipShape(NotchShape())
.animation(.spring(response: 0.35, dampingFraction: 0.75), value: isVisible)
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .top)
}
}
3. Add the NotchWindow
Copy references/NotchWindow.swift. This is a generic NSPanel that:
- Creates a borderless, transparent, non-activating panel
- Positions at
CGShieldingWindowLevel(above everything) - Centers at the top of the screen, flush with the top edge
- Ignores mouse events (fully click-through)
- Joins all spaces and survives fullscreen
4. Show and Hide
// Create once and reuse
let notchWindow = NotchWindow()
// Show with your content
let content = NotchContentView(isVisible: true)
notchWindow.showNotch(content: content)
// Hide with spring collapse animation
notchWindow.hideNotch()
Spring Animation Choreography
The Dynamic Island effect comes from a specific animation sequence:
Show:
- Window appears instantly (
orderFront) - On the next runloop tick,
isVisibletoggles totrue - The width animates from 0 to the target width with
.spring(response: 0.35, dampingFraction: 0.75)
This two-step approach (instant window, then animated content) is necessary because SwiftUI needs the view to be in the hierarchy before it can animate.
Hide (3-step choreography):
- Clear any expanded content (text, details) -- collapses to compact shape
- After 0.25s, set
isVisible = false-- triggers the spring width collapse to 0 - After 0.65s, remove the window (
orderOut)
The delays are tuned so each animation completes before the next starts. This creates the smooth "shrink into the notch" effect.
// Step 1: collapse content
state.isExpanded = false
// Step 2: shrink width
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
state.isVisible = false
}
// Step 3: remove window
DispatchQueue.main.asyncAfter(deadline: .now() + 0.65) {
window.orderOut(nil)
}
Screen Geometry Details
| Property | Value | Why |
|---|---|---|
| Window level | CGShieldingWindowLevel() |
Above everything including menu bar |
| Position origin | NSScreen.main.frame (not |
Установить macos-notch-ui в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл macos-notch-ui?
Add a Dynamic Island-style notch UI to a macOS app. Use this skill whenever the user wants to create a notch overlay, notch extender, Dynamic Island for Mac, notch indicator, or any UI that extends from the MacBook notch area. Also trigger when the user mentions "notch shape", "notch window", "notch cutout", "notch panel", "recording indicator near the notch", "Dynamic Island style", or wants to show status/content that appears to emerge from the hardware notch. This covers the NSPanel setup, the NotchShape with concave Bezier ear curves, screen positioning math, spring animations, and show/hide choreography.
Как установить скилл macos-notch-ui?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл macos-notch-ui запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic