XiodUI
HomeDocs
OverviewComponentsThemes & ColorsChangelog
⌘ K

Components

  • Accordion
  • Agent Steps
    New
  • Alert
  • Alert Dialog
  • Aspect Ratio
    New
  • Autocomplete
  • Avatar
  • Badge
  • Breadcrumb
  • Button
    Updated
  • Button Group
    New
  • Button Split
    New
  • Calendar
    New
  • Card
  • Carousel
    New
  • Checkbox
  • Circular Progress
    New
  • Collapsible
  • Color Picker
    New
  • Combobox
  • Command
  • Context Menu
    New
  • Copy To Clipboard
    New
  • Corner Badge
    New
  • Dashboard Grid
    New
  • Date Picker
    New
  • Dialog
  • Dot Matrix
    New
  • Draggable
    New
  • Drawer
    New
  • Empty
  • Field
  • Fieldset
  • File Upload
    New
  • Form
  • Frame
  • Gauge
    New
  • Grid
    New
  • Group
  • Input
  • Input Group
  • Input OTP
    New
  • Input Payment
    New
  • Input Phone
    New
  • Input Sensitive
    New
  • Kbd
  • Kinetic Click
    New
  • Label
  • List Box
    New
  • Loader
  • Marker
    New
  • Menu
  • Menubar
  • Message
    New
  • Meter
  • Morphic Toast
    New
  • Navigation Menu
  • Number Field
  • Option Picker
    New
  • Orb
    New
  • Pagination
  • Popover
  • Preview Card
  • Progress
  • Radio
  • Resizable
    New
  • Ruler Picker
    New
  • Scroll Area
  • Scroll Bar
    New
  • Select
  • Separator
  • Sidebar
  • Skeleton
  • Slider
    Updated
  • Sortable
    New
  • Switch
    Updated
  • Table
  • Tabs
  • Text
    New
  • Textarea
  • Timeline
    New
  • Toast
  • Toggle
  • Toggle Group
  • Toolbar
  • Tooltip
    Updated
  • Waveform
    New
  • Wheel Picker
    New
/
/

Loading...

Preview Skeleton

Installation Skeleton

Usage Skeleton

API Reference Skeleton

Sponsors

Support the development of XiodUI and help us build the best component library on Earth.

+++
Sponsor on GitHub

Preview Card

Previous: PopoverNext: Progress

A preview card for content.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import {2  HoverCard,3  PreviewCard,4  HoverCardArrow,5  PreviewCardArrow,6  HoverCardContent,7  PreviewCardPopup,8  HoverCardTrigger,9  PreviewCardTrigger10} from "xiod-ui/preview-card";

Anatomy

1<PreviewCard>2  <HoverCardTrigger />3  <PreviewCardTrigger />4  <HoverCardContent>5    <HoverCard />6    <HoverCardArrow />7    <PreviewCardArrow />8    <PreviewCardPopup />9  </HoverCardContent>10</PreviewCard>

API Reference

Detailed documentation of properties and options.

PreviewCardArrow

PropTypeDefaultDescription
className
string
|((state: PreviewCardArrowState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, PreviewCardArrowState>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
style
CSSProperties
|((state: PreviewCardArrowState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.

PreviewCardPopup

PropTypeDefaultDescription
className
string
|((state: PreviewCardPopupState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, PreviewCardPopupState>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
style
CSSProperties
|((state: PreviewCardPopupState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.
align
Align
|undefined
center
alignOffset
number
|OffsetFunction
|undefined
0
side
Side
|undefined
bottom
sideOffset
number
|OffsetFunction
|undefined
8
anchor
Element
|VirtualElement
|RefObject<Element
|null>
|(() => Element
|VirtualElement
|null)
|null
|undefined
-
hideArrow
boolean
|undefined
false

PreviewCardTrigger

PropTypeDefaultDescription
handle
PreviewCardHandle<unknown>
|undefined
-A handle to associate the trigger with a preview card.
payload
unknown
-A payload to pass to the preview card when it is opened.
delay
number
|undefined
600How long to wait before the preview card opens. Specified in milliseconds.
closeDelay
number
|undefined
300How long to wait before closing the preview card. Specified in milliseconds.
className
string
|((state: PreviewCardTriggerState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, PreviewCardTriggerState>
|undefined
-Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
style
CSSProperties
|((state: PreviewCardTriggerState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.
PopoverProgress