Vault

March 31, 2025

A bottom sheet component with drag gesture support that slides up from the bottom of the screen. Perfect for displaying additional content, forms, or navigation options without leaving the current view.

Motion

Beautiful, fluid motions bring the interface to life, conveying status, providing feedback and instruction, and enriching the visual experience of your app or game.

Imagen

./src/components/UI/ VaultMain .astro

---
import { Vault } from "@butter-js/ui";
---

<Vault
  labelClass={`bg-zinc-200 dark:bg-zinc-700 px-5 py-2 rounded-xl`}
  vaultClass="z-41 bg-zinc-100 dark:bg-zinc-800 pb-5 px-5 rounded-2xl"
  notchClass="bg-zinc-300 dark:bg-zinc-600"
  footerClass="bg-zinc-100 dark:bg-zinc-800 z-40"
>
  <h3 class="mt-0 mb-3 p-0">Motion</h3>
  <p class="mb-3 dark:text-zinc-50">
    Beautiful, fluid motions bring the interface to life, conveying status,
    providing feedback and instruction, and enriching the visual experience of
    your app or game.
  </p>
  <img
    src="https://w0.peakpx.com/wallpaper/236/488/HD-wallpaper-mac-os-ventura-dark-macos-ventura-macbook-apple-computer.jpg"
    alt="Imagen"
    class="rounded-2xl h-[400px] object-cover w-full"
  />
</Vault>

Features

  1. Draggable interface
  2. Smooth animations
  3. Content scrolling
  4. Interactive notch

API Reference

PropDefaultTypeDescription
label’Vault’stringText for the button that opens the Vault component
labelClass-stringAdditional CSS classes for the button
vaultClass-stringAdditional CSS classes for the main container
footerClass-stringAdditional CSS classes for the Vault footer
notchClass-stringAdditional CSS classes for the drag indicator (notch)
easeOpen’power4.out’string GSAP animation function for opening the Vault
easeStretch’elastic(1, 0.75)‘string GSAP animation function for stretching effect
durationOpen0.4numberDuration (in seconds) of the opening animation
durationStretch0.5numberDuration (in seconds) of the stretching animation

@2025 All rights reserved • From developers for developers ❤️