Layout
MobilePane
A full-screen pane above the shell for mobile drill-down such as chat threads, history and detail views.
<script>
import { MobilePane } from "@codeatlasdev/ui";
let open = $state(false);
</script>
<MobilePane bind:open title="Maria Souza" onback={() => (chatId = null)}>
<Messages />
</MobilePane>
The pane is position: fixed and covers the viewport, with a header that has a back button. Escape and the back button close it, focus moves into the pane on open and returns to the previous element on close, and the body respects safe-area insets and the virtual keyboard. It replaces hand-rolled fixed panels.
Chat
Open the pane. On a phone the text field rises with the virtual keyboard.
Code
Props
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | false | Visibility (bindable). The back button and Escape set it to false. |
title | string | – | Header title and accessible name of the pane. |
onback | () => void | – | Called after the back button or Escape closes the pane. |
children | Snippet | – | Scrollable body. |
actions | Snippet | – | Right side of the header. |
headerTitle | Snippet | – | Replaces the title text in the header (for example avatar plus name). title stays as the accessible name. |
scroll | boolean | true | false renders the body as a flex column without its own scroll, for layouts with a scrollable area and a fixed composer. |
class | string | '' | Extra class names on the pane. |