Skip to Content
Kokonut UI

NV-06Navigation

Smooth Drawer

Checkout bottom sheet on Vaul snap points, peeking at the total and dragging up for details.

Install with
lucide-react, motion

PRODocs Search and more like it are in Kokonut UI Pro

Installation

Smooth Drawer is a free, open-source React component in the Kokonut UI Navigation collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/smooth-drawer.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/smooth-drawer

Or add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/smooth-drawer.tsx.

npm install lucide-react motion

Usage

import SmoothDrawer from "@/components/kokonutui/smooth-drawer";

export default function Example() {
  return <SmoothDrawer />;
}

Props

title
stringDefault "Order summary"
description
string

Line under the title. Defaults to the item count and arrival estimate.

items
OrderItem[]Default built-in
taxRate
numberDefault 0.08

Tax rate applied to the subtotal.

currency
stringDefault "USD"

ISO 4217 currency code.

triggerLabel
stringDefault "Review order"
confirmLabel
stringDefault "Pay"
onConfirm
(summary: OrderSummary) => void

Called with the final breakdown; the sheet closes afterwards.

open
boolean
defaultOpen
booleanDefault false
onOpenChange
(open: boolean) => void

OrderItem

idrequired
string
namerequired
string
detail
string

Variant line, e.g. "Sand · M".

pricerequired
number

Unit price.

quantity
number

OrderSummary

deliveryrequired
DeliverySpeed
subtotalrequired
number
shippingrequired
number
taxrequired
number
totalrequired
number

DeliverySpeed

type DeliverySpeed = "standard" | "express";

Dependencies

NeedsVersionComes from
lucide-react^0.556.0npm, installed by the CLI
motion^12.23.25npm, installed by the CLI
drawershadcn/ui, added by the CLI
buttonshadcn/ui, added by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.