ボトムアクションバーBottomActionBarExperimental
The sticky mobile action dock every transactional / real-time consumer screen ends with: a running summary on the left (合計金額 / 到着まで○分 / 選択件数) and the primary CTA on the right (呼ぶ / 支払う / 予約する), pinned to the bottom with a top border and safe-area-inset padding (home indicator). The bottom bookend to PageHeader (the top app bar) — for checkout, ride-hailing, booking, food-order, seat-select. children = the summary slot, actions = the CTA slot; set stack for a full-width CTA above the summary, maxWidth to centre on tablet. RSC-safe (no client deps).
プレビュー
Props
表は横にスクロールできます
| プロパティ | 型 | 初期値 | 説明 |
|---|---|---|---|
| children | ReactNode | - | 左の走行サマリ(合計金額/到着まで○分/件数)。残り幅を取る。 |
| actions | ReactNode | - | 右寄せのアクション(主要CTA+任意の副次)。各 ≥44px。 |
| stack | boolean | false | CTA をサマリの上に全幅で積む(横並びでなく縦)。 |
| sticky | boolean | true | スクロールコンテナの下部に固定。 |
| maxWidth | "sm" | "md" | "lg" | "xl" | - | タブレット/デスクトップで中央寄せ+幅上限。 |
Usage
import { BottomActionBar, Button } from "@gunjo/ui"
<BottomActionBar actions={<Button size="lg" onClick={call}>この内容で呼ぶ</Button>}>
<div className="flex flex-col">
<span className="text-xs text-muted-foreground">見積もり料金</span>
<span className="text-base font-semibold tabular-nums">¥1,200〜・到着 4分</span>
</div>
</BottomActionBar>
// full-width CTA above the summary:
<BottomActionBar stack actions={<Button size="lg">支払う</Button>}>…</BottomActionBar>