Motoko UI Released — Explore the components
Motoko UI

Notch

A morphing black toolbar — the shell expands into options with staggered motion.

Installation

pnpm dlx shadcn@latest add @motokoui/notch

Usage

import { Notch } from "@/components/ui/notch"
 
export default function Example() {
  return (
    <Notch
      items={[
        {
          id: "tool",
          label: "Tool",
          defaultValue: "select",
          options: [
            { id: "select", label: "Select" },
            { id: "draw", label: "Draw" },
            { id: "erase", label: "Erase" },
          ],
        },
        {
          id: "mode",
          label: "Mode",
          defaultValue: "design",
          options: [
            { id: "design", label: "Design" },
            { id: "prototype", label: "Prototype" },
          ],
        },
      ]}
    />
  )
}

Click a group — the shell morphs and reveals its options. Escape or click outside to return.

Props

Notch

PropTypeDefault
itemsNotchItem[]required
position"top" | "bottom" | "inline""bottom"
align"start" | "center" | "end""center"
closeOnSelectbooleantrue
showSelectedValuebooleantrue
showDividersbooleantrue
offsetnumber24
revealbooleantrue
onItemChange(itemId, optionId, option) => void

inline keeps the shell in normal flow (useful in docs previews).

NotchItem

PropTypeDefault
idstringrequired
labelReactNoderequired
iconReactNode
optionsNotchOption[]required
valuestring
defaultValuestring
showValueboolean
onChange(optionId: string, option: NotchOption) => void

NotchOption

PropTypeDefault
idstringrequired
labelReactNoderequired
iconReactNode