Componentnavigation0.47 KB gzipZero dependencies

LoadMore

Button row "LOAD MORE" with progress mono counter; on click reveals hidden children with stagger.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add load-more

Or install the full npm package:

npm install bigbullui

Usage

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 helper

Zero 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

PropTypeDescription
itemsReact.ReactNode[]Children to reveal on load more click.
onLoadMore() => voidCallback when button is clicked.