Blocks
Build larger UI patterns with Reactberry blocks after your provider and primitive elements are already in place.
After you have the provider wired up and are comfortable with Box, Text, Button, and Field, the next layer is @reactberry/system/blocks.
Blocks are composed reusable structures built on top of elements.
Importing blocks#
typescript
import { Container, Main, Heading, Divider } from "@reactberry/system/blocks";
When to use blocks#
Use blocks when you want more structure and behavior out of the box.
Good examples include:
- page shells and content containers
- headings and layout helpers
- overlays, drawers, popovers, and menus
- tables, galleries, sliders, and other richer UI patterns
Blocks vs elements#
Use @reactberry/system/elements for foundational items:
BoxTextButtonField
Use @reactberry/system/blocks when you want a composed reusable structure with more opinionated behavior or layout built in.
Example page structure#
typescript
import { Box, Text, Button } from "@reactberry/system/elements";
import { Container, Main, Heading, Divider } from "@reactberry/system/blocks";
export default function DashboardPage() {
return (
<Container>
<Main>
<Box p="l" display="flex" flexDirection="column" gap="m">
<Heading>
<Text as="h1" fontSize="xxxl" fontWeight="700">
Dashboard
</Text>
</Heading>
<Text as="p" color="secondary">
Start with primitives, then use blocks to scale the layout.
</Text>
<Divider />
<Button variant="default">Create report</Button>
</Box>
</Main>
</Container>
);
}
Block reference#
Layout and structure#
- Container
- Main
- Screen
- Divider
- Heading
- Collection
- Group
- List
- ScrollContainer
- HorizontalScroller
- Filesystem
UI#
Interactive and overlays#
- Switch
- Tooltip
- Popover
- MorphingPopover
- Modal
- Menu
- Breadcrumbs
- Accordion
- Drawer
- BottomSheet
- FamilyDrawer
- SystemNotice
- Toast
Data, navigation, and forms#
Display and media#
- Progress
- Gallery
- Slideshow
- Carousel
- Slider
- AnimatedCarousel
- Marquee
- VideoMarquee
- Ticker
- CyclingNumber
- DynamicIsland
Effects and animation#
- Fader
- Parallax
- ParallaxSection
- Spotlight
- ShinyText
- StickySectionStack
- TextBreak
- TextReveal
- GradientMesh
- ProgressiveBlur
- AppleGlow
Cards#
Utilities#
Recommended approach#
- build the first screen with elements
- notice repeated layout or behavior patterns
- replace that repetition with blocks where they fit naturally
- keep custom composition for anything highly app-specific
Related pages#
Next step#
Once you are comfortable with blocks, continue into the Guides section for longer walkthroughs and implementation patterns.