Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Text & Effects

Gravity Letters

Text & Effects

Gravity Letters React component for Tailwind CSS v4

Background PatternMarquee
Live props
Content
type
initialText
Behavior
gravity800px/sยฒ
bounce0.22
holdDelay300ms
pourInterval120ms
maxGlyphsNo limit
deviceTilt
Appearance
size28px
color
weight
sizeVariance0.2
Code
import GravityLetters from "@/components/ui/gravity-letters"

<GravityLetters />
  1. Home
  2. Components
  3. Text & Effects
  4. Gravity Letters
Free

Gravity Letters React component for Tailwind CSS v4

v1.0.1ยทUpdated in 1.2.1

A React physics text effect: a gravity field where letters, numbers, emoji or any components you pass fall and pile up like real objects.

The field opens by pouring its initial text, letter by letter, onto the floor. Click or tap anywhere to drop a glyph, or press and hold to pour a steady stream that follows your pointer. Glyphs tumble as they fall, bounce softly when they land, and pile up into rounded hills. On phones, tilt the device to spill the pile toward the low side. With reduced motion on, glyphs appear straight on the pile.

Gravity Letters is a free React component in the React effect components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add gravity-letters, together with UIProvider.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide ยท Next.js setup ยท Vite setup

npx wingo-ui@latest add gravity-letters

Usage

Import GravityLetters from @/components/ui/gravity-letters.

import GravityLetters from "@/components/ui/gravity-letters"

export function Demo() {
  return (
    <GravityLetters type="letters" className="h-96 w-full rounded-3xl border">
      {/* anything you render inside sits under the falling glyphs */}
      <p className="absolute inset-0 grid place-items-center text-sm text-muted-foreground">
        Click anywhere
      </p>
    </GravityLetters>
  )
}

// A blank field, or your own opening word:
// <GravityLetters initialText="" />
// <GravityLetters initialText="404" type="numbers" />

// Digits instead:
// <GravityLetters type="numbers" />

// Or drop your own content: emoji, icons, any component:
// <GravityLetters items={["๐ŸŽ", "๐ŸŠ", "๐Ÿ‡", <Sparkles key="s" className="size-7" />]} />

Props

  • typedefault "letters"
    "letters" | "numbers" | "both"

    Which pool to draw from: letters, digits, or both. Ignored when items is set.

  • initialTextdefault "HELLO"
    string

    Letters poured across the middle of the field on mount, one after another, so it never starts empty. Spaces leave gaps; pass an empty string for a blank field.

  • items
    React.ReactNode[]

    Your own drop pool: emoji, icons, or any components. Each drop picks a random entry. Overrides type.

  • gravitydefault 800
    number

    Downward acceleration in px/sยฒ. Lower is floatier, higher is heavier. Changes apply mid-fall.

  • sizedefault 28
    number

    Base glyph size in pixels. Each drop varies by up to 20% around it. Applies to new drops.

  • colordefault "currentColor"
    string

    Glyph color, any CSS color. Defaults to currentColor so it follows your theme.

  • weightdefault "semibold"
    "normal" | "medium" | "semibold" | "bold"

    Font weight of the falling glyphs.

  • sizeVariancedefault 0.2
    number

    How much a dropped glyph's size varies around size: 0.2 means 80% to 120%. initialText letters always use size exactly.

  • bouncedefault 0.22
    number

    How much of its speed a glyph keeps on its first touch down, 0 (a thud) to 0.95.

  • holdDelaydefault 300
    number

    How long a press has to last, in milliseconds, before glyphs start pouring.

  • pourIntervaldefault 120
    number

    Time between glyphs while pouring, in milliseconds.

  • maxGlyphsdefault 0
    number

    Max glyphs kept in the field; past the cap the oldest fade out and the pile settles into the gap. 0 keeps every glyph, which is the default.

  • deviceTiltdefault true
    boolean

    Tilting a phone spills the pile toward the low side. iOS asks for motion permission on the first tap.

  • children
    React.ReactNode

    Rendered under the glyph layer, e.g. a hint or an empty state. Clicks on it still drop glyphs unless a handler calls preventDefault.

  • className
    string

    Extra classes for the root element. Use it to size the field; glyphs pile on its bottom edge and are clipped to it. Pointer handlers you pass run before the drop.

Examples

Celebrating empty state

items swaps the letters for emoji; the message sits behind the pile and maxGlyphs keeps it light.

Numbers in a brand color

type numbers pours 2026 on load in bold orange; every click adds a random digit.

Your own components

Any element can fall, here tag pills with no size variance and a bouncier landing.

Dependencies

ui-config

Files

  • components/ui/gravity-letters.tsx

FAQ

Is the React Gravity Letters component free?

Yes. The source is free and needs no account: copy it from the Code tab or install it with the CLI.

How do I install Gravity Letters?

Run npx wingo-ui@latest add gravity-letters. It also adds the Wingo UI item it builds on (UIProvider). With shadcn, run npx shadcn@latest add https://wingo-ui.com/r/gravity-letters.json.

How does Gravity Letters behave on phones?

On phones, tilt the device to spill the pile toward the low side.

See also

Background PatternGrid RevealEmpty StateAnimated Counter

More React effect components

MarqueeTerminalText AnimateText Rotate
All 6 React effect components

Articles using this component

  • Magic UI Alternatives: 5 Animated React Libraries Compared

    Comparisons and alternatives ยท Oct 16, 2026 ยท 11 min read

PreviousBackground PatternNext Marquee
Click anywhere in the boxPress and hold to pour