Comprehensive collection of business-ready web components for modern web applications
Dialog and overlay components provide modal interactions, notifications, and contextual information display. These components handle focus management, backdrop interactions, and accessibility patterns.
Modal dialog component for focused user interactions.
/**
* Modal dialog component with customizable behavior
*/
interface Dialog extends HTMLElement {
/** Dialog is currently visible */
opened: boolean;
/** Non-modal mode (allows interaction with background) */
modeless: boolean;
/** Dialog can be dragged */
draggable: boolean;
/** Dialog can be resized */
resizable: boolean;
/** Disable backdrop click to close */
noCloseOnOutsideClick: boolean;
/** Disable ESC key to close */
noCloseOnEsc: boolean;
/** Open the dialog */
open(): void;
/** Close the dialog */
close(): void;
}Pre-built confirmation dialog with standard actions.
/**
* Confirmation dialog with standard OK/Cancel actions
*/
interface ConfirmDialog extends HTMLElement {
/** Dialog is currently open */
opened: boolean;
/** Dialog header text */
header: string;
/** Main message text */
message: string;
/** Confirm button text */
confirmText: string;
/** Cancel button text */
cancelText: string;
/** Reject button text */
rejectText: string;
/** Open the dialog */
open(): void;
/** Close the dialog */
close(): void;
}Toast notification system for user feedback.
/**
* Toast notification component
*/
interface Notification extends HTMLElement {
/** Notification is currently visible */
opened: boolean;
/** Auto-close duration in milliseconds */
duration: number;
/** Notification position on screen */
position: NotificationPosition;
/** Theme variant */
theme: string;
/** Show the notification */
open(): void;
/** Hide the notification */
close(): void;
}
/**
* Notification position options
*/
type NotificationPosition =
| 'top-start' | 'top-center' | 'top-end'
| 'middle'
| 'bottom-start' | 'bottom-center' | 'bottom-end';Contextual overlay component positioned relative to target elements.
/**
* Contextual popover overlay
*/
interface Popover extends HTMLElement {
/** Target element selector or reference */
for: string | Element;
/** Popover is currently open */
opened: boolean;
/** Popover position relative to target */
position: PopoverPosition;
/** Trigger event for opening */
trigger: 'click' | 'hover' | 'focus';
/** Open the popover */
open(): void;
/** Close the popover */
close(): void;
}Simple tooltip component for contextual help text.
/**
* Tooltip component for contextual information
*/
interface Tooltip extends HTMLElement {
/** Target element selector */
for: string;
/** Tooltip text content */
text: string;
/** Tooltip position */
position: string;
/** Delay before showing (milliseconds) */
delay: number;
/** Hide delay (milliseconds) */
hideDelay: number;
/** Show tooltip manually */
show(): void;
/** Hide tooltip manually */
hide(): void;
}Right-click context menu with customizable items.
/**
* Context menu component with customizable items
*/
interface ContextMenu extends HTMLElement {
/** Target selector for context menu trigger */
selector: string;
/** Array of menu items */
items: ContextMenuItem[];
/** Menu is currently open */
opened: boolean;
/** Close the context menu */
close(): void;
}
/**
* Context menu item configuration
*/
interface ContextMenuItem {
/** Item display text */
text: string;
/** Item is disabled */
disabled?: boolean;
/** Item is a separator */
separator?: boolean;
/** Child menu items */
children?: ContextMenuItem[];
/** Item theme variant */
theme?: string;
}For complete API details and usage examples, see the main documentation.
Install with Tessl CLI
npx tessl i tessl/npm-vaadin--vaadin