Skip to main content

Component Library

The frontend uses a custom design system built on Tailwind CSS v4. All design system components live in components/ux/ and follow the TW* naming convention. Theme colors flow through CSS custom properties so components adapt automatically to the user's selected theme.

Form Controls

ComponentFilePurpose
TWInputTWInput.tsxText input with theme-aware focus ring and validation states
TWSelectTWSelect.tsxDropdown select with theme styling
TWDatepickerTWDatepicker.tsxDate picker with calendar popup
TWTextareaTWTextarea.tsxMulti-line text input
TWPhoneTWPhone.tsxPhone number input with country code formatting
TWSliderTWSlider.tsxRange slider for numeric values
TWSwitchTWSwitch.tsxToggle switch for boolean settings
TWCheckboxTWCheckbox.tsxCheckbox with theme colors
TWRadioGroupTWRadioGroup.tsxRadio button group
TWInputOtpTWInputOtp.tsxOTP code input (segmented)
TWPasswordConfirmTWPasswordConfirm.tsxPassword input with confirmation matching

Feedback & Status

ComponentFilePurpose
TWToastTWToast.tsxToast notifications (custom system, not HeroUI)
TWSpinnerTWSpinner.tsxLoading spinner
TWCircularProgressTWCircularProgress.tsxCircular progress indicator
TWProgressTWProgress.tsxLinear progress bar
TWSkeletonTWSkeleton.tsxLoading skeleton placeholder
TWBadgeTWBadge.tsxStatus badge (colored dot + label)
TWChipTWChip.tsxChip / tag component
TWCountTWCount.tsxNumeric count badge
TWScoreTWScore.tsxScore / rating display
ComponentFilePurpose
TWButtonTWButton.tsxButton with multiple variants (primary, stroke, text, negative) resolved via semantic IDs
TWLinkTWLink.tsxThemed link (primary, navigation, inline, subtle variants)
TWDropdownTWDropdown.tsxDropdown menu with actions
TWTabsTWTabs.tsxTab navigation
TWPaginationTWPagination.tsxPagination controls

Dialogs & Overlays

ComponentFilePurpose
TWModalTWModal.tsxModal dialog
TWConfirmDialogTWConfirmDialog.tsxConfirmation dialog with accept/cancel
TWTooltipTWTooltip.tsxTooltip on hover
DeleteConfirmationDialogDeleteConfirmationDialog.tsxSpecialized delete confirmation

Data Display

ComponentFilePurpose
TWTableTWTable.tsxData table with sorting and selection
TWAvatarTWAvatar.tsxUser avatar with fallback initials
TWImageTWImage.tsxImage component with loading states
SafeImageSafeImage.tsxImage with broken-image fallback
ImageWithFallbackImageWithFallback.tsxImage with placeholder on error

Layout

ComponentFilePurpose
TWCardTWCard.tsxCard container
FormCardFormCard.tsxCard optimized for form layouts
GridGrid.tsxGrid layout system
TWDividerTWDivider.tsxHorizontal / vertical divider
CardComponentCardComponent.tsxBase card component

Utilities

ComponentFilePurpose
TWIconTWIcon.tsxIcon wrapper
TWToggleTWToggle.tsxToggle button
TWSetPageTitleTWSetPageTitle.tsxDeclarative page title setter
TWSharedStylesTWSharedStyles.tsxSTYLE_VARIABLES object with reusable Tailwind class combinations
TWExtractTWExtract.tsxData extraction display
ValidatedSubmitButtonValidatedSubmitButton.tsxForm submit button with validation awareness

Animation Components

Animation components in components/animations/ use Framer Motion for page transitions and micro-interactions.

Icon Library

Custom icon components live in components/icons/. These wrap SVG icons for consistent sizing and theme color integration.

Higher-Order Components

HOCFilePurpose
withSuspensecomponents/reusable/withSuspense.tsxWraps a component in React Suspense with a loading fallback