webf-api-compatibility
Check Web API and CSS feature compatibility in WebF - determine what JavaScript APIs, DOM…
Create high-performance infinite scrolling lists with pull-to-refresh and load-more capabilities using WebFListView. Use when building feed-style UIs, product catalogs, chat messages, or any scrollable list that needs optimal performance with large datasets.
$ npx -y skills add openwebf/webf --skill webf-infinite-scrolling --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/webf-infinite-scrollingContext preview
The summary Claude sees to decide when to auto-load this skill.
Create high-performance infinite scrolling lists with pull-to-refresh and load-more capabilities using WebFListView. Use when building feed-style UIs, product catalogs, chat messages, or any scrollable list that needs optimal performance with large datasets.
name: webf-infinite-scrolling description: Create high-performance infinite scrolling lists with pull-to-refresh and load-more capabilities using WebFListView. Use when building feed-style UIs, product catalogs, chat messages, or any scrollable list that needs optimal performance with large datasets.
> **Note**: WebF development is nearly identical to web development - you use the same tools (Vite, npm, Vitest), same frameworks (React, Vue, Svelte), and same deployment services (Vercel, Netlify). This skill covers **performance optimization for scrolling lists** - a WebF-specific pattern that provides native-level performance automatically.
Build high-performance infinite scrolling lists with Flutter-optimized rendering. WebF's `WebFListView` component automatically handles performance optimizations at the Flutter level, providing smooth 60fps scrolling even with thousands of items.
In browsers, long scrolling lists can cause performance issues:
**WebF's solution**: `WebFListView` delegates rendering to Flutter's optimized ListView widget, which:
**⚠️ IMPORTANT**: For Flutter optimization to work, each list item must be a **direct child** of `WebFListView`:
<WebFListView>
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
{/* Each item is a direct child */}
</WebFListView><WebFListView>
<div>
{/* DON'T wrap items in a container div */}
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
</div>
</WebFListView>**Why this matters**: Flutter's ListView requires direct children to perform view recycling. If items are wrapped in a container, Flutter sees only one child (the container) and cannot optimize individual items.
npm install @openwebf/react-core-ui
import { WebFListView } from '@openwebf/react-core-ui';
function ProductList() {
const products = [
{ id: 1, name: 'Product 1', price: 19.99 },
{ id: 2, name: 'Product 2', price: 29.99 },
{ id: 3, name: 'Product 3', price: 39.99 },
// ... hundreds or thousands of items
];
return (
<WebFListView scrollDirection="vertical" shrinkWrap={true}>
{products.map(product => (
// ✅ Each item is a direct child
<div key={product.id} className="product-card">
<h3>{product.name}</h3>
<p>${product.price}</p>
</div>
))}
</WebFListView>
);
}import { WebFListView, WebFListViewElement } from '@openwebf/react-core-ui';
import { useRef, useState } from 'react';
function InfiniteList() {
const listRef = useRef<WebFListViewElement>(null);
const [items, setItems] = useState([1, 2, 3, 4, 5]);
const [page, setPage] = useState(1);
const handleLoadMore = async () => {
try {
// Simulate API call
await new Promise(resolve => setTimeout(resolve, 1000));
// Fetch next page
const newItems = Array.from(
{ length: 5 },
(_, i) => items.length + i + 1
);
setItems(prev => [...prev, ...newItems]);
setPage(prev => prev + 1);
// Check if there's more data
const hasMore = page < 10; // Example: 10 pages max
// Notify WebFListView that loading finished
listRef.current?.finishLoad(hasMore ? 'success' : 'noMore');
} catch (error) {
// Notify failure
listRef.current?.finishLoad('fail');
}
};
return (
<WebFListView
ref={listRef}
onLoadMore={handleLoadMore}
scrollDirection="vertical"
shrinkWrap={true}
>
{items.map(item => (
<div key={item} className="item">
Item {item}
</div>
))}
</WebFListView>
);
}import { WebFListView, WebFListViewElement } from '@openwebf/react-core-ui';
import { useRef, useState } from 'react';
function RefreshableList() {
const listRef = useRef<WebFListViewElement>(null);
const [items, setItems] = useState([1, 2, 3, 4, 5]);
const handleRefresh = async () => {
try {
// Simulate API call
await new Promise(resolve => setTimeout(resolve, 1000));
// Fetch fresh data
const freshItems = [1, 2, 3, 4, 5];
setItems(freshItems);
// Notify WebFListView that refresh finished
listRef.current?.finishRefresh('success');
} catch (error) {
// Notify failure
listRef.current?.finishRefresh('fail');
}
};
return (
<WebFListView
ref={listRef}
onRefresh={handleRefresh}
scrollDirection="vertical"
shrinkWrap={true}
>
{items.map(item => (
<div key={item} className="item">
Item {item}
</div>
))}
</WebFListView>
);
}import { WebFListView, WebFListViewElement } from '@openwebf/react-core-ui';
import { useRef, useState } from 'react';
function FeedList() {
const listRef = useRef<WebFListViewElement>(null);
const [posts, setPosts] = useState([
{ id: 1, title: 'Post 1', content: 'Content 1' },
{ id: 2, title: 'Post 2', content: 'Content 2' },
{ id: 3, title: 'Post 3', content: 'Content 3' },
]);
const [page, setPage] = useState(1);
const handleRefresh = async () => {
try {
// Fetch latest posts
const response = await fetch('/api/posts?page=1');
const freshPosts = await reRepo: openwebf/webf
Check Web API and CSS feature compatibility in WebF - determine what JavaScript APIs, DOM…
Understand and work with WebF's async rendering model - handle onscreen/offscreen events and…
Develop custom WebF native plugins based on Flutter packages. Create reusable plugins that…
Install WebF native plugins to access platform capabilities like sharing, payment, camera,…
Develop custom native UI libraries based on Flutter widgets for WebF. Create reusable…
Setup and use WebF's Cupertino UI library to build native iOS-style UIs with pre-built…