Skip to main content
Tw Twintrinsic
  • Getting Started
  • Components
  • Theming
  • Completion
Examples
Data Dashboard Game Map
Core
App
Layout
Accordion AccordionItem Card Container Panel Separator Sidebar Splitter
Navigation
AppHeader BottomBar Breadcrumb BreadcrumbItem Menu MenuItem Tabs Tab TabList TabPanel TreeMenu
Data Display
Avatar AvatarGroup Badge Carousel CarouselItem Chip ChipGroup CodeBlock CodeBlockSpeed CodeEditor DataTable Map Progress Skeleton Table TableBody TableCell TableHead TableHeader TableRow Tag TagGroup Timeline TimelineItem Tooltip Tree TreeNode
Metrics
DonutChart PieChart LineChart BarChart HorizontalBarChart AreaChart StatsCard MetricGrid KPICard GaugeChart ProgressMetric MetricTrend
Form
AutoComplete Button ButtonGroup Calendar Checkbox ColorPicker Combobox Dropdown FileUpload FloatLabel Form FormField Input InputSwitch InvalidState Knob ListInput Listbox NumberInput Radio RadioGroup Rating Select SelectGroup Slider Switch TextInput Textarea
Feedback
Modal Stepper StepperStep Toast
Utility
Icon Lazy LazyPanel Masonry ThemeToggle

LazyPanel

A Panel component that only loads its content when it becomes visible in the viewport. Built on top of the Panel component with intersection observer for lazy loading.

Usage

LazyPanel is perfect for content that is expensive to render or requires data fetching, especially when that content might be off-screen initially.

Examples

Basic LazyPanel

Loading...

Custom Loading State

Loading...

Props

PropTypeDefaultDescription
expandedbooleantrueWhether the panel is expanded initially
classstring''Additional CSS classes
rootMarginstring'50px'Root margin for intersection observer
thresholdnumber0Threshold for intersection observer

Slots

NameDescription
defaultContent to be loaded lazily
headerPanel header content
loadingContent to show while loading

Best Practices

  • Use LazyPanel for content that is expensive to render or requires data fetching
  • Always provide a loading state to improve user experience
  • Consider the rootMargin to start loading content before it becomes visible
  • Use multiple LazyPanels for long lists of content to improve initial page load

Accessibility

  • Inherits all accessibility features from the base Panel component
  • Loading states are properly announced to screen readers
  • Content updates are announced when lazy loading completes