Skip to content

Component Overview

DelightStack includes 55 components across 6 categories. All components are available from a single import:

<script>
import { Button, Input, Modal, Table } from '@delightstack/components';
</script>

Interactive elements that trigger behaviors.

ComponentDescription
ButtonVersatile button with ripple effects, loading states, and variants
ButtonGroupConnected button container with shared borders
ModalDialog overlay with transitions and focus management
AlertConfirmation dialog built on Modal
PopoverFloating content with smart positioning
ContextMenuRight-click menu system
PortalRender children in different DOM locations
CommandPaletteKeyboard-driven command interface
ThemeToggleLight/dark/auto theme switcher

Components for presenting information.

ComponentDescription
AccordionCollapsible content sections
AvatarUser/entity profile image
AvatarGroupStacked overlapping avatars
CalendarDate display and selection
ChartData visualization (line, bar, area, pie, donut)
CodeSyntax-highlighted code block
ComparisonBefore/after image slider
CounterAnimated number display
ExpandAnimated show/hide container
ListFlexible list container with selection modes
ListItemRich list item with multiple interaction types
QRQR code generator
SplitPaneResizable split view
StatKey metric display
TableData table with sorting and filtering
TimelineChronological event display
TreeHierarchical data display
TypewriterAnimated text typing effect

Components that communicate state and progress.

ComponentDescription
CalloutHighlighted information block (inline and banner mode)
ConfettiCelebration animation
ProgressProgress bar, spinner, and loading indicator
ToasterTemporary notification messages

Input components for user data entry.

ComponentDescription
InputComprehensive text/data input field
CheckboxBoolean toggle with check mark
FieldsetForm section grouping
FileUploadDrag-and-drop file input
FormForm container with Standard Schema validation
RadioSingle-select option
RangeSlider input
RatingStar/score input
SelectDropdown selection
ToggleOn/off switch, with an optional three-state (indeterminate) mode

Components for rich media content.

ComponentDescription
CarouselSwipeable image/content slider
GalleryImage grid with lightbox
ImageOptimized image with loading states
Panorama360-degree image viewer (requires three)
PDFPDF document viewer (requires pdfjs-dist)
VideoVideo player with controls

Components for moving through the application.

ComponentDescription
BottomSheetMobile-style slide-up panel
BreadcrumbsHierarchical navigation trail
PaginationPage navigation controls
StepsMulti-step progress indicator
TabsTabbed content switcher

Components use a numeric size scale where '1' is the default:

<Button size="0">Small</Button>
<Button>Normal</Button>
<Button size="3">Large</Button>

Visual variants are expressed as boolean props. They can be combined:

<Button outline>Outlined</Button>
<Button transparent>Ghost</Button>
<Button outline accent>Accent Outlined</Button>

Where appropriate, components support dense and comfortable props:

<List dense>Tight spacing</List>
<List>Default spacing</List>
<List comfortable>Relaxed spacing</List>

Several props appear across many components:

PropTypeDescription
skeletonbooleanShows a loading shimmer placeholder
tooltipstringHover tooltip text
badgenumber | booleanNotification badge (true = dot, number = count)

When an onclick or onsubmit callback returns a Promise, the component automatically manages a loading state:

<Button onclick={async () => {
await saveData();
}}>
Save
</Button>

The library exports TypeScript types for component data structures:

import type {
// Actions
ButtonGroupContext,
CommandOption,
// Display
AvatarData,
CalendarEvent,
MarkedDate,
ChartData,
ChartDataset,
TableColumn,
TreeNode,
FlatTreeNode,
// Feedback
ConfettiOptions,
ToastOptions,
// Form
FormContext,
StandardSchema,
InputType,
InputOption,
SelectOption,
// Media
GalleryImage,
PanoramaHotspot,
PDFAnnotation,
VideoSource,
VideoTrack,
// Navigation
BreadcrumbItem,
MenuContext,
TabsContext,
} from '@delightstack/components';

Some components export functions alongside their default component export:

ExportFrom ComponentDescription
toastToastertoast.success(), toast.error(), toast.info(), toast.warning()
alertAlertProgrammatic confirmation dialogs
confettiConfettiTrigger confetti animations
contextMenuContextMenuProgrammatic context menu
portalPortalPortal action for use with {@attach}