Skip to content

Component Library

DoCurious has a component library of 100+ React components organized by domain. Components are built with React 19 + TypeScript, styled with the theme token system (CSS custom properties), and composed using Chakra UI v3 primitives.

Source directory: src/components/

Storybook: 55 stories (22 UI primitives + 33 domain components) with withMockData decorator. Run npm run storybook to view locally on port 6006.


UI Primitives

Directory: src/components/ui/

Core building blocks. Each is a themed wrapper around Chakra UI components, consuming design tokens via CSS variables. All 22 have Storybook stories.

ComponentFileStorybookDescription
Alertalert.tsxYesContextual feedback messages (info, warning, error, success)
Avataravatar.tsxYesUser profile images with fallback initials
Badgebadge.tsxYesStatus labels and category tags
Buttonbutton.tsxYesPrimary, secondary, ghost, and destructive variants
Cardcard.tsxYesSurface container with themed shadow, border, backdrop blur
Checkboxcheckbox.tsxYesForm checkbox with label
Collapsiblecollapsible.tsxYesExpandable/collapsible content sections
Dialogdialog.tsxYesModal dialogs with overlay
Dropdown Menudropdown-menu.tsxYesContext menus and action menus
Inputinput.tsxYesText input field
Labellabel.tsxYesForm field labels
Progressprogress.tsxYesProgress bars (XP, completion, upload)
Scroll Areascroll-area.tsxYesCustom scrollbar container
Selectselect.tsxYesDropdown select menus
Separatorseparator.tsxYesHorizontal/vertical dividers (themed: solid, dashed, dotted)
Skeletonskeleton.tsxYesLoading placeholder shapes
Spinnerspinner.tsxYesLoading spinner animation
Switchswitch.tsxYesToggle switch for boolean settings
Tabletable.tsxYesData tables with sortable columns
Tabstabs.tsxYesTabbed navigation
Textareatextarea.tsxYesMulti-line text input
Tooltiptooltip.tsxYesHover/focus tooltips

Layout

Directory: src/components/layout/

Structural components that define the app shell. Supports two navigation modes (sidebar and topnav) switchable per theme preset.

ComponentFileDescription
AppLayoutAppLayout.tsxRoot layout shell -- sidebar/topnav + content area
HeaderHeader.tsxTop header bar with search, notifications, user menu
SidebarSidebar.tsxCollapsible side navigation with role-aware menu items
TopNavTopNav.tsxAlternative horizontal top navigation bar
CartDrawerCartDrawer.tsxSlide-out cart preview with item list and checkout link
ContextSwitcherContextSwitcher.tsxWorkspace context switcher (personal/school/admin)
UserSwitcherUserSwitcher.tsxDev tool: switch between mock user personas

Common / Shared

Directory: src/components/common/

Reusable components used across multiple features.

ComponentFileDescription
AccountSwitcherAccountSwitcher.tsxSwitch between linked accounts
BreadcrumbBreadcrumb.tsxNavigation breadcrumb trail
CookieConsentBannerCookieConsentBanner.tsxGDPR cookie consent banner
EmptyStateEmptyState.tsxPlaceholder for empty lists/pages
ErrorBoundaryErrorBoundary.tsxReact error boundary with fallback UI
FeatureGateFeatureGate.tsxConditionally render based on feature flags
GuidedTourGuidedTour.tsxStep-by-step onboarding tour overlay
LanguageSwitcherLanguageSwitcher.tsxi18n language selector (en/es/fr)
OnboardingWizardOnboardingWizard.tsxMulti-step onboarding flow
ReportButtonReportButton.tsxContent reporting trigger
ReportModalReportModal.tsxContent reporting form dialog
RoleOnboardingWizardRoleOnboardingWizard.tsxRole-specific onboarding flow
SkeletonSkeleton.tsxPage-level loading skeleton
SkipNavLinkSkipNavLink.tsxAccessibility skip-to-content link
ThemeSwitcherThemeSwitcher.tsxTheme preset selector dropdown

Challenge

Directory: src/components/challenge/

Components for browsing, viewing, and managing challenges.

ComponentFileDescription
ChallengeCardChallengeCard.tsxChallenge preview card (grid/list view)
ChallengeGridChallengeGrid.tsxResponsive grid of ChallengeCards
UserChallengeCardUserChallengeCard.tsxActive/completed challenge card for My Challenges
ChallengeDiscussionChallengeDiscussion.tsxChallenge-specific discussion thread
ChallengeVersionHistoryChallengeVersionHistory.tsxChallenge edit/version changelog
ChallengeWelcomeModalChallengeWelcomeModal.tsxWelcome dialog when starting a challenge
CreateChallengeModalCreateChallengeModal.tsxForm for user-submitted challenges

Challenge Finalization

Directory: src/components/challenge/finalization/

Multi-step flow for completing a challenge and documenting the experience.

ComponentFileDescription
FinalizationFlowFinalizationFlow.tsxOrchestrator for the finalization wizard
ExperienceRatingsStepExperienceRatingsStep.tsxRate the challenge experience
FinalUpdateStepFinalUpdateStep.tsxAdd a final track record update
ReflectionStepReflectionStep.tsxGuided reflection prompts
ScrapbookDetailsStepScrapbookDetailsStep.tsxAdd photos/media to the scrapbook
ProviderFeedbackStepProviderFeedbackStep.tsxFeedback for activity providers
ReviewSubmitStepReviewSubmitStep.tsxReview and submit final track record

Community

Directory: src/components/community/

Components for community browsing, membership, and collaborative features.

ComponentFileDescription
CommunityCardCommunityCard.tsxCommunity preview card
CommunityHeaderCommunityHeader.tsxCommunity detail page header with stats
MemberListMemberList.tsxCommunity member listing with roles
FeedPostFeedPost.tsxFeed post card (Bucket List, Track Record, Discussion)
GoalCardGoalCard.tsxCommunity goal progress card
GoalDetailGoalDetail.tsxDetailed view of a community goal
CreateCommunityFormCreateCommunityForm.tsxForm to create a new community
AssignChallengeModalAssignChallengeModal.tsxTeacher tool: assign challenges to students
AssignedChallengeCardAssignedChallengeCard.tsxCard for teacher-assigned challenges

Gamification

Directory: src/components/gamification/

XP, badges, levels, streaks, and competitive features.

ComponentFileDescription
BadgeCardBadgeCard.tsxIndividual badge display with rarity
BadgeGridBadgeGrid.tsxGrid layout of earned/available badges
BadgeCollectionBadgeCollection.tsxFilterable badge collection view
BadgeShowcaseBadgeShowcase.tsxFeatured badge display for profiles
NewBadgeModalNewBadgeModal.tsxBadge earned celebration modal
LevelProgressLevelProgress.tsxXP bar with current/next level
LevelUpModalLevelUpModal.tsxLevel up celebration modal
XPGainToastXPGainToast.tsxToast notification for XP earned
LeaderboardTableLeaderboardTable.tsxRanked leaderboard display
LeaderboardOptInLeaderboardOptIn.tsxOpt-in/out toggle for leaderboards
JourneyMapJourneyMap.tsxVisual exploration map of categories
StreakDisplayStreakDisplay.tsxWeekly streak flame indicator

Track Record

Directory: src/components/trackRecord/

Challenge documentation and progress tracking.

ComponentFileDescription
TrackRecordViewTrackRecordView.tsxFull track record display
TrackRecordGalleryTrackRecordGallery.tsxPhoto/media gallery from track records
TrackRecordRevisionTrackRecordRevision.tsxTrack record version comparison
EntryFormEntryForm.tsxCreate/edit a track record entry
EntryCardEntryCard.tsxIndividual track record entry display
AddUpdateModalAddUpdateModal.tsxQuick update dialog for active challenges
CommentThreadCommentThread.tsxDiscussion thread on track records
SharingSettingsSharingSettings.tsxTrack record visibility controls
MediaUploadMediaUpload.tsxPhoto/video upload for entries
ReflectionPromptsReflectionPrompts.tsxGuided reflection questions
DocumentationGuideModalDocumentationGuideModal.tsxExpanded tips for creating strong TR documentation

Explore

Directory: src/components/explore/

Discovery and browsing features.

ComponentFileDescription
ActiveFiltersActiveFilters.tsxApplied filter chips with remove
CalendarViewCalendarView.tsxCalendar-based event/challenge view
DealersChoiceDealersChoice.tsxGamified challenge discovery card game
EventCardEventCard.tsxEvent listing card
EventDetailModalEventDetailModal.tsxEvent detail overlay
EventDetailPanelEventDetailPanel.tsxSide panel event details
FilterPanelFilterPanel.tsxExplore filter panel
HorizontalChallengeRowHorizontalChallengeRow.tsxHorizontal scrolling challenge carousel
LocationFilterLocationFilter.tsxLocation-based filtering

Filters

Directory: src/components/filters/

Shared filtering system used across Explore and other listing pages.

ComponentFileDescription
FilterButtonFilterButton.tsxFilter toggle trigger button
FilterModalFilterModal.tsxFull-screen filter modal (mobile)
FilterSidebarFilterSidebar.tsxSidebar filter panel (desktop)
FilterTopBarFilterTopBar.tsxHorizontal filter bar (topbar placement)
AppliedFiltersAppliedFilters.tsxApplied filter chip display

Directory: src/components/search/

Global search functionality.

ComponentFileDescription
SearchTriggerSearchTrigger.tsxSearch bar/button in the header
SearchFilterBarSearchFilterBar.tsxCombined search + filter bar
LocationFilterLocationFilter.tsxLocation search input with autocomplete

Social

Directory: src/components/social/

Social features, moderation, and safety.

ComponentFileDescription
ShareButtonShareButton.tsxShare content to communities
BatchShareModalBatchShareModal.tsxShare multiple items at once
BlockUserButtonBlockUserButton.tsxBlock/mute a user
CommunityModToolsCommunityModTools.tsxCommunity moderator tools panel
JoinRequestFlowJoinRequestFlow.tsxCommunity join request workflow
SafetyResourcesSafetyResources.tsxSafety resources and help links

Gift

Directory: src/components/gift/

Challenge gifting system.

ComponentFileDescription
GiftCardGiftCard.tsxGift display card (sent/received)
GiftModalGiftModal.tsxGift sending dialog
GiftPermissionSettingsGiftPermissionSettings.tsxWho can send gifts settings

Invitation

Directory: src/components/invitation/

Challenge invitations (doing challenges together, distinct from gifts).

ComponentFileDescription
InvitationCardInvitationCard.tsxInvitation display card
InviteModalInviteModal.tsxSend invitation dialog

Learning Paths

Directory: src/components/learningPaths/

Structured challenge sequences.

ComponentFileDescription
PathCardPathCard.tsxLearning path preview card
PathProgressPathProgress.tsxLearning path progress tracker

Portfolio

Directory: src/components/portfolio/

Portfolio building and display.

ComponentFileDescription
PortfolioCardPortfolioCard.tsxPortfolio preview card
PortfolioBuilderPortfolioBuilder.tsxPortfolio creation/editing tool

School

Directory: src/components/school/

School administration components.

ComponentFileDescription
CSVRosterImportCSVRosterImport.tsxBulk student import from CSV
TeacherReflectionConfigTeacherReflectionConfig.tsxTeacher reflection prompt configuration
ReflectionDefaultsReflectionDefaults.tsxDefault reflection prompt settings

Review

Directory: src/components/review/

Track record review and verification.

ComponentFileDescription
TrackRecordReviewModalTrackRecordReviewModal.tsxReview/verify a track record submission

Account

Directory: src/components/account/

Account management.

ComponentFileDescription
NotificationPreferencesNotificationPreferences.tsxNotification channel preferences

Notifications

Directory: src/components/notifications/

Notification system.

ComponentFileDescription
NotificationCenterNotificationCenter.tsxNotification inbox panel

Payment

Directory: src/components/payment/

Payment and checkout.

ComponentFileDescription
PaymentFormPaymentForm.tsxReusable payment method selection and card entry form
StripeCheckoutStripeCheckout.tsxStripe Elements integration for live card processing
CheckoutModalCheckoutModal.tsxCheckout flow dialog

Theme Editor

Directory: src/components/themeEditor/

Admin-only theme customization tool (available at /admin/theme-editor).

ComponentFileDescription
EditorShellEditorShell.tsxTheme editor layout container
ColorEditorColorEditor.tsxColor token editing panel
TypographyEditorTypographyEditor.tsxTypography token editing panel
SpacingEditorSpacingEditor.tsxSpacing/density editing panel
StyleEditorStyleEditor.tsxCard, shadow, border style editing
BrandingEditorBrandingEditor.tsxLogo and app name editing
PresetSelectorPresetSelector.tsxTheme preset picker with swatches
PreviewPanelPreviewPanel.tsxLive preview of theme changes
ThemeActionsThemeActions.tsxSave/reset/export actions

Theme Editor Controls

Directory: src/components/themeEditor/controls/

Reusable form controls used by the theme editor panels.

ComponentFileDescription
ColorTokenFieldColorTokenField.tsxColor picker with hex/RGB input for individual design tokens
SelectFieldSelectField.tsxDropdown selector for predefined token values
SliderFieldSliderField.tsxRange slider for numeric tokens (spacing, border-radius, etc.)
TextInputFieldTextInputField.tsxText input for string tokens (font family, custom values)
TokenGroupTokenGroup.tsxCollapsible grouping container for related tokens

Admin

Directory: src/components/admin/

Admin-only components rendered within the platform admin context.

ComponentFileDescription
ImpersonationBarImpersonationBar.tsxFixed orange bar shown when an admin is impersonating a user; displays target user info and an "End" button to return to the admin session

Demo

Directory: src/components/demo/

Demo mode components used for sales presentations and stakeholder walkthroughs.

ComponentFileDescription
DemoModeBarDemoModeBar.tsxFixed bar at the top of the viewport during demo mode; shows current persona, persona switch buttons, reset, and exit controls

Debug (Dev Only)

Directory: src/components/debug/

Development-only debug overlay. Toggled with Ctrl+Shift+D.

ComponentFileDescription
DebugPanelDebugPanel.tsx6-tab debug overlay (stores, routes, network, flags, theme, logs)
DebugPanelHeaderDebugPanelHeader.tsxDebug panel header with tab navigation

Component Count Summary

CategoryCount
UI Primitives22
Layout7
Common / Shared15
Challenge7
Challenge Finalization7
Community9
Gamification12
Track Record11
Explore9
Filters5
Search3
Social6
Gift3
Invitation2
Learning Paths2
Portfolio2
School3
Review1
Account1
Notifications1
Payment3
Theme Editor14
Admin1
Demo1
Debug2
Total~148

DoCurious Platform Documentation