Skip to content

Pinned footer

Sheet.Footer stays on the sheet’s visible bottom edge at every detent, through a drag, and on top of the on-screen keyboard. Your content scrolls behind it.

<Sheet.Root detents={[0.4, 'full']}>
<Sheet.Trigger>Checkout</Sheet.Trigger>
<Sheet.Content className="sheet">
<Sheet.Handle />
<CartItems />
<Sheet.Footer className="checkout-footer">
<button>Pay $48.00</button>
</Sheet.Footer>
</Sheet.Content>
</Sheet.Root>
.checkout-footer {
padding: 12px 16px;
box-shadow: 0 -1px 0 rgb(0 0 0 / 0.08);
}

Render it as a direct child of Sheet.Content. The footer can’t leave its parent box, so inside a shorter wrapper it stops at the wrapper’s end. Dev builds warn once when that happens.

A form is the common exception. Give it display: contents so it has no box of its own, and the submit button stays inside the form:

<Sheet.Content className="sheet">
<form style={{ display: 'contents' }} onSubmit={pay}>
<CardFields />
<Sheet.Footer>
<button type="submit">Pay $48.00</button>
</Sheet.Footer>
</form>
</Sheet.Content>

The footer takes over the panel’s bottom safe-area clearance, so its background runs under the home indicator on a phone. The inset is a transparent bottom border rather than padding, which leaves your own padding alone. Override the amount with --scrollsheet-safe-area, as on any panel.

The background defaults to the panel’s color. Set your own on the footer’s class.

A bottom toast lands on the footer’s button on a phone, and it takes the tap. Move the stack to the top:

<Toaster position="top-center" />

Or lift it clear of the footer. A 44px button with 12px of footer padding needs about 84px:

<Toaster style={{ bottom: 84 }} />
  • A content detent counts the footer’s height.
  • At the tallest detent and under a keyboard, the panel scrolls and the last row stops above the footer. A focused field scrolls clear of it too.
  • With fill, your inner scroller ends above the footer.
  • On a floating card (--scrollsheet-inset-bottom, or the docked desktop column) it rides the card’s bottom edge at full height.
  • Side panels and centered dialogs keep it at the bottom of the panel. A top sheet keeps it at the sheet’s leading edge.

--scrollsheet-footer-height holds its measured height on the dialog, for offsets of your own.

Drawer.Footer is the same component, for sheets migrated from vaul.