blaze-motion
← All components

Grow from Origin

Scale

Fade + scale (~0.85 → 1) anchored to a transform-origin corner — the dropdown/popover entrance.

menu
origin="top-left"
menu
origin="top-right"
menu
origin="bottom-left"
menu
origin="center"

Installation

One command drops the source into your repo — editable, with the provider and motion pulled in automatically.

npx shadcn add https://motion.asmitsah.dev/r/grow-from-origin.json

Usage

Basic

Fade + scale ~0.85 → 1, anchored to origin. Plays on mount by default — the dropdown/tooltip/popover entrance.

import { GrowFromOrigin } from "@/components/motion/grow-from-origin";

<GrowFromOrigin origin="top-left">
  <DropdownMenu />
</GrowFromOrigin>

Origin

Anchor the grow to any of 9 corners/edges/center to match where the trigger sits.

<GrowFromOrigin origin="top-right">
  <PopoverContent />
</GrowFromOrigin>

<GrowFromOrigin origin="bottom-left">
  <Tooltip />
</GrowFromOrigin>

<GrowFromOrigin origin="center">
  <Modal />
</GrowFromOrigin>

Trigger on scroll

Scope it to viewport entry instead of mount — for a card that grows in as the page scrolls.

<GrowFromOrigin origin="center" trigger="inView">
  <PricingCard />
</GrowFromOrigin>

Props

PropTypeDefaultDescription
childrenReactNodeThe popover/menu content that grows in, anchored to origin.
origin"top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "right" | "center""top"The transform-origin corner/edge/center it scales up from.
trigger"inView" | "mount""mount"Menus/tooltips play on mount by default; pass trigger="inView" to scope it to scroll entry instead.
classNamestringPassed straight through — GrowFromOrigin becomes your layout element.
styleCSSPropertiesInline style passthrough.
delaynumber0Seconds before this instance animates.