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 { Avatar } from "@/rl-ui";
<Avatar name="Ada Lovelace" />Examples#
Sizes#
import { Avatar } from "@/rl-ui";
<>
<Avatar name="Ada" size={16} />
<Avatar name="Ada" size={20} />
<Avatar name="Ada" size={24} />
<Avatar name="Ada" size={32} />
</>Shapes#
import { Avatar } from "@/rl-ui";
<>
<Avatar name="Ada Lovelace" shape="circle" size={32} />
<Avatar name="Alan Turing" shape="square" size={32} />
</>API#
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | — | Used for initials and color hash. |
src | string | — | Image URL. |
size | 16 | 20 | 24 | 32 | 20 | Avatar size in px. |
shape | "circle" | "square" | "circle" | Clip shape. |
hideText | boolean | false | Hide initials fallback text. |
badgeIcon | ReactNode | — | Corner badge. |