Componentnavigation0.47 KB gzipZero dependencies
LoadMore
Button row "LOAD MORE" with progress mono counter; on click reveals hidden children with stagger.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add load-moreOr install the full npm package:
npm install bigbulluiUsage
tsx5 lines
import { LoadMore } from "@/components/ui/load-more" <LoadMore items={[<div key={1} className="p-2 bg-card">Item 1</div>, <div key={2} className="p-2 bg-card">Item 2</div>]} onLoadMore={() => {}} />Source code
load-more.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxload-more.tsx62 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type LoadMoreProps = { items?: React.ReactNode[]; onLoadMore?: () => void;} & React.HTMLAttributes<HTMLElement>; export function LoadMore({ items, onLoadMore, ...props }: LoadMoreProps) { const [expanded, setExpanded] = React.useState(false); const handleClick = () => { setExpanded(true); onLoadMore?.(); }; Props
| Prop | Type | Description |
|---|---|---|
| items | React.ReactNode[] | Children to reveal on load more click. |
| onLoadMore | () => void | Callback when button is clicked. |