Skip to content

GkBottomSheet

A bottom sheet built on GkOverlay: v-model, scrim, Escape / scrim dismiss (unless persistent), transitionName="gk-bottom-sheet" (scrim fades, panel slides up), full-width surface with top-rounded corners, and optional inset padding from the viewport edges.

This is intentionally smaller than Vuetify’s VBottomSheet: no VDialog prop proxy beyond what GkOverlay already provides, no separate contentClass merge API — use attributes on the root or extend styles via tokens.

When to use

Use for bottom-anchored mobile-first action surfaces, short task pickers, or contextual actions that should not fully block page context.

Live Examples

Basic bottom sheet

Use a bottom sheet for short mobile-first contextual tasks.

Best practice: Provide aria-labelledby and a close button; sheets still need clear escape routes.

Inset sheet

Inset mode adds viewport edge breathing room.

Best practice: Use inset when the sheet contains controls that should not touch the screen edge.

Scrollable content

Constrain tall sheets with maxHeight and scrollable.

Best practice: For long content, keep the close or primary action reachable inside the scrollable region.

API

Props

PropTypeDefaultDescription
modelValuebooleanfalseOpen state; use v-model
insetbooleanfalseAdds horizontal padding around the sheet (see gk-overlay--inset on GkOverlay)
scrollablebooleantrueoverflow-y: auto on the surface when content exceeds max-height
persistentbooleanfalsePassed to GkOverlay
tostring | HTMLElement'body'Teleport target
zIndexnumber | string--gk-bottom-sheet-z-indexStack order
showScrimbooleantruePassed to GkOverlay
restoreFocusbooleantruePassed to GkOverlay
maxHeightstring | numberOptional surface max-height (numbers become px)

Additional attributes (aria-labelledby, aria-describedby, etc.) are forwarded to GkOverlay (panel element).

Slots

SlotDescription
defaultSheet body

Events

EventPayloadDescription
update:modelValuebooleanOpen state
click:outsideMouseEventScrim click (GkOverlay)
afterEnterTransition finished entering
afterLeaveTransition finished leaving

Tokens

TokenPurpose
--gk-bottom-sheet-z-indexDefault stacking (2400)
--gk-bottom-sheet-max-heightDefault max-height on the surface (90vh)
--gk-bottom-sheet-shadowPanel shadow

Try It

Change common bottom-sheet options, preview the result, and copy generated Vue code.

vue
<script setup lang="ts">
import { ref } from 'vue'
import { GkBottomSheet, GkButton } from 'god-kit/vue'

const open = ref(false)
</script>

<template>
  <GkButton type="button" @click="open = true">Open sheet</GkButton>
  <GkBottomSheet
    v-model="open"
    scrollable
    max-height="420px"
    aria-labelledby="sheet-title"
  >
    <h2 id="sheet-title">Sheet title</h2>
    <p>Sheet content.</p>
  </GkBottomSheet>
</template>

Accessibility notes

  • Provide aria-labelledby for sheet title regions.
  • Keep a clear close action when using persistent.
  • For long content, prefer scrollable to keep controls reachable on small screens.

Out of scope (v1)

Activator slot, VDialog-style prop filtering, router back, and global overlay stack.

Released under the MIT License.