diff --git a/resources/views/docs/mobile/4/edge-components/bottom-sheet.md b/resources/views/docs/mobile/4/edge-components/bottom-sheet.md index 2a192834..79f4493d 100644 --- a/resources/views/docs/mobile/4/edge-components/bottom-sheet.md +++ b/resources/views/docs/mobile/4/edge-components/bottom-sheet.md @@ -39,12 +39,17 @@ Per Material 3, the container color resolves from `theme.surface`. For a custom - `large` - `full` (100% of screen) - A numeric fraction `0.0`–`1.0` for a custom height (e.g. `"0.4"` for 40%) +- `title` - The sheet's title, drawn the way each platform draws its own sheets (optional, string). See + [Titled sheet](#titled-sheet) +- `close-label` - What VoiceOver reads for the close button of a titled iOS sheet (optional, string, default: the + system's own label on iOS 26, "Close" before it). Also accepted as `closeLabel` - `a11y-label` - Accessibility label (optional) - `a11y-hint` - Accessibility hint (optional) ## Events -- `@dismiss` - Component method called when the sheet is dismissed (swipe down or tap outside) +- `@dismiss` - Component method called when the sheet is dismissed (swipe down, tap outside, or the close button of a + titled iOS sheet) ## Children @@ -52,6 +57,59 @@ Accepts any EDGE elements as children. The children are rendered inside the shee ## Examples +### Titled sheet + +Give the sheet a `title` instead of drawing your own heading row. Each platform then draws it the way its own sheets +look: + +- **iOS** puts the title in the sheet's navigation bar and adds the system close button on the bar's leading edge, + as Apple's Human Interface Guidelines ask for sheets. On iOS 26 it's the system's close button; on earlier versions, + a filled xmark circle. +- **Android** shows the title as heading text under the drag handle. Material's modal bottom sheet has no close + button, so none is added: people close it by swiping down, tapping the scrim, or pressing back. + +@verbatim +```blade +@php + $showFilters = false; + $openNow = false; + $indoorOnly = false; +@endphp + + + + + + + + + + + +``` +@endverbatim + + + ### Action sheet @verbatim @@ -151,12 +209,15 @@ use Native\Mobile\UI\Elements\BottomSheet; BottomSheet::make() ->visible($showSheet) ->detents('medium,large') + ->title('Filters') ->onDismiss('hideSheet'); ``` - `make()` - Create a bottom sheet - `visible(bool $value = true)` - Toggle visibility - `detents(string $detents)` - Allowed heights +- `title(string $title)` - The sheet's title; an empty string leaves the sheet untitled +- `closeLabel(string $label)` - VoiceOver label for the close button of a titled iOS sheet - `a11yLabel(string $value)` - Accessibility label - `a11yHint(string $value)` - Accessibility hint - `onDismiss(string $method)` - Component method invoked on dismissal