Load More

Clamps a long region to a couple of rows, fades its cut edge, and puts one reveal button under it. The fade is a mask, not a painted gradient, so it works unchanged on any surface.

Accordion
Accordion6 variants
Alert
Alert14 variants
Avatar
Avatar5 variants
Badge
Badge12 variants
Breadcrumb
Breadcrumb6 variants
Button
Button16 variants
Button Group
Button Group18 variants
Card
Card7 variants
Carousel
Carousel9 variants
Checkbox
Checkbox8 variants
Command
Command4 variants
Date Picker
Date Picker6 variants
Dialog
Dialog11 variants
Drawer
Drawer8 variants
Dropdown Menu
Dropdown Menu8 variants
Field
Field5 variants
Input
Input10 variants
Select
Select7 variants

Installation#

# One-time setup (tokens + lib helpers)npx koalaui-cli@latest init# Add this component (its dependencies come along)npx koalaui-cli@latest add load-more

Usage#

usage.tsxTSX
import { LoadMore, LoadMoreContent, LoadMoreTrigger } from "@/components/ui/load-more"export function Example() {  return (    <LoadMore>      <LoadMoreContent>{/* the long grid, list or stack */}</LoadMoreContent>      <LoadMoreTrigger more="See all" less="Show less" />    </LoadMore>  )}

Collapsed height#

collapsedHeight sets how much shows before the reveal. Pick a value that cuts through a row rather than landing between two: a clean break reads as the end of the list, which is the opposite of the message you want. The default is 28rem.

Accordion
Accordion6 variants
Alert
Alert14 variants
Avatar
Avatar5 variants
Badge
Badge12 variants
Breadcrumb
Breadcrumb6 variants
Button
Button16 variants
Button Group
Button Group18 variants
Card
Card7 variants
Carousel
Carousel9 variants
Checkbox
Checkbox8 variants
Command
Command4 variants
Date Picker
Date Picker6 variants
Dialog
Dialog11 variants
Drawer
Drawer8 variants
Dropdown Menu
Dropdown Menu8 variants
Field
Field5 variants
Input
Input10 variants
Select
Select7 variants

Alignment#

align moves the reveal button under the region: center (the default, which reads as a page-level affordance), start, or end. The button's row is always in flow, never floated over the fade, so opening costs no layout shift of its own.

Accordion
Accordion6 variants
Alert
Alert14 variants
Avatar
Avatar5 variants
Badge
Badge12 variants
Breadcrumb
Breadcrumb6 variants
Button
Button16 variants
Button Group
Button Group18 variants
Card
Card7 variants
Carousel
Carousel9 variants
Checkbox
Checkbox8 variants
Command
Command4 variants
Date Picker
Date Picker6 variants
Dialog
Dialog11 variants
Drawer
Drawer8 variants
Dropdown Menu
Dropdown Menu8 variants
Field
Field5 variants
Input
Input10 variants
Select
Select7 variants

Any surface#

The cut edge fades through the fade-b mask utility rather than a background-coloured gradient panel, so it needs to know nothing about what sits behind it. The same component on a solid brand band cuts correctly with no configuration, where a painted gradient would smear the page background across the accent. The band is deep and its ramp is eased, so the clamp trails off instead of ending on a line. With tone="onMedia" the trigger becomes the white chip: on a band it is the only action on the fill, so it takes the light shape.

Accordion6 variants
Alert14 variants
Avatar5 variants
Badge12 variants
Breadcrumb6 variants
Button16 variants
Button Group18 variants
Card7 variants
Carousel9 variants
Checkbox8 variants
Command4 variants
Date Picker6 variants
Dialog11 variants
Drawer8 variants
Dropdown Menu8 variants
Field5 variants
Input10 variants
Select7 variants

Without the fade#

fade={false} keeps the region opaque to the last pixel. Reach for it when a soft edge would misread as "this text trails off": a legal notice, a price list, a data table.

Accordion6 variants
Alert14 variants
Avatar5 variants
Badge12 variants
Breadcrumb6 variants
Button16 variants
Button Group18 variants
Card7 variants
Carousel9 variants
Checkbox8 variants

Open by default#

defaultExpanded opens on mount, for a deep link that should land on the full list. The component owns the state from there on; pair it with onExpandedChange to react to each toggle.

Accordion
Accordion6 variants
Alert
Alert14 variants
Avatar
Avatar5 variants
Badge
Badge12 variants
Breadcrumb
Breadcrumb6 variants
Button
Button16 variants
Button Group
Button Group18 variants
Card
Card7 variants
Carousel
Carousel9 variants
Checkbox
Checkbox8 variants
Command
Command4 variants
Date Picker
Date Picker6 variants
Dialog
Dialog11 variants
Drawer
Drawer8 variants
Dropdown Menu
Dropdown Menu8 variants
Field
Field5 variants
Input
Input10 variants
Select
Select7 variants

API reference#

LoadMore forwards every div prop and adds collapsedHeight (any CSS length, default 28rem), defaultExpanded, onExpandedChange, and align. LoadMoreContent forwards every div prop and adds fade. LoadMoreTrigger forwards every Button prop and takes more and less for its two labels. Its variant defaults to outline, or to the solid chip under an onMedia or onInverse tone. It renders its own caret, which rotates to point wherever the region is about to move, so there is no icon to pass. Every part accepts className.

FAQ#

Collapsible hides its content entirely when closed, and the whole point here is the partial peek: the clamp has to leave rows visible and cut mid-grid. So the behaviour is hand-rolled, with the ARIA wired by hand (aria-expanded plus aria-controls pointing at the region).