Reactberry Documentation
A docs site powered entirely by Reactberry itself.
blocks
Build horizontally scrollable rows of cards, steps, or media with Reactberry's Carousel block.
Carousel is a client-side block for rendering horizontally scrollable content with snap behavior and optional arrow controls.
import { Carousel } from "@reactberry/system/blocks";
Use Carousel when you need to present a sequence of items that should be explored horizontally, such as:
A common pattern is a horizontally scrollable row of feature cards with built-in arrows.
A compact slide with headline, copy, and action.
Open starterUse Carousel when you need to scan rich cards horizontally.
Review cardsSlides can contain the same Reactberry primitives used elsewhere.
View checklistYou can listen to `onScroll` to keep external UI in sync with the active slide.
Current slide: 1 / 4
Step 1
Collect inputs
Step 2
Draft layout
Step 3
Refine theme
Step 4
Ship UI
The component accepts an items array of React nodes.
import { Carousel } from "@reactberry/system/blocks";
import { Box, Text } from "@reactberry/system/elements";
const items = ["One", "Two", "Three"].map((label) => (
<Box key={label} minWidth="240px" p="m" skin="surface" shape="rounded">
<Text>{label}</Text>
</Box>
));
export default function Example() {
return <Carousel items={items} gap="m" />;
}
items — array of slides to rendergap — spacing between slidesonScroll — callback with the current slide indexshowScrollbar — reveals the horizontal scrollbarshowArrows — toggles the built-in arrow controlscontainerProps — forwards layout and style props to the scroll containerCarousel works well with Box, Text, Button, and other Reactberry primitives inside each slide.Container, Heading, or Divider.Return to Blocks for the broader composition model, or continue into Guides for more narrative implementation patterns.