Tessina UI
ConfiguratorGitHubIntroduction
InstallationUsageTheming
ComponentsAccordionAction SheetAlertAlertDialogArea ChartAspectRatioAvatarBadgeBannerBar ChartBottom NavBreadcrumbButtonButtonGroupCalendarCardCarouselChartChatBubbleCheckboxChipCodeBlockCollapsibleColor PickerComboboxCommandContainerContextMenuDate PickerDividerDrawerDropdown MenuEmptyStateFABFieldFieldsetFile UploadFile Upload 2FlexFormGridHoverCardIconButtonLabelLine ChartLinkMenubarMeterModalNavigation MenuNumberFieldOTP InputPaginationPie ChartPopoverProgressPromptInputRadar ChartRadial ChartRadioRatingScroll AreaSearchSegmentedControlSelectShortcutSidebarSkeletonSliderSpacerSpinnerSplit ButtonStackStatusStepperSurfaceSwitchTableTabsTextareaTime PickerToastToggleButtonToggleGroupToolbarTooltipTop Header DesktopTop Header Mobile
Contributing
Components

Alert

Contextual feedback messages for user actions or system events. Four visual variants (solid, soft, outline, ghost), five intents, three sizes, six rounded options, optional close button, actions, and RTL support.

Playground

Installation

pnpm add @tessinaui/ui

Usage

import { Alert } from "@tessinaui/ui";

<Alert
  intent="error"
  title="Something went wrong"
  description="There was an issue processing your request. Please try again."
  onClose={() => {}}
/>

Examples

Default

A basic alert with a title and supporting description.

Intents

Five semantic intents — none, error, warning, success, and info — each with its own colour and icon.

Variants

Four visual fill styles — solid, soft, outline, and ghost.

Sizes

Three sizes — sm, md, and lg — control text size and padding.

With Actions

Add a primary CTA, a secondary CTA, or a dismiss button.

Loading

Use AlertSkeleton as a placeholder while content loads.

Variants

VariantDescription
solidFilled background using the full intent colour — bg-error, bg-warning, etc. High emphasis.
softLight tinted background (bg-error-light) with semantic icon colour. Default.
outlineColoured border + very subtle tint. No background fill on the text area.
ghostNo background or border. Icon still carries the semantic colour. Minimal emphasis.

Intents

IntentIconUse case
noneInfoNeutral informational message
errorCircleXDestructive action failed, validation error
warningTriangleAlertPotentially harmful, requires attention
successCircleCheckAction completed successfully
infoInfoNon-critical information or guidance

Props

Alert

PropTypeDefaultDescription
intent"none" | "error" | "warning" | "success" | "info""none"Semantic colour and default icon
variant"solid" | "soft" | "outline" | "ghost""soft"Visual fill style
size"sm" | "md" | "lg""md"Text size and padding
rounded"none" | "sm" | "md" | "lg" | "xl" | "full""md"Border radius
width"narrow" | "default" | "wide""default"Max-width constraint — narrow (sm), default (full), wide (4xl)
titleReactNode—Bold heading text
descriptionReactNode—Supporting body text
iconReactNodeIntent defaultCustom leading icon
showIconbooleantrueShow or hide the leading icon
onClose() => void—Renders a dismiss (×) button when provided
actionAlertAction—Primary CTA on the trailing edge
secondaryActionAlertAction—Secondary CTA beside the primary
shadowbooleanfalseDrop shadow — use for callout / floating card style
dir"ltr" | "rtl""ltr"Text direction
rolestring"alert"ARIA live-region role. Use "status" for non-urgent messages
classNamestring—Extra classes on the root element

AlertAction

FieldTypeDescription
labelstringButton text
onClick() => voidClick handler
variantButtonProps["variant"]Override button fill style
intentButtonProps["intent"]Override button intent colour
roundedButtonProps["rounded"]Override button radius. Default: "full"
disabledbooleanDisabled state
loadingbooleanLoading spinner state
leadingIconReactNodeIcon before label
trailingIconReactNodeIcon after label

Accessibility

  • Root element carries role="alert" by default — an assertive ARIA live region. Set role="status" for non-urgent (polite) announcements.
  • The leading icon uses aria-hidden="true" — it is decorative; the title and/or description provide the text.
  • The close button has an accessible aria-label="Dismiss".
  • All interactive elements (action buttons, close) meet the WCAG AA 44×44 px minimum touch target via Tessina's Button/IconButton components.
  • Focus ring: focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2.

Action Sheet

A mobile-first bottom sheet presenting a set of contextual actions. Built on Base UI Dialog. Compound component pattern with Header, Group, Item, Separator, and Cancel. Three sizes. Five corner-rounding options. Destructive intent, loading state, icon slots. LTR and RTL support.

AlertDialog

Blocking confirmation dialog for destructive or critical actions. Built on Base UI's alert-dialog primitive with role="alertdialog", focus trap, and explicit-action-only dismissal — the user must choose Confirm or Cancel.

On this page

PlaygroundInstallationUsageExamplesDefaultIntentsVariantsSizesWith ActionsLoadingVariantsIntentsPropsAlertAlertActionAccessibility