- Welcome
- Getting started
- Latest updates
- Foundations
-
Components
- Accordion
- Alert
- Alignment
- App Search Modal
- Aria live
- Autosuggest
- Badge
- Banner alert
- Bar chart
- Blockquote
- Bottom navigation
- Bottom sheet
- Breadcrumb
- Breakpoint
- Button
- Calendar
- Card
- Card list
- Card button
- Carousel
- Checkbox
- Chip
- Chip group
- Code
- Content cards
- Data Table
- Datepicker
- Description list
- Dialog
- Divider
- Drawer
- Field Set
- Flare
- Flat list
- Flight leg
- Floating action button
- Floating notification
- Form label
- Form validation
- Graphic promotion
- Horizontal navigation
- Icon
- Image
- Image Gallery
- Infinite scroll
- Info Banner
- Inset Banner
- Link
- List
- Map
- Mobile scroll container
- Modal
- Navigation bar
- Navigation Tab Group
- Nudger
- Overlay
- Page indicator
- Pagination
- Panel
- Phone input
- Picker
- Popover
- Price
- Progress bar
- Radio button
- Rating
- Rating Bar
- Scrollable calendar
- Search Modal
- Section header
- Section list
- Select
- Skeleton
- Skip link
- Slider
- Snackbar
- Snippet
- Spinner
- Split input
- Star rating
- Swap Button
- Switch
- Table
- Text
- Text input
- Theming
- Ticket
- Toast
- Tooltip
- Touchable native feedback
- Touchable overlay
- Search Input Summary
- Content
- Accessibility
- Contributing
- Localisation
Bottom sheet
Bottom sheets are views rendered on top of screen content, containing supplementary content that are anchored to the bottom of the screen.
Backpack-SwiftUI/Bottom sheet
Large Bottom Sheet
Day | Night |
---|---|
Medium Bottom Sheet
Day | Night |
---|---|
Content Fit Bottom Sheet
Day | Night |
---|---|
Modal Closeable Bottom Sheet
Day | Night |
---|---|
Usage
BPKBottomSheet works as a ViewModifier that can be applied to any SwiftUI View. It's presented by binding the isPresented property to a Binding<Bool>.
The medium bottom sheet can be dragged to full screen.
You can close the bottom sheet by dragging the handle, tapping the close icon or by tapping the scrim.
Large Bottom Sheet
BPKButton("Show bottom sheet") {
showBottomSheet.toggle()
}
.bpkBottomSheet(
isPresented: $showBottomSheet,
contentMode: .large) {
content
}
Closeable Bottom Sheet
BPKButton("Show bottom sheet") {
showBottomSheet.toggle()
}
.bpkCloseableBottomSheet(
isPresented: $showBottomSheet,
contentMode: .medium,
closeButtonAccessibilityLabel: "Close button") {
content
}
Content Fit Bottom Sheet
BPKButton("Show bottom sheet") {
showBottomSheet.toggle()
}
.bpkBottomSheet(
isPresented: $showBottomSheet,
contentMode: .contentFit) {
content
}
Made with ❤️ by Skyscanner © 2024
© 2024 Skyscanner Backpack. Page last updated on Aug 8, 2023, 08:30