Sections
Components
- AlertBanner
- AlertDialog
- Alert
- Avatar
- Badge
- Breadcrumb
- Button
- CalendarIcon
- CellLayout
- CellLink
- Checkbox
- Collapse
- ContentSwitcher
- ControlLabel
- DatePicker
- Dialog
- Divider
- Drawer
- EmptyCell
- EmptyState
- Empty
- ErrorOverlay
- FilterBar
- FilterChips
- Flex
- GridLayout
- HumanisedDate
- Icon
- InputDuration
- InputField
- Input
- Label
- Loader
- MoreActions
- NumberInput
- OutsideClickHandler
- PageLoader
- Page
- Popconfirm
- Popover
- ProgressPie
- Progress
- RadioButtonGroup
- RadioGroup
- Radio
- RelativeTime
- Resizable
- SearchInput
- Select
- SkeletonText
- Skeleton
- Space
- SquadAvatarList
- StatusPicker
- Stepper
- Switch
- TableLight
- Tabs
- Tag
- Text
- Textarea
- Toast
- Tooltip
- TriggerSelect
- Upload
import { ErrorOverlay, Button } from "@/rl-ui";
<div className="relative min-h-[160px] w-full">
<ErrorOverlay title="Couldn't load" message="Try again.">
<Button variant="secondary">Retry</Button>
</ErrorOverlay>
</div>Examples#
Title + message (default EmptyState)#
Omit children to render the built-in empty/error layout from title and message.
import { ErrorOverlay } from "@/rl-ui";
<div className="relative min-h-[160px] w-full border">
<ErrorOverlay
title="Couldn't load projects"
message="Check your connection and try again."
/>
</div>With action slot#
import { ErrorOverlay, Button } from "@/rl-ui";
<div className="relative min-h-[160px] w-full">
<ErrorOverlay
title="Sync failed"
message="We couldn't refresh this board."
action={<Button variant="primary" size="small">Retry sync</Button>}
/>
</div>Custom children#
import { ErrorOverlay, Button, Text, Space } from "@/rl-ui";
<div className="relative min-h-[160px] w-full">
<ErrorOverlay>
<Space direction="vertical" size="medium" align="center">
<Text variant="heading-03">Something went wrong</Text>
<Text variant="body-short-01">Please reload this panel.</Text>
<Button variant="secondary" size="small">Reload</Button>
</Space>
</ErrorOverlay>
</div>API#
| Prop | Type | Default | Description |
|---|---|---|---|
title | ReactNode | — | Error title (used when children omitted). |
message | ReactNode | — | Error details (used when children omitted). |
action | ReactNode | — | Primary action passed to the default EmptyState. |
image | ReactNode | — | Optional illustration for the default EmptyState. |
className | string | — | Classes on the absolute overlay root. |
children | ReactNode | — | Custom overlay body (replaces title/message EmptyState). |