Skip to Content
Kokonut UI

IN-15InputsNew, October 22, 2026

Tip Selector

A tip picker for checkout, set on a tape you drag and flick. The ticks you pass fill in, the amounts roll, and Round up makes the total a whole amount.

Install with
lucide-react, motion

PRONatural Date Input and more like it are in Kokonut UI Pro

Installation

Tip Selector is a free, open-source React component in the Kokonut UI Inputs collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/tip-selector.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/tip-selector

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

npm install lucide-react motion

Usage

import TipSelector from "@/components/kokonutui/tip-selector";

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

Props

subtotal
numberDefault 42.6

The order before the tip.

recipient
{ name: string; note?: string }Default { name: "Sam", note: "Your courier · 6 min earl…

Who the tip goes to.

percents
number[]Default [15, 18, 20]

Marked on the tape and offered as shortcuts, in percent.

defaultPercent
numberDefault 18

Where the tape starts.

max
numberDefault 30

The far end of the tape, in percent.

currency
stringDefault "$"
onChange
(tip: number) => void
onPay
(total: number) => void
className
string

Extra classes for the root element.

Dependencies

NeedsVersionComes from
lucide-react^0.556.0npm, installed by the CLI
motion^12.23.25npm, installed 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.