https://github.com/swifttyper/bentostack
A SwiftUI library for creating gapless, bento-style grids while maximizing space efficiency.
https://github.com/swifttyper/bentostack
bento grid-layout swiftui
Last synced: 8 months ago
JSON representation
A SwiftUI library for creating gapless, bento-style grids while maximizing space efficiency.
- Host: GitHub
- URL: https://github.com/swifttyper/bentostack
- Owner: SwiftTyper
- Created: 2025-04-17T16:37:07.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-04-18T11:40:55.000Z (8 months ago)
- Last Synced: 2025-04-18T12:21:40.999Z (8 months ago)
- Topics: bento, grid-layout, swiftui
- Language: Swift
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BentoStack

## Overview
BentoStack is a SwiftUI library for creating flexible, grid-based layouts inspired by Japanese bento boxes. Unlike traditional grids, it handles elements of varying sizes, ensuring space-efficient, gapless, and visually appealing layouts.
https://github.com/user-attachments/assets/1f41f9dc-9a01-41b3-9002-7a72b44c22fb
## Installation
### Swift Package Manager
Add it directly in Xcode:
1. Navigate to File > Swift Packages > Add Package Dependency.
2. Enter the package URL: https://github.com/SwiftTyper/BentoStack.git.
3. Follow the prompts to complete the setup.
### Usage
Import the package and use BStack in your SwiftUI views:
```swift
import BentoStack
struct ContentView: View {
var body: some View {
BStack {
//content
}
}
}
```
## Why?
This library was born from an approach I explored while developing the [Bentoit](https://github.com/SwiftTyper/WWDC_2025) app.