Introduction
Installation
Next.jsViteLaravelReact RouterRemixAstroTanStack StartTanStack RouterManual InstallationMCP
All componentsTheme
FieldFormInputText FieldTextareaSearch FieldInput OTPNumber FieldNumber FormatSliderCheckboxSwitchRadioSelectCombo BoxList BoxChoice BoxMulti SelectToken FieldNewTag FieldTag GroupCalendarDate FieldDate PickerDate Range PickerRange CalendarTime FieldColor PickerColor FieldColor AreaColor SliderColor SwatchColor Swatch PickerColor ThumbColor WheelDrop ZoneFile Trigger
ButtonButton GroupToggleToggle GroupPreskok Auth Button
EditorHeadingLinkTextKeyboard
CardContainerGrid ListResizableTableTreeSeparatorDescription ListScroll AreaShow MoreToolbar
BreadcrumbsNavbarPaginationTabsSidebar
DialogModalDrawerPopoverPreview TriggerNewSheetTooltipContext MenuDropdownCommandCommand MenuDisclosureMenu
ToastProgress BarProgress CircleMeterLoaderSkeletonNoteBadge
Chart (helpers)Area ChartBar ChartLine ChartPie ChartExperimental ChartsNewExperimental Radial ChartNewExperimental Radar ChartNewBar ListTracker
Async ImageAvatarCarouselPreskok Icon
Media

Avatar

User avatar component with images or initials, sizes, and square/round styles.

View as MarkdownAsk ChatGPT

Installation

npx shadcn@latest add @preskok/avatar

Usage

import { Avatar } from "@/components/ui/preskok-ui/avatar"

export function AvatarDemo() {
  return (
    <div className="flex gap-4">
      <Avatar src="/avatars/01.png" alt="Alex Johnson" />
      <Avatar initials="AJ" alt="Alex Johnson" />
      <Avatar initials="JR" alt="Jamie Rivera" isSquare size="lg" />
    </div>
  )
}

Props

PropTypeDefaultDescription
srcstring | nullnullImage source
initialsstring-Initials fallback
altstring""Accessible alt text
isSquarebooleanfalseSquare vs. circular shape
size"xs" | "sm" | "md" | "lg" | "xl""md"Avatar size
classNamestring-Additional CSS classes

Async Image

Compound async image with lazy loading, skeleton placeholder, and error fallback.

Carousel

Embla-based carousel with content items and accessible previous/next controls.

On this page

Installation
Usage
Props
Alex JohnsonJamie RiveraMaya ChenMCNoah ReedNRIris PatelIP
Alex JohnsonJamie RiveraMaya ChenMCThree more reviewers+3