Skip to content
MoonUIMoonUI
ComponentsTemplatesPricing
Sign inGet started

Getting started

  • Introduction
  • Installation
  • CDN
  • Authentication
  • shadcn CLI
  • MCP Server
  • Usage

Components

Foundation25 components
  • Alert
  • Aspect Ratio
  • Avatar
  • Badge
  • Button
  • Button Group
  • Checkbox
  • File Upload
  • Input
  • Kbd
  • Label
  • Radio Group
  • Rating
  • Select
  • Slider
  • Switch
  • Textarea
  • Toggle
  • Toggle Group
  • Separator
  • Tags Input
  • Color Picker
  • Date Picker
  • Simple Editor
  • Input OTP
Layout10 components
  • Accordion
  • Breadcrumb
  • Card
  • Carousel
  • Collapsible
  • ResizablePro
  • Scroll Area
  • StepperPro
  • Table
  • Tabs
Navigation & Overlays11 components
  • Alert DialogPro
  • Command
  • Context MenuPro
  • Dialog
  • Dropdown Menu
  • Hover CardPro
  • MenubarPro
  • Pagination
  • Popover
  • SheetPro
  • Tooltip
Feedback4 components
  • Progress
  • Skeleton
  • Spinner
  • Toast
Data & Analytics4 components
  • Data TablePro
  • Advanced ChartPro
  • DashboardPro
  • WidgetsPro
Navigation4 components
  • Command AI+Pro
  • SidebarPro
  • NavbarPro
  • Navigation MenuPro
AI Chat4 components
  • MessagePro
  • Message ScrollerPro
  • AttachmentPro
  • Conversation MarkerPro
Content Management6 components
  • Advanced FormsPro
  • Form WizardPro
  • Quiz FormPro
  • Credit Card InputPro
  • Phone Number InputPro
  • Rich Text EditorPro
Project Management3 components
  • KanbanPro
  • TimelinePro
  • CalendarPro
Performance & Utility8 components
  • Virtual ListPro
  • Memory Efficient DataPro
  • Lazy ComponentPro
  • Optimized ImagePro
  • Performance MonitorPro
  • Performance DebuggerPro
  • Error BoundaryPro
  • Health CheckPro
Interactive & Animation15 components
  • Animated NumberPro
  • Floating DockPro
  • Text RevealPro
  • Image ComparePro
  • Splash CursorPro
  • GitHub StarsPro
  • Animated ButtonPro
  • Magnetic ButtonPro
  • Magnetic ElementsPro
  • Mouse TrailPro
  • Hover Card 3DPro
  • Spotlight CardPro
  • Floating Action ButtonPro
  • LightboxPro
  • Media GalleryPro
Gesture & Touch7 components
  • Swipeable CardPro
  • Draggable ListPro
  • Pinch ZoomPro
  • Swipe ActionsPro
  • Gesture DrawerPro
  • Click AnimationsPro
  • Touch GesturesPro
Text Animations12 components
  • Text HighlighterPro
  • Typewriter TextPro
  • Scrambled TextPro
  • Word RotatePro
  • Morphing TextPro
  • Flip TextPro
  • Number TickerPro
  • Glitch TextPro
  • Shiny TextPro
  • Wavy TextPro
  • Gradient TextPro
  • Text 3DPro
Animations12 components
  • Animated ListPro
  • Bounce EffectPro
  • Blur FadePro
  • Elastic AnimationPro
  • MarqueePro
  • Parallax ScrollPro
  • Reveal CardsPro
  • Scroll RevealPro
  • Fade TransitionsPro
  • Focus TransitionsPro
  • Path AnimationsPro
  • SVG AnimationsPro
Layouts1 components
  • Bento GridPro
Effects9 components
  • ConfettiPro
  • Cursor TrailPro
  • Glow EffectPro
  • Pixel ImagePro
  • Neon EffectPro
  • ShimmerPro
  • RipplePro
  • SparklesPro
  • SpotlightPro
Backgrounds17 components
  • Grid PatternPro
  • MeteorsPro
  • Aurora BackgroundPro
  • ParticlesPro
  • StarfieldPro
  • Dot PatternPro
  • Grid DistortionPro
  • WavesPro
  • Matrix RainPro
  • Liquid BackgroundPro
  • Mesh GradientPro
  • Glitch BackgroundPro
  • Gradient FlowPro
  • Floating ElementsPro
  • Bubble BackgroundPro
  • Geometric PatternsPro
  • Code SnippetsPro
Special UI1 components
  • Glow CardPro
Showcase8 components
  • iPhone MockPro
  • Android MockPro
  • Safari MockPro
  • GlobePro
  • Dotted MapPro
  • Icon CloudPro
  • Tweet CardPro
  • File TreePro

Advanced

  • Theming
  • Customization
  • CLI
  • Help & Support
  1. Docs
  2. Components
  3. Lazy Component

Lazy Component

Pro

Performance-optimized lazy loading components with intersection observer, progressive loading, and smart prefetching capabilities for optimal user experience.

Pro features

What the Pro version adds to this component.

  • Intersection Observer

    Viewport detection with customizable threshold and rootMargin

  • Automatic Retry

    Re-attempts a failing load retryCount times, retryDelay apart, then reports it through onError

  • Performance Analytics

    Measured load and visibility timings delivered to analyticsCallback as a typed LazyLoadMetrics object

  • Batch Loading

    Load large lists in optimized batches as they scroll into view

  • List Virtualization

    Optional windowed rendering for very large lists with configurable overscan

  • Progressive Enhancement

    Blur-up placeholders while content loads via enableProgressiveEnhancement and blurDataURL

  • Smart Prefetching

    prefetch prepares below-the-fold content after prefetchDelay so it is ready before the reader arrives

Installation

Install via CLI

npx @moontra/moonui-cli add lazy-component

Usage

Pro required

Examples

Lazy Image Gallery

Pro

Images decode only as they approach the viewport. aspectRatio reserves the box up front so nothing shifts, blurDataURL paints a placeholder, and priority opts the first tile out of lazy loading.

Pro required

Progressive Image Loading

Pro

enableProgressiveLoading streams download progress through onProgress, fallbackSrc covers a broken source, and onLoad/onError drive the surrounding UI state.

Pro required

Lazy List with Batch Loading

Pro

Items arrive in batches as the sentinel scrolls into view. onBatchLoad reports each range, and the scroll container is a focusable region so keyboard users can reach it.

Pro required

Virtualized List

Pro

enableVirtualization windows the DOM to the visible slice plus overscan rows. Toggle the dataset to see the emptyState branch.

Pro required

Progressive Content Loading

Pro

Heavy sections mount only when they approach the viewport. triggerOnce={false} releases a section again once it leaves, keeping long dashboards light.

Pro required

Smart Prefetching

Pro

prefetch prepares the content prefetchDelay milliseconds after mount without waiting for the viewport, so the card is already rendered by the time the reader scrolls to it. The right-hand card keeps the default viewport-driven behaviour for comparison.

Pro required

Retry & Error Handling

Pro

When the load callback throws, LazyComponent re-attempts up to retryCount times with retryDelay between attempts and finally reports the failure through onError. Use the button to switch the demo between a healthy and a failing load.

Pro required

Load Analytics

Pro

enableAnalytics turns on timing collection and analyticsCallback receives the measured load and visibility durations, ready to forward to your RUM pipeline.

Pro required

Blur-Up Progressive Enhancement

Pro

enableProgressiveEnhancement paints blurDataURL in place of the default skeleton until the section is ready, then fades the real content in over fadeInDuration.

Pro required
Previous
Memory Efficient Data
Pro
Next
Optimized Image
Pro
MoonUIMoonUI

168 React components. 45 free under MIT, 123 Pro.

Unsubscribe anytime.

Product

  • Components
  • Templates
  • Pricing

Resources

  • Documentation
  • GitHub
  • Support

Legal

  • Privacy
  • Terms
  • Refund Policy
Made by Moontra Software
  • X
  • LinkedIn
  • GitHub
  • YouTube