Skip to content

Components Reference

Varity Team Core Contributors Updated March 2026

All React components exported by @varity-labs/ui-kit. Every import uses:

import { ComponentName } from '@varity-labs/ui-kit';

All-in-one provider that sets up authentication and account management. Wrap your app with this once.

import { PrivyStack } from '@varity-labs/ui-kit';
<PrivyStack
appId="your-privy-app-id"
loginMethods={['email', 'google', 'wallet']}
appearance={{
theme: 'light',
accentColor: '#2563EB',
logo: '/logo.png',
}}
>
{children}
</PrivyStack>
PropTypeDefaultDescription
appIdstringDev defaultAuth App ID
thirdwebClientIdstringDev defaultThirdweb Client ID
loginMethodsstring[]['email', 'google', 'wallet']Login options
appearance{ theme, accentColor, logo }Light themeUI customization
onAddressChange(address: string | null) => void-Wallet address callback
childrenReactNodeRequiredApp content

Full-featured provider for dashboards. Includes authentication, Thirdweb, React Query, and wallet sync.

import { VarityDashboardProvider } from '@varity-labs/ui-kit';
<VarityDashboardProvider
privyAppId={process.env.NEXT_PUBLIC_PRIVY_APP_ID}
appearance={{ theme: 'light', logo: '/logo.png' }}
>
<Dashboard />
</VarityDashboardProvider>
PropTypeDefaultDescription
privyAppIdstringenv varAuth App ID
thirdwebClientIdstringenv varThirdweb Client ID
appearance{ theme, accentColor, logo }-UI customization
loginMethodsstring[]['email', 'google', 'wallet']Login options
childrenReactNodeRequiredApp content

Lower-level auth wrapper. Most apps should use PrivyStack instead.

import { VarityPrivyProvider } from '@varity-labs/ui-kit';
<VarityPrivyProvider appId="your-privy-app-id">
{children}
</VarityPrivyProvider>

Provides theme configuration throughout the component tree via CSS variables.

import { ThemeProvider, defaultTheme, themePresets } from '@varity-labs/ui-kit';
<ThemeProvider theme={{
...defaultTheme,
primaryColor: '#6a1b9a',
accentColor: '#00bcd4',
}}>
<App />
</ThemeProvider>
// Or use a preset
<ThemeProvider theme={themePresets.finance}>
<App />
</ThemeProvider>
PropTypeDefaultDescription
themeVarityThemeRequiredTheme configuration
childrenReactNodeRequiredApp content

Available presets: themePresets.finance, themePresets.healthcare, themePresets.retail, themePresets.tech.

Provides toast notification context. Wrap your app with this to enable useToast().

import { ToastProvider, useToast } from '@varity-labs/ui-kit';
// In your root layout
<ToastProvider>{children}</ToastProvider>
// In any child component
function SaveButton() {
const toast = useToast();
return (
<button onClick={() => toast.success('Saved!')}>Save</button>
);
}

useToast() returns { success, error, info } — each takes a message string.


Pre-built login button that opens the authentication modal.

import { PrivyLoginButton } from '@varity-labs/ui-kit';
<PrivyLoginButton />
<PrivyLoginButton
onSuccess={() => router.push('/dashboard')}
onError={(error) => console.error(error)}
className="btn-primary"
>
Sign In to Continue
</PrivyLoginButton>
PropTypeDefaultDescription
childrenReactNode”Sign In”Button text
onSuccessfunction-Called on successful login
onErrorfunction-Called on login error
classNamestring-CSS class name

Displays user information with optional logout button.

import { PrivyUserProfile } from '@varity-labs/ui-kit';
<PrivyUserProfile showLogoutButton />
<PrivyUserProfile
showLogoutButton
onLogout={() => router.push('/')}
/>
PropTypeDefaultDescription
showLogoutButtonbooleanfalseShow logout button
onLogoutfunction-Custom logout handler
classNamestring-CSS class name

Shows content only to authenticated users.

import { PrivyProtectedRoute } from '@varity-labs/ui-kit';
<PrivyProtectedRoute>
<Dashboard />
</PrivyProtectedRoute>
<PrivyProtectedRoute
fallback={<CustomLoginPage />}
loadingComponent={<CustomSpinner />}
>
<Dashboard />
</PrivyProtectedRoute>
PropTypeDefaultDescription
childrenReactNode-Protected content
fallbackReactNodeLogin promptShown when not authenticated
loadingComponentReactNodeSpinnerShown while loading

Prevents a blank screen during auth initialization (5-15 seconds).

import { PrivyReadyGate } from '@varity-labs/ui-kit';
<PrivyReadyGate
timeout={10000}
initializingScreen={<SplashScreen />}
timeoutScreen={<ConnectionError />}
>
{children}
</PrivyReadyGate>
PropTypeDefaultDescription
timeoutnumber10000Timeout in milliseconds
initializingScreenReactNodeLoading spinnerShown during init
timeoutScreenReactNodeError messageShown on timeout

For convenience, these authentication hooks are re-exported from @varity-labs/ui-kit:

import { usePrivy, useWallets, useLogin, useLogout } from '@varity-labs/ui-kit';
const { authenticated, user, ready } = usePrivy();

In-app payment widget for purchases and upgrades (available post-beta). Wrap any trigger element as a child.

import { PaymentWidget } from '@varity-labs/ui-kit';
<PaymentWidget
appId={123}
price={999}
onSuccess={(txHash) => console.log('Purchased!', txHash)}
onError={(err) => console.error('Payment failed:', err)}
>
<button>Buy for $9.99</button>
</PaymentWidget>
PropTypeDefaultDescription
appIdnumberRequiredVarity App ID
pricenumber-Price in cents (e.g., 999 = $9.99)
type'one-time' | 'subscription'-Payment type
intervalDaysnumber30Subscription interval in days
onSuccess(txHash: string) => void-Called with transaction hash on success
onCancel() => void-Called when user cancels
onError(error: Error) => void-Called on payment error
theme'light' | 'dark'-Color theme
classNamestring-CSS class name
childrenReactNodeRequiredTrigger element
disabledboolean-Disable the widget

Content gate that shows premium content after purchase. Shows fallback when not purchased, shows children after purchase (available post-beta).

import { PaymentGate } from '@varity-labs/ui-kit';
<PaymentGate
appId={123}
price={999}
fallback={<p>Purchase to unlock premium content.</p>}
>
<div>This content is only visible after purchase.</div>
</PaymentGate>
PropTypeDefaultDescription
appIdnumberRequiredVarity App ID
pricenumber-Price in cents (e.g., 999 = $9.99)
fallbackReactNodeRequiredContent shown when not purchased
childrenReactNodeRequiredPremium content shown after purchase
theme'light' | 'dark'-Color theme
classNamestring-CSS class name

Hook for programmatic payment interactions.

import { useVarityPayment } from '@varity-labs/ui-kit';
const { hasPurchased, purchase, isLoading, isPurchasing, pricing } = useVarityPayment({ appId: 123 });
Return ValueTypeDescription
hasPurchasedbooleanWhether the user has purchased
isLoadingbooleanLoading purchase status
isPurchasingbooleanPurchase in progress
errorstring | nullError message if any
pricingAppPricing | nullApp pricing information
purchase() => Promise<string | null>Initiate a purchase, returns tx hash
refresh() => Promise<void>Refresh purchase status

Main layout wrapper with sidebar, header, footer, and content area.

import { DashboardLayout } from '@varity-labs/ui-kit';
<DashboardLayout
companyName="Acme Corp"
logoUrl="/logo.png"
user={{ name: 'Jane Doe', address: 'jane@acme.com' }}
navigationItems={[
{ label: 'Dashboard', icon: 'dashboard', path: '/' },
{ label: 'Analytics', icon: 'analytics', path: '/analytics' },
{ label: 'Settings', icon: 'settings', path: '/settings' },
]}
onNavigate={(path) => router.push(path)}
onLogout={() => logout()}
>
<YourContent />
</DashboardLayout>
PropTypeDefaultDescription
childrenReactNodeRequiredMain content
showSidebarbooleantrueShow sidebar
showHeaderbooleantrueShow header
showFooterbooleantrueShow footer
sidebarWidthnumber240Sidebar width in px
headerHeightnumber64Header height in px
logoUrlstring-Company logo URL
companyNamestring-Company name
navigationItemsNavigationItem[][]Sidebar nav items
userUserInfo-User info for header
onLogout() => void-Logout callback
onNavigate(path: string) => void-Navigation callback
onSearchClick() => void-Header search callback
searchPlaceholderstring-Search input placeholder

NavigationItem: { label, icon?, path, active?, children? }

UserInfo: { name, address, avatarUrl? }

Top navigation bar with user menu, notifications, and search.

import { DashboardHeader } from '@varity-labs/ui-kit';
<DashboardHeader
user={{ name: 'Jane', address: 'jane@acme.com' }}
onLogout={() => logout()}
onSearchClick={() => setShowPalette(true)}
showNotifications
notificationCount={3}
/>
PropTypeDefaultDescription
heightnumber64Header height in px
userUserInfo-User info
onLogout() => void-Logout callback
showNotificationsbooleantrueShow notification icon
notificationCountnumber0Unread count
onSearchClick() => void-Search bar click
searchPlaceholderstring'Search...'Search placeholder

Fixed sidebar with collapsible navigation items.

import { DashboardSidebar } from '@varity-labs/ui-kit';
<DashboardSidebar
companyName="Acme Corp"
logoUrl="/logo.png"
navigationItems={navItems}
onNavigate={(path) => router.push(path)}
collapsed={false}
/>
PropTypeDefaultDescription
widthnumber240Sidebar width in px
logoUrlstring-Company logo URL
companyNamestring'Dashboard'Company name
navigationItemsNavigationItem[][]Nav items
onNavigate(path: string) => void-Navigation callback
collapsedbooleanfalseCollapsed mode

Footer with company info, links, and required Varity attribution.

import { DashboardFooter } from '@varity-labs/ui-kit';
<DashboardFooter
companyName="Acme Corp"
links={[
{ label: 'Privacy', url: '/privacy' },
{ label: 'Docs', url: 'https://docs.acme.com', external: true },
]}
/>
PropTypeDefaultDescription
companyNamestring-Company name
showAttributionbooleantrueVarity attribution (required)
linksFooterLink[][]Additional links

FooterLink: { label, url, external? }

Display key performance indicator metrics with trend indicators.

import { KPICard } from '@varity-labs/ui-kit';
<KPICard
title="Revenue"
value="$12,345"
trend="up"
trendValue="+12%"
variant="default"
size="md"
/>
PropTypeDefaultDescription
titlestringRequiredCard title
valuestring | numberRequiredMain value
subtitlestring-Description below value
iconReactNode-Icon element
trend'up' | 'down' | 'neutral'-Trend direction
trendValuestring-Trend text (e.g. “+12%“)
loadingbooleanfalseShow loading skeleton
onClick() => void-Click handler
variant'default' | 'outlined' | 'filled''default'Card style
size'sm' | 'md' | 'lg''md'Card size

Status indicator with colored dot and label.

import { StatusBadge } from '@varity-labs/ui-kit';
<StatusBadge status="connected" />
<StatusBadge status="syncing" label="Importing data" />
<StatusBadge status="error" size="lg" />
PropTypeDefaultDescription
statusStatusTypeRequiredStatus type
labelstringAuto from statusCustom label
showDotbooleantrueShow dot indicator
size'sm' | 'md' | 'lg''md'Badge size
iconReactNode-Optional icon

StatusType: 'connected' | 'disconnected' | 'pending' | 'syncing' | 'error' | 'warning' | 'expired' | 'active' | 'inactive'

Specialized status badge for integrations with sync time display.

import { IntegrationStatus } from '@varity-labs/ui-kit';
<IntegrationStatus
isConnected={true}
isSyncing={false}
lastSyncTime={new Date()}
/>
PropTypeDefaultDescription
isConnectedbooleanRequiredConnection state
needsReauthboolean-Needs re-authentication
isSyncingboolean-Currently syncing
lastSyncTimeDate-Last sync timestamp

Placeholder for empty data views with optional actions.

import { EmptyState, EmptyStatePresets } from '@varity-labs/ui-kit';
<EmptyState
title="No projects yet"
description="Get started by creating your first project."
action={{ label: 'Create Project', onClick: () => setShowModal(true) }}
/>
// Or use a preset
<EmptyStatePresets.NoResults />
<EmptyStatePresets.NoData action={{ label: 'Add Item', onClick: handleAdd }} />
PropTypeDefaultDescription
titlestringRequiredTitle text
descriptionstring-Description text
iconReactNode-Icon to display
action{ label, onClick, variant? }-Primary action button
secondaryAction{ label, onClick }-Secondary action
size'sm' | 'md' | 'lg''md'Component size

Presets: EmptyStatePresets.NoResults, .NoData, .NoIntegrations, .ConnectionRequired, .ComingSoon

Animated loading placeholder with multiple types.

import { LoadingSkeleton, SkeletonCard, SkeletonTable, SkeletonText, SkeletonList } from '@varity-labs/ui-kit';
<LoadingSkeleton type="card" />
<LoadingSkeleton type="table" items={5} />
<LoadingSkeleton type="text" lines={3} />
// Or use shorthand components
<SkeletonCard />
<SkeletonTable items={5} />
<SkeletonText lines={4} />
<SkeletonList items={3} />
PropTypeDefaultDescription
type'text' | 'circle' | 'rect' | 'card' | 'table' | 'list''rect'Skeleton type
widthstring | number-Custom width
heightstring | number-Custom height
linesnumber3Lines for text type
itemsnumber3Rows for table/list
animatebooleantrueShow animation

Sortable, paginated data table.

import { DataTable } from '@varity-labs/ui-kit';
<DataTable
columns={[
{ key: 'name', header: 'Name', sortable: true },
{ key: 'revenue', header: 'Revenue', align: 'right',
render: (val) => `$${val.toLocaleString()}` },
{ key: 'status', header: 'Status' },
]}
data={[
{ id: '1', name: 'Product A', revenue: 12000, status: 'Active' },
{ id: '2', name: 'Product B', revenue: 8500, status: 'Draft' },
]}
pagination
pageSize={10}
onRowClick={(row) => console.log(row)}
/>
PropTypeDefaultDescription
columnsDataTableColumn[]RequiredColumn definitions
dataT[]RequiredTable data
loadingbooleanfalseShow loading state
paginationbooleanfalseEnable pagination
pageSizenumber10Rows per page
onRowClick(row: T) => void-Row click handler
emptyMessagestring'No data available'Empty state text
hoverablebooleantrueEnable row hover
stripedbooleantrueStriped rows

DataTableColumn: { key, header, width?, sortable?, render?, align? }

Metric card with optional trend indicator and mini chart.

import { AnalyticsCard } from '@varity-labs/ui-kit';
<AnalyticsCard
title="Total Revenue"
value={125000}
unit="$"
trend="up"
trendValue={12.5}
comparisonPeriod="vs last month"
icon="💰"
chartData={[100, 120, 115, 130, 125]}
/>
PropTypeDefaultDescription
titlestringRequiredCard title
valuestring | numberRequiredMain metric
unitstring''Value unit ($, %, etc.)
trend'up' | 'down' | 'neutral''neutral'Trend direction
trendValuenumber-Trend percentage
comparisonPeriodstring-Period text
iconstring-Icon emoji
loadingbooleanfalseLoading state
chartDatanumber[]-Mini bar chart data
onClick() => void-Click handler

Wrapper for chart visualizations with title, actions, and loading/error/empty states.

import { ChartContainer } from '@varity-labs/ui-kit';
<ChartContainer
title="Revenue Trend"
subtitle="Last 30 days"
height={300}
actions={[
{ label: 'Export', icon: '📥', onClick: handleExport }
]}
>
<YourChartLibraryComponent />
</ChartContainer>
PropTypeDefaultDescription
titlestringRequiredChart title
subtitlestring-Chart description
childrenReactNodeRequiredChart content
actionsChartAction[][]Action buttons
heightnumber | string400Container height
loadingbooleanfalseShow loading overlay
errorstring-Error message
isEmptybooleanfalseShow empty state
emptyMessagestring'No data available'Empty text

ChartAction: { label, icon?, onClick }

Simple metric with label, formatted value, and color.

import { MetricDisplay } from '@varity-labs/ui-kit';
<MetricDisplay
label="Conversion Rate"
value={3.5}
format="percentage"
size="large"
color="success"
/>
<MetricDisplay
label="Revenue"
value={125000}
format="currency"
decimals={0}
/>
PropTypeDefaultDescription
labelstringRequiredMetric label
valuestring | numberRequiredMetric value
format'number' | 'currency' | 'percentage' | 'custom''number'Format type
currencySymbolstring'$'Currency symbol
decimalsnumber0Decimal places
size'small' | 'medium' | 'large''medium'Display size
color'default' | 'primary' | 'success' | 'warning' | 'error''default'Value color
iconstring-Icon emoji

SVG mini line chart for inline trend visualization.

import { Sparkline, SPARKLINE_COLORS, getSparklineColors } from '@varity-labs/ui-kit';
<Sparkline
data={[10, 15, 12, 18, 22, 20, 25]}
width={100}
height={32}
strokeColor="#10b981"
/>
// Use color presets
const colors = getSparklineColors('up');
<Sparkline data={data} strokeColor={colors.stroke} fillColor={colors.fill} />
PropTypeDefaultDescription
datanumber[]RequiredData points (min 2)
widthnumber100SVG width
heightnumber32SVG height
strokeColorstring'#3b82f6'Line color
fillColorstring'#3b82f680'Gradient fill color
strokeWidthnumber2Line thickness
showGradientbooleantrueShow area gradient

SPARKLINE_COLORS presets: positive, negative, neutral, blue, purple, orange.

Rich KPI card with sparkline, trend badge, help tooltip, and sync time.

import { EnhancedKPICard } from '@varity-labs/ui-kit';
<EnhancedKPICard
title="Monthly Revenue"
value="$45,230"
icon="💰"
trend="up"
color="green"
change={{ value: 12.5, period: 'vs last month' }}
showSparkline
sparklineData={[30, 35, 32, 40, 38, 45]}
helpText="Total revenue from all sources"
lastSynced="2 min ago"
/>
PropTypeDefaultDescription
titlestringRequiredCard title
valuestring | numberRequiredMain value
iconstringRequiredIcon emoji
trend'up' | 'down' | 'neutral''neutral'Trend direction
color'blue' | 'green' | 'orange' | 'purple' | 'red''blue'Accent color
change{ value: number, period: string }-Change indicator
showSparklinebooleanfalseShow sparkline chart
sparklineDatanumber[]Auto-generatedSparkline data points
sourcestring-Data source label
helpTextstring-Tooltip help text
lastSyncedstring-Last sync time
onClick() => void-Click handler

Multi-variant button with loading state and icon support.

import { Button } from '@varity-labs/ui-kit';
<Button variant="primary" onClick={handleSave}>Save</Button>
<Button variant="secondary" size="sm">Cancel</Button>
<Button variant="danger" loading>Deleting...</Button>
<Button variant="outline" icon={<PlusIcon />}>Add Item</Button>
<Button variant="ghost" size="lg">Learn More</Button>
PropTypeDefaultDescription
variant'primary' | 'secondary' | 'outline' | 'ghost' | 'danger''primary'Button style
size'sm' | 'md' | 'lg''md'Button size
loadingbooleanfalseShow loading spinner
iconReactNode-Icon element
disabledbooleanfalseDisabled state

Also accepts all standard <button> HTML attributes.

Text input with label, error, and hint support.

import { Input } from '@varity-labs/ui-kit';
<Input
label="Email"
type="email"
placeholder="you@example.com"
required
error={errors.email}
hint="We'll never share your email."
/>
PropTypeDefaultDescription
labelstring-Field label
errorstring-Error message
hintstring-Helper text

Also accepts all standard <input> HTML attributes.

Multi-line text input with label and error support.

import { Textarea } from '@varity-labs/ui-kit';
<Textarea
label="Description"
rows={4}
placeholder="Enter a description..."
error={errors.description}
/>
PropTypeDefaultDescription
labelstring-Field label
errorstring-Error message

Also accepts all standard <textarea> HTML attributes.

Dropdown select with label and error support.

import { Select } from '@varity-labs/ui-kit';
<Select
label="Role"
options={[
{ value: 'admin', label: 'Admin' },
{ value: 'member', label: 'Member' },
{ value: 'viewer', label: 'Viewer' },
]}
error={errors.role}
/>
PropTypeDefaultDescription
labelstring-Field label
options{ value: string, label: string }[]RequiredSelect options
errorstring-Error message

Also accepts all standard <select> HTML attributes.

Switch toggle with label and description.

import { Toggle } from '@varity-labs/ui-kit';
<Toggle
checked={emailNotifications}
onChange={setEmailNotifications}
label="Email Notifications"
description="Receive updates via email"
/>
PropTypeDefaultDescription
checkedbooleanRequiredToggle state
onChange(checked: boolean) => voidRequiredChange handler
labelReactNode-Toggle label
descriptionstring-Help text
disabledbooleanfalseDisabled state
size'sm' | 'md''md'Toggle size

Checkbox with label, description, and indeterminate state.

import { Checkbox } from '@varity-labs/ui-kit';
<Checkbox
checked={agreeToTerms}
onChange={setAgreeToTerms}
label="I agree to the terms"
/>
<Checkbox
checked={false}
indeterminate={true}
onChange={handleChange}
label="Select all"
/>
PropTypeDefaultDescription
checkedbooleanRequiredChecked state
onChange(checked: boolean) => voidRequiredChange handler
labelstring-Checkbox label
descriptionstring-Help text
disabledbooleanfalseDisabled state
indeterminatebooleanfalseIndeterminate state
errorstring-Error message

Radio button group with vertical or horizontal layout.

import { RadioGroup } from '@varity-labs/ui-kit';
<RadioGroup
name="plan"
label="Select Plan"
value={selectedPlan}
onChange={setSelectedPlan}
options={[
{ value: 'free', label: 'Free', description: 'Basic features' },
{ value: 'pro', label: 'Pro', description: '$9/month' },
{ value: 'enterprise', label: 'Enterprise', description: 'Custom pricing' },
]}
/>
PropTypeDefaultDescription
valuestringRequiredSelected value
onChange(value: string) => voidRequiredChange handler
optionsRadioOption[]RequiredRadio options
namestringRequiredInput group name
labelstring-Group label
orientation'vertical' | 'horizontal''vertical'Layout direction
disabledbooleanfalseDisabled state
errorstring-Error message

RadioOption: { value, label, description?, disabled? }


Modal dialog with backdrop, focus trap, and escape-to-close.

import { Dialog } from '@varity-labs/ui-kit';
<Dialog
open={showDialog}
onClose={() => setShowDialog(false)}
title="Edit Profile"
description="Update your account information."
>
<form>
<Input label="Name" />
<Button onClick={handleSave}>Save</Button>
</form>
</Dialog>
PropTypeDefaultDescription
openbooleanRequiredWhether dialog is visible
onClose() => voidRequiredClose handler
titlestringRequiredDialog title
descriptionstring-Subtitle text
childrenReactNodeRequiredDialog content

Pre-built confirmation dialog with confirm/cancel actions.

import { ConfirmDialog } from '@varity-labs/ui-kit';
<ConfirmDialog
open={showConfirm}
onClose={() => setShowConfirm(false)}
onConfirm={handleDelete}
title="Delete Project"
description="This action cannot be undone."
confirmLabel="Delete"
confirmVariant="danger"
loading={isDeleting}
/>
PropTypeDefaultDescription
openbooleanRequiredWhether dialog is visible
onClose() => voidRequiredClose/cancel handler
onConfirm() => voidRequiredConfirm handler
titlestringRequiredDialog title
descriptionstringRequiredConfirmation message
confirmLabelstring'Delete'Confirm button text
confirmVariant'danger' | 'primary''danger'Confirm button style
loadingbooleanfalseLoading state

Accessible dropdown menu with keyboard navigation.

import { DropdownMenu } from '@varity-labs/ui-kit';
import { Edit, Trash2, Copy } from 'lucide-react';
<DropdownMenu
trigger={<Button variant="ghost">Actions</Button>}
items={[
{ label: 'Edit', icon: Edit, onClick: handleEdit },
{ label: 'Duplicate', icon: Copy, onClick: handleDuplicate },
'divider',
{ label: 'Delete', icon: Trash2, onClick: handleDelete, danger: true },
]}
align="right"
/>
PropTypeDefaultDescription
triggerReactNodeRequiredTrigger element
items(DropdownMenuItem | 'divider')[]RequiredMenu items
align'left' | 'right''right'Menu alignment

DropdownMenuItem: { label, onClick, icon?, disabled?, danger? }


Generic loading skeleton with rectangle, circle, and text variants.

import { Skeleton } from '@varity-labs/ui-kit';
<Skeleton variant="rectangle" width="100%" height={20} />
<Skeleton variant="circle" width={40} />
<Skeleton variant="text" lines={3} />
PropTypeDefaultDescription
variant'rectangle' | 'circle' | 'text''rectangle'Shape type
widthstring | number'100%'Element width
heightstring | number'20px'Element height
linesnumber3Lines for text variant

Colored badge with optional dot indicator.

import { Badge } from '@varity-labs/ui-kit';
<Badge variant="green" dot>Active</Badge>
<Badge variant="red">Overdue</Badge>
<Badge variant="blue">New</Badge>
PropTypeDefaultDescription
childrenReactNodeRequiredBadge content
variant'green' | 'blue' | 'yellow' | 'red' | 'gray''gray'Color variant
dotbooleanfalseShow dot indicator

Auto-colored badge based on priority level.

import { PriorityBadge } from '@varity-labs/ui-kit';
<PriorityBadge priority="high" /> {/* red */}
<PriorityBadge priority="medium" /> {/* yellow */}
<PriorityBadge priority="low" /> {/* gray */}
PropTypeDefaultDescription
prioritystringRequired'high', 'medium', or 'low'

Auto-colored badge with dot for project status.

import { ProjectStatusBadge } from '@varity-labs/ui-kit';
<ProjectStatusBadge status="active" /> {/* blue + dot */}
<ProjectStatusBadge status="paused" /> {/* yellow + dot */}
<ProjectStatusBadge status="completed" /> {/* green + dot */}
PropTypeDefaultDescription
statusstringRequired'active', 'paused', or 'completed'

Auto-colored badge with dot for task status.

import { TaskStatusBadge } from '@varity-labs/ui-kit';
<TaskStatusBadge status="todo" /> {/* gray */}
<TaskStatusBadge status="in_progress" /> {/* blue */}
<TaskStatusBadge status="done" /> {/* green */}
PropTypeDefaultDescription
statusstringRequired'todo', 'in_progress', or 'done'

Auto-colored badge for user roles.

import { RoleBadge } from '@varity-labs/ui-kit';
<RoleBadge role="admin" /> {/* blue */}
<RoleBadge role="member" /> {/* green */}
<RoleBadge role="viewer" /> {/* gray */}
PropTypeDefaultDescription
rolestringRequired'admin', 'member', or 'viewer'

User avatar with image or initials fallback and optional status dot.

import { Avatar } from '@varity-labs/ui-kit';
<Avatar name="Jane Doe" src="/avatars/jane.jpg" size="md" status="online" />
<Avatar name="John Smith" size="lg" /> {/* Shows "JS" initials */}
PropTypeDefaultDescription
namestringRequiredUser name (for initials)
srcstring-Image URL
altstringnameAlt text
size'sm' | 'md' | 'lg''md'Avatar size
status'online' | 'offline' | 'busy'-Status indicator

Overlapping stack of avatars with overflow count.

import { AvatarGroup } from '@varity-labs/ui-kit';
<AvatarGroup
avatars={[
{ name: 'Jane Doe', src: '/jane.jpg' },
{ name: 'John Smith' },
{ name: 'Alice Brown' },
{ name: 'Bob Wilson' },
]}
max={3}
/>
PropTypeDefaultDescription
avatars{ src?, name }[]RequiredAvatar data
maxnumber3Max visible avatars
size'sm' | 'md' | 'lg''md'Avatar size

Animated progress bar with multiple variants.

import { ProgressBar } from '@varity-labs/ui-kit';
<ProgressBar value={75} variant="primary" showValue />
<ProgressBar value={90} variant="success" size="sm" />
<ProgressBar value={45} variant="warning" striped />
PropTypeDefaultDescription
valuenumberRequiredProgress 0-100
variant'primary' | 'success' | 'warning' | 'danger''primary'Color variant
size'sm' | 'md''md'Bar thickness
showValuebooleanfalseShow percentage text
stripedbooleanfalseAnimated stripes
labelstring-Accessibility label

Searchable command palette (Cmd+K style) with keyboard navigation.

import { CommandPalette } from '@varity-labs/ui-kit';
const [showPalette, setShowPalette] = useState(false);
<CommandPalette
open={showPalette}
onClose={() => setShowPalette(false)}
onNavigate={(path) => router.push(path)}
projects={projects}
tasks={tasks}
team={teamMembers}
/>
PropTypeDefaultDescription
openbooleanRequiredWhether palette is visible
onClose() => voidRequiredClose handler
onNavigate(path: string) => voidRequiredNavigation handler
projects{ id, name, description?, status? }[][]Searchable projects
tasks{ id, title, description?, status? }[][]Searchable tasks
team{ id, name, email }[][]Searchable team members

Includes built-in navigation items (Dashboard, Projects, Tasks, Team, Settings).

Navigation breadcrumb with home button and separators.

import { Breadcrumb } from '@varity-labs/ui-kit';
<Breadcrumb
items={[
{ label: 'Projects', onClick: () => router.push('/projects') },
{ label: 'Acme Corp' },
]}
showHome
onHomeClick={() => router.push('/')}
separator="chevron"
/>
PropTypeDefaultDescription
itemsBreadcrumbItem[]RequiredBreadcrumb items
separator'chevron' | 'slash''chevron'Separator style
showHomebooleantrueShow home icon
onHomeClick() => void-Home click handler

BreadcrumbItem: { label, href?, onClick? }


Customizable logo with image or initial fallback.

import { Logo } from '@varity-labs/ui-kit';
<Logo
src="/logo.png"
companyName="Acme Corp"
size="medium"
showName
onClick={() => router.push('/')}
/>
PropTypeDefaultDescription
srcstring-Logo image URL
companyNamestring'Dashboard'Company name
size'small' | 'medium' | 'large' | number'medium'Logo size
showNamebooleanfalseShow name beside logo
onClick() => void-Click handler

Required Varity attribution component (per licensing agreement).

import { Attribution } from '@varity-labs/ui-kit';
<Attribution position="footer" size="small" />
<Attribution position="floating" />
PropTypeDefaultDescription
position'footer' | 'header' | 'floating''footer'Position mode
size'small' | 'medium' | 'large''medium'Component size
showLogobooleantrueShow Varity logo

HookImportDescription
useToast@varity-labs/ui-kitAccess toast notifications (success, error, info)
useTheme@varity-labs/ui-kitAccess current VarityTheme from ThemeProvider
usePrivy@varity-labs/ui-kitAuth state (authenticated, user, ready)
useWallets@varity-labs/ui-kitConnected wallet list
useLogin@varity-labs/ui-kitProgrammatic login trigger
useLogout@varity-labs/ui-kitProgrammatic logout trigger
useVarityPayment@varity-labs/ui-kitProgrammatic payment control

import {
PrivyStack,
PrivyLoginButton,
PrivyUserProfile,
PrivyProtectedRoute,
DashboardLayout,
KPICard,
DataTable,
Button,
ToastProvider,
useToast,
usePrivy,
} from '@varity-labs/ui-kit';
function App() {
return (
<PrivyStack appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID}>
<ToastProvider>
<Header />
<main>
<PrivyProtectedRoute>
<DashboardPage />
</PrivyProtectedRoute>
</main>
</ToastProvider>
</PrivyStack>
);
}
function Header() {
const { authenticated } = usePrivy();
return (
<header className="flex justify-between p-4">
<h1>My App</h1>
{authenticated ? <PrivyUserProfile showLogoutButton /> : <PrivyLoginButton />}
</header>
);
}
function DashboardPage() {
const toast = useToast();
return (
<div>
<div className="grid grid-cols-3 gap-4 mb-6">
<KPICard title="Revenue" value="$12,345" trend="up" trendValue="+12%" />
<KPICard title="Users" value={1234} trend="up" trendValue="+8%" />
<KPICard title="Churn" value="2.3%" trend="down" trendValue="-0.5%" />
</div>
<DataTable
columns={[
{ key: 'name', header: 'Customer', sortable: true },
{ key: 'plan', header: 'Plan' },
{ key: 'revenue', header: 'Revenue', align: 'right' },
]}
data={[
{ id: '1', name: 'Acme Corp', plan: 'Pro', revenue: '$500' },
{ id: '2', name: 'Globex', plan: 'Free', revenue: '$0' },
]}
pagination
pageSize={10}
/>
<Button onClick={() => toast.success('Data refreshed!')}>Refresh</Button>
</div>
);
}