@janhq/interfaces
v0.0.3
Published
Shared UI component library for Jan
Readme
@janhq/interfaces
Shared UI component library for Jan applications.
Installation
This package is part of the Jan workspace and is automatically available to all workspace packages.
Add it to your package.json:
{
"dependencies": {
"@janhq/interfaces": "workspace:*"
}
}Usage
Import components directly from the package:
import { Button } from "@janhq/interfaces/button";
import { Dialog } from "@janhq/interfaces/dialog";
import { Input } from "@janhq/interfaces/input";
function MyComponent() {
return <Button variant="default">Click me</Button>;
}Available Components
All components are built with:
- React 19 - Latest React features
- Radix UI - Accessible component primitives
- Tailwind CSS - Utility-first styling
- TypeScript - Full type safety
Core Components
avatar- User avatar with fallbackbadge- Status badges and labelsbutton- Interactive button with variantscard- Content containersdialog- Modal dialogsdrawer- Side drawersdropdown-menu- Dropdown menusinput- Text input fieldslabel- Form labelsselect- Dropdown selectseparator- Visual dividerssheet- Slide-out panelssidebar- Navigation sidebarskeleton- Loading placeholdersswitch- Toggle switchestextarea- Multi-line text inputtooltip- Contextual tooltips
Composed Components
button-group- Grouped buttonscollapsible- Collapsible contentcommand- Command palettedropdrawer- Combined dropdown/drawerempty- Empty state displaysfield- Form field wrapperhover-card- Hover popoverinput-group- Grouped inputspopover- Floating content
Icons
svgs/discord- Discord iconsvgs/github- GitHub iconsvgs/google- Google iconsvgs/jan- Jan logo
Utilities
import { cn } from "@janhq/interfaces/lib";
// Merge Tailwind classes
const className = cn("base-class", condition && "conditional-class");Development
# Type check
pnpm type-check
# Lint
pnpm lintNotes
- All components use the
cn()utility from./lib.tsfor className merging - Components are designed to work with Tailwind CSS
- Peer dependencies: React 19+
