Load More

Pro

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# Activate your Pro license (once per machine)npx koalaui-cli@latest login <key># Add this component (its dependencies come along)npx koalaui-cli@latest add load-more

Usage#

This example is part of Koala UI Pro

The preview is yours to explore. Its code comes with a Pro license, paid once and used in every project.

Have a license? Unlock it here

Anatomy#

import { LoadMore, LoadMoreContent, LoadMoreTrigger } from "@/components/ui/load-more"<LoadMore>  <LoadMoreContent>…</LoadMoreContent>  <LoadMoreTrigger more="…" 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

The root that owns the expanded state (uncontrolled). Renders a <div> and forwards all its props. Every part accepts className, merged last.

PropTypeDefaultDescription
collapsedHeightstring"28rem"The clamp, any CSS length. Pick one that cuts through a row, so the fade reads as more below.
defaultExpandedbooleanfalseStart revealed.
onExpandedChange(expanded: boolean) => void-Called after each toggle.
align"center" | "start" | "end""center"Where the trigger sits under the region.

LoadMoreContent

The clamped region; put the long grid or list straight inside. Forwards native <div> props.

PropTypeDefaultDescription
fadebooleantrueDissolves the cut edge while collapsed. Skipped when the content already fits.
Data attributeDescription
data-expandedPresent while the region is revealed.
CSS variableDescription
--fade-sizeDepth of the dissolve, min(16rem, 40%) here. Override per instance, e.g. [--fade-size:6rem].

LoadMoreTrigger

The one reveal button, with a caret that turns toward where the region moves. Forwards Button props (children aside) and wires aria-expanded and aria-controls. Renders nothing when the content fits.

PropTypeDefaultDescription
more*React.ReactNode-Label while collapsed. Name what is below, e.g. "See all components".
less*React.ReactNode-Label while expanded, e.g. "Show less".
variantButtonProps["variant"]"outline"Defaults to secondary, the solid chip, under an onMedia or onInverse tone.

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).