npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@djangocfg/ui-core

v2.1.361

Published

Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps

Readme

@djangocfg/ui-core

@djangocfg/ui-core

Framework-agnostic React UI library: 70+ components on Radix + Tailwind v4, plus a router-adapter system that lets the same <Link> / <Sidebar> / <SSRPagination> work under Next.js, Vite, Electron, Wails, or plain React.

Part of DjangoCFG. Live demo.

Install

pnpm add @djangocfg/ui-core

Imports

import { Button, Card, Sidebar, SSRPagination } from '@djangocfg/ui-core/components';
import { useIsMobile, useNavigate, useQueryParams } from '@djangocfg/ui-core/hooks';
import { cn } from '@djangocfg/ui-core/lib';

Components

Organized in components/ by category — everything re-exported from the root barrel.

| Category | Examples | |---|---| | Forms | Button, ButtonLink, ButtonGroup, Input, Textarea, Checkbox, RadioGroup, Switch, Slider, Label, Form, Field, InputOTP, PhoneInput, InputGroup, DownloadButton | | Select | Select, Combobox, ComboboxAsync, MultiSelect, MultiSelectPro, MultiSelectProAsync, CountrySelect, LanguageSelect (all support icons + badges; Select accepts empty-string values; ComboboxAsync is the single-select counterpart to MultiSelectProAsync for server-side typeahead) | | Overlay | Dialog, AlertDialog, Sheet, Drawer, Popover, Tooltip, HoverCard, ResponsiveSheet, SidePanel | | Navigation | Link, Breadcrumb, BreadcrumbNavigation, Pagination, StaticPagination, SSRPagination, Sidebar (full shadcn primitives), Tabs, Accordion, Collapsible, Command, DropdownMenu, ContextMenu, Menubar, NavigationMenu | | Layout | Card, Section, Sticky, ScrollArea, Resizable, Separator, Skeleton, AspectRatio | | Data | Table, Badge, Avatar, Progress, Carousel, Calendar, DatePicker, DateRangePicker, Toggle, ToggleGroup, Chart* | | Feedback | Alert, Spinner, Empty, Preloader, Toaster (Sonner) | | Specialized | Kbd, CopyButton, CopyField, TokenIcon, Item, Portal, ImageWithFallback, Flag, LanguageFlag | | Effects | GlowBackground |

Pagination, breadcrumb and sidebar live here (not in ui-nextjs). SSRPagination reads URL state through useLocation + useQueryParams, so it works under any router adapter.

Hooks

import { useIsMobile, useMediaQuery, useShortcutModLabel } from '@djangocfg/ui-core/hooks';
import { useNavigate, useLocation, useQueryParams, useRouter, useIsActive } from '@djangocfg/ui-core/hooks/router';

| Group | Hooks | |---|---| | Router (adapter-driven) | useNavigate, useLocation, useQueryParams, useQueryState (typed), useRouter, useUrlBuilder, useSmartLink, useIsActive, useBackOrFallback + parsers (parseAsInteger, parseAsBoolean, …) | | Media | useIsMobile, useIsPhone, useIsTabletOrBelow, useMediaQuery | | Device | useDeviceDetect, useBrowserDetect, useShortcutModLabel | | State | useDebounce, useDebouncedCallback, useCountdown, useImageLoader, useMounted | | DOM | useEventListener | | Theme | useThemeColor, useThemePalette (palette-aware hex colors for Canvas/SVG) | | Hotkey | useHotkey, HotkeysProvider, useHotkeysContext | | Feedback | useToast, toast (Sonner) | | Debug | useDebugTools |

Router adapters

<Link>, <Sidebar>, <SSRPagination> and friends are wired through a small adapter system, so the same component renders correctly under any router.

// Next.js host (e.g. apps/demo)
import { LinkProvider } from '@djangocfg/ui-core/components';
import NextLink from 'next/link';

<LinkProvider value={NextLink}>{children}</LinkProvider>

When no adapter is mounted, <Link> falls back to a plain <a> and routes clicks through the History API. @djangocfg/layouts/BaseApp mounts the Next adapters by default.

Schema-driven configurators

@djangocfg/ui-core/lib exports a portable JSON Schema 7 subset (CustomJsonSchema7, CustomJsonUiSchema7, CustomJsonUiGroup, CustomJsonUiDisabledWhenRule) for packages that ship configurator schemas without taking a runtime dependency on RJSF.

import type { CustomJsonSchema7, CustomJsonUiSchema7 } from '@djangocfg/ui-core/lib';

@djangocfg/ui-tools/json-form accepts these directly (it's a union with RJSFSchema).

Dialog service

import { DialogProvider, useDialog, dialog } from '@djangocfg/ui-core/lib/dialog-service';

dialog.confirm({ title: 'Delete?', description: 'This is permanent.' });

Logger

import { createLogger } from '@djangocfg/ui-core/lib';
const log = createLogger('MyComponent');
log.info('user logged in', { userId: 123 });

Styles

@import '@djangocfg/ui-core/styles/globals.css';

Requirements

  • React ≥ 19
  • Tailwind CSS ≥ 4

djangocfg.com