Tessina UI
Tessina UI
GitHubIntroduction
InstallationUsageTheming
Components
ButtonIconButtonLinkSpinnerBadgeAvatarStatusChipShortcutSkeletonSurfaceProgressMeterRating
LabelFieldFieldsetCheckboxRadioSwitchSliderSelectComboboxSearchTextareaNumberFieldDate PickerTime PickerOTP InputFile UploadCalendar
AlertBannerToastTooltip
TabsAccordionCollapsibleBreadcrumbPaginationStepperSegmentedControlButtonGroupToggleButtonToggleGroupToolbarNavigation MenuMenubarBottom NavSidebar
Split ButtonFABDropdown MenuContextMenuCommandPopoverHoverCard
ContainerStackFlexGridAspectRatioSpacerCardCarouselDividerScroll Area
Table
ChatBubblePromptInputCodeBlock
ModalAlertDialogDrawerAction SheetTop Header MobileTop Header DesktopEmptyStateForm
Contributing
ComponentsFeedback Blocks

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={() => {}}
/>

Showcase

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.

Calendar

Date picker calendar built on react-day-picker v9. Supports single, range, and multiple selection modes, RTL, week numbers, disabled dates, multi-month view, and an optional footer slot.

Banner

Promotional / informational surface for marketing, onboarding, upsell, and announcements. Three layouts (inline, centered, landscape with edge-to-edge image), four variants, six intents, prefix/suffix slots, primary + secondary actions, inline arrow link, optional footer row, dismissible, LTR/RTL.

On this page

PlaygroundInstallationUsageShowcaseVariantsIntentsPropsAlertAlertActionAccessibility