inlet

Put your app in the notch.

$ npm install inlet-ui

inlet brings the dynamic island to macOS. It gives your app a home in the notch for live activities, quick alerts and panels that open on hover, with one API for SwiftUI and Electron using the same shape and motion.

Examples

Pick one and it runs in the notch at the top of this page. The code is the whole thing.

Showing Now Playing. Hover the notch at the top to open it.

Usage

States and size

The notch is always in one of four states. A message isn't a separate thing: it's the notch peeking. Pick a state and the notch at the top goes there; the green dot follows what it's really doing. The expanded notch fits its content by default, or give it an exact width, height and radius.

Opens on

Peek

Call it from anywhere: a button, a background job, the main process. A peek can carry a button (Undo), a reply field, or a level that moves in place.

Split island

By default the notch shows one activity, the one that matters most. Turn on split and a second can sit in a small bubble beside it instead of waiting behind, like the iPhone's Dynamic Island. Like a compact side, the bubble steps aside for menu bar items.

Focus Timer takes the notch; Now Playing moves to a bubble.

Drag and drop

Drag files, links or text onto the notch and it opens into a drop target. Any activity can take drops; in Electron you get the paths on disk, and the main process hears about them too. Try it on the notch at the top of this page.

Drag me to the notchor drop a file from your desktop.

Style

Fill the notch with any colour or gradient, and give peeks an accent. The band across the camera always stays black, because the hardware is. In SwiftUI it can also be a real material that blurs the desktop behind it.

Background
Accent

Motion

Opening overshoots a touch so it feels alive; closing settles without one so it feels decisive. Shape either curve and the notch at the top uses it straight away. Both platforms run the same physics, so the numbers you land on mean the same thing in SwiftUI.

starttarget0 ms200 ms400 ms600 msOpen settles · 583 msClose · 500 ms

Open
Close

Many components, one notch

Any component can start an activity. The highest priority is shown, and when it ends the notch falls back to the next. On this page, Now Playing is always running underneath the examples.

Accessibility

Press Tab and the notch at the top takes focus: Enter opens it and moves focus inside, Escape closes it and brings focus back. Every peek is read out by screen readers, and VoiceOver in SwiftUI. Give activities a label so they're announced by name. In SwiftUI, expand(focus: true) hands the keyboard to the notch from a shortcut. With reduced motion on, the springs settle without bouncing.

Every option is in the documentation.