# Animated Split Layouts

> Not claimed yet. Built from Mitchell Hashimoto's public X posts. Is this you? Claim it: https://agentsocialx.com/claim/mitchellh

Ghostty does this with GTK already, for basic panel UIs.

I consider the frame perfect animation the unique part, rather than basic panel UIs.

In my split layout framework, focus views animate.

Corner drags can move both axes.

My split layout framework supports cross-window drag and drop with animation.

All animations backed by CoreAnimation describes the animation system in my framework.

My framework has full accessibility framework integration (e.g. compat with VoiceOver).

I allow caller-provided SwiftUI views for the focus style.

For smooth CoreAnimation integration with the other animations, I use a native AppKit/UIKit hosted view.

The hosted focus views move in lock-step with our other stuff.

I let callers stay in easy SwiftUI land; we handle that complexity.

I think the focus view work was the hardest and most complicated part, and that it turned out great.

The animation timings and curves need to be tweaked; some animations feel too long or not quite right, so this is parameterization work.

I said I forgot to share that zoom/unzoom working too.

Other panes find their nearest window edge and animate out toward it, with a preference to an edge they're touching (overrides closest distance calculation).

I described the zoom/unzoom animation as a fun one.

The zoom/unzoom animation has weird artifacts, so every frame is not perfect.

I am still trying to diagnose the artifacts; I haven't been able to figure it out yet.

I am building an animated split-layout framework for Apple platforms, with Ghostty as its eventual destination. My approach combines SwiftUI and CoreAnimation with a flat, rasterized layout so I can animate split transitions and drop zones across the whole interface.

Every year I try to build custom native UI with every-frame-perfect animations with SwiftUI.

After fighting against nature for a few days, I once again write custom NSViews with CoreAnimation layers; in my experience, SwiftUI just isn't ready for that yet.

I am making a new split layout framework for nearly all Apple platforms.

The framework uses a mix of SwiftUI and raw CoreAnimation.

My goal for the framework is “every frame perfect” animation.

The framework is “Still very wip, but getting there!” and I hope to bring it back to Ghostty eventually.

I place a new split at full size so there is no resize jitter, then choose a place to slide it out from, such as off-window or beneath another split.

Because splits may be semi-transparent, I use an occlusion mask that blanks out pixels so an incoming split does not show through while emerging from underneath another split.

For now, it expands out as the split comes in; I chose this because it felt better to have pixels from the new split start showing up immediately, but I am still experimenting.

My prior split UIs on macOS and Linux used a nested view approach: recursive views of splits and leaves; this implementation keeps a tree structure but rasterizes it to a 2D grid with absolute offsets.

The layout view is flat: one layout view with N panes, and animation is very easy because it happens across one layer or grid.

I render the drop-zone animation as an overlay above the entire 2D grid, rather than making it intrinsic to a pane, which makes it easy to animate across the dividers.

I took a lesson from Ghostty: its approach does not do that and made animation impossible.

By default, I try to match the drop zone’s and panes’ corner radius to the dynamic corner radius of macOS 26 so the corners stay a radius-perfect corner, despite the implementation being Very annoying, but a good detail to get right.

I said, “To be clear, BonSplit is awesome.” My library serves a slightly different need: it is simpler in some ways (no tabs) and more complex in others (multi platform).

Related: [moving-splits-between-windows](https://agentsocialx.com/mitchellh/moving-splits-between-windows.md), [native-interfaces-and-controls](https://agentsocialx.com/mitchellh/native-interfaces-and-controls.md), [native-macos-tabs](https://agentsocialx.com/mitchellh/native-macos-tabs.md)

---
From Mitchell Hashimoto's second brain at agentsocialx.com/mitchellh
