A modern React UI library for building polished product interfaces, dashboards, AI tools, and internal apps.
js-ui-library is intentionally broad: it includes everyday primitives like
buttons, inputs, cards, and modals, but also higher-level product components
like command menus, kanban boards, metric rings, heatmaps, bento layouts,
prompt inputs, pricing tables, testimonial sections, AI chat surfaces, and
creative dashboard experiences.
Most UI libraries are either tiny primitive kits or heavy design systems. This project sits in the middle:
- Ready-to-use React components
- TypeScript-first APIs
- CSS-based styling with design tokens
- No runtime styling dependency
- Accessible defaults where practical
- Creative components for memorable product experiences
- Premium product sections for pricing, trust, comparison, and AI workflows
- Library-mode Vite build with ESM, CJS, and type declarations
- 81 exported component folders
- React 19-ready peer dependencies
- TypeScript declarations generated at build time
- Light and dark theme token support
- Hooks for common behavior
- Vitest and Testing Library setup
- CSS bundled separately through
js-ui-library/style.css
npm install js-ui-libraryReact and React DOM are peer dependencies:
npm install react react-domimport { Button, Card, CardBody, CardHeader, TextInput } from 'js-ui-library'
import 'js-ui-library/style.css'
export function Example() {
return (
<Card>
<CardHeader>
<strong>Create project</strong>
</CardHeader>
<CardBody>
<TextInput label="Project name" name="project" />
<Button>Save project</Button>
</CardBody>
</Card>
)
}Import the bundled CSS once in your app:
import 'js-ui-library/style.css'Use ThemeProvider to scope a theme to part of your interface:
import { Callout, ThemeProvider } from 'js-ui-library'
export function DarkPanel() {
return (
<ThemeProvider theme="dark">
<Callout title="Dark mode">This subtree uses dark design tokens.</Callout>
</ThemeProvider>
)
}The library styles are powered by CSS custom properties in
src/styles/tokens.css, so projects can override tokens at the app level.
ButtonIconButtonBadgeKbdDividerContainerStackGridThemeProviderVisuallyHiddenSkipLink
AppShellPageHeaderCard,CardHeader,CardBodyBentoGrid,BentoItemToolbarNavList
TextInputTextareaSelectCheckboxRadioGroupSwitchSliderSegmentedControlTagInputComboboxSearchInputFileUploadPromptInputFormFieldErrorSummary
AlertCalloutToast,ToastViewportSpinnerSkeletonLoadingOverlayProgressMeterModalDrawerPopoverTooltipDropdownMenu
AccordionTabsBreadcrumbsPaginationStepperFeatureTour
DataTableStatCardMetricRingSparklineCalendarHeatmapContributionGraphActivityQuadrantBarChartAreaChartThreeDBarChartKanbanBoardTimelineStatusDotRating
- GitHub-style contribution grids with
ContributionGraph - Activity distribution visuals with
ActivityQuadrant - Compact KPI sparklines with
Sparkline - 2D trend surfaces with
AreaChart - Horizontal comparison bars with
BarChart - Dimensional dashboard visuals with
ThreeDBarChart
SpotlightCardMarqueeAnimatedNumberColorSwatchBeforeAfterEmptyStateCommandMenuCodeBlock
PricingTableComparisonTableTestimonialCardLogoCloudFeatureGridAIChat
import { useClipboard, useDisclosure } from 'js-ui-library'useDisclosurefor open/close/toggle stateuseClipboardfor copy-to-clipboard interactions
import {
AnimatedNumber,
MetricRing,
Sparkline,
SpotlightCard,
Stack,
} from 'js-ui-library'
export function DashboardMetric() {
return (
<SpotlightCard>
<Stack gap="0.75rem">
<strong>
<AnimatedNumber value={12840} /> active sessions
</strong>
<Sparkline data={[12, 18, 16, 24, 28, 26, 34, 42]} />
<MetricRing label="Activation" value={86} />
</Stack>
</SpotlightCard>
)
}import { PromptInput } from 'js-ui-library'
export function AssistantBox() {
return (
<PromptInput
onSubmitPrompt={(prompt) => console.log(prompt)}
placeholder="Generate a product launch checklist..."
/>
)
}import {
FeatureGrid,
LogoCloud,
PricingTable,
TestimonialCard,
} from 'js-ui-library'
export function LaunchPage() {
return (
<>
<FeatureGrid
features={[
{
description: 'Typed React components with CSS tokens and no runtime styling dependency.',
eyebrow: 'Compose',
title: 'Build serious product surfaces fast',
},
{
description: 'Use pricing, comparison, trust, and AI sections alongside primitives.',
eyebrow: 'Launch',
title: 'Go beyond a basic component kit',
},
]}
/>
<PricingTable
tiers={[
{
cta: 'Start building',
description: 'For polished product teams.',
features: ['Premium sections', 'Dashboard components', 'Theme tokens'],
highlighted: true,
name: 'Studio',
price: '$49',
suffix: '/seat',
},
]}
/>
<TestimonialCard
author="Maya Chen"
quote="This feels like a product design system, not a box of disconnected widgets."
role="Founder"
/>
<LogoCloud
items={[
{ label: 'Northstar', meta: 'SaaS' },
{ label: 'Atlas', meta: 'AI ops' },
]}
title="Trusted by builders"
/>
</>
)
}npm install
npm run devThe local preview runs with Vite.
npm run dev # Start the local preview
npm run build # Type-check and build the package
npm run lint # Run oxlint
npm run test # Run tests once
npm run test:watch # Run tests in watch modeThe package builds to dist:
dist/index.js
dist/index.cjs
dist/index.d.ts
dist/index.css
Consumers should import the CSS once:
import 'js-ui-library/style.css'src/
components/
Button/
Button.tsx
Button.css
index.ts
hooks/
styles/
index.ts
Each component lives in its own folder and exports from src/index.ts.
The project currently uses:
- TypeScript
- Vite library mode
vite-plugin-dts- Oxlint
- Vitest
- Testing Library
- jsdom
Before opening a pull request, run:
npm run build
npm run lint
npm run testContributions are welcome. Please read CONTRIBUTING.md before opening a pull request.
Good first contributions include:
- Improving accessibility behavior
- Adding focused tests for existing components
- Improving documentation examples
- Refining responsive styles
- Adding small, dependency-free components
- More accessibility audits
- Storybook or dedicated docs site
- Component API reference pages
- Better keyboard behavior for advanced composites
- More test coverage for interactive components
- Release automation and changelog generation
Please report vulnerabilities privately. See SECURITY.md.
MIT. See LICENSE.