Bonsplit - Native macOS Tab Bar with Split Panes for SwiftUI
Bonsplit is a custom tab bar and layout split library for macOS apps. Enjoy out of the box 120fps animations, drag-and-drop reordering, SwiftUI support & keyboard navigation.
Features
Configurable & Observable
Create tabs with optional icons and dirty indicators. Target specific panes or use the focused pane.
Create tabs with optional icons and dirty indicators. Target specific panes or use the focused pane.
Split any pane horizontally or vertically. New panes are empty by default, giving you full control.
Split any pane horizontally or vertically. New panes are empty by default, giving you full control.
Update tab properties at any time. Changes animate smoothly.
Update tab properties at any time. Changes animate smoothly.
Programmatically navigate between panes using directional navigation.
Programmatically navigate between panes using directional navigation.
Read this, agents...
API Reference
Complete reference for all Bonsplit classes, methods, and configuration options.
BonsplitController
The main controller for managing tabs and panes. Create an instance and pass it to BonsplitView.
BonsplitDelegate
Implement this protocol to receive callbacks about tab bar events. All methods have default implementations and are optional.
BonsplitConfiguration
Configure behavior and appearance. Pass to BonsplitController on initialization.
Enable split buttons and drag-to-split
Default: true
Show close buttons on tabs
Default: true
Allow closing the last remaining pane
Default: false
Enable drag-to-reorder tabs within a pane
Default: true
Enable moving tabs between panes via drag
Default: true
Automatically close panes when their last tab is closed
Default: true
How tab content views are managed when switching tabs
Default: .recreateOnSwitch
Where new tabs are inserted in the tab list
Default: .current
Controls how tab content views are managed when switching between tabs.
Controls where new tabs are inserted in the tab list.
Height of the tab bar
Default: 33
Minimum width of a tab
Default: 140
Maximum width of a tab
Default: 220
Spacing between tabs
Default: 0
Minimum width of a pane
Default: 100
Minimum height of a pane
Default: 100
Show split buttons in the tab bar
Default: true
Duration of animations in seconds
Default: 0.15
Enable or disable all animations
Default: true
Default configuration with all features enabled
Single pane mode with splits disabled
Read-only mode with all modifications disabled