🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@geowiki/design-system

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@geowiki/design-system

The foundational UI component library for the GeoWiki platform. This package provides accessible, themeable components built on [Radix UI](https://www.radix-ui.com/) primitives, a comprehensive icon set, design tokens, and shared utilities — all styled wi

latest
npmnpm
Version
0.16.9
Version published
Maintainers
1
Created
Source

@geowiki/design-system

The foundational UI component library for the GeoWiki platform. This package provides accessible, themeable components built on Radix UI primitives, a comprehensive icon set, design tokens, and shared utilities — all styled with Tailwind CSS.

Installation

pnpm add @geowiki/design-system

Peer dependencies: react >= 18.2.0 and react-dom >= 18.2.0

Setup

1. Import styles

Import the package stylesheet in your application entry point:

import "@geowiki/design-system/styles.css";

2. Extend Tailwind config

To use the design system's Tailwind theme (colors, typography, animations) in your own components:

// tailwind.config.js
const designSystemConfig = require("@geowiki/design-system/tailwind-config");

/** @type {import('tailwindcss').Config} */
module.exports = {
  presets: [designSystemConfig],
  content: [
    "./src/**/*.{js,ts,jsx,tsx}",
    // Include design-system components in Tailwind's content scan
    "./node_modules/@geowiki/design-system/dist/**/*.{js,mjs}",
  ],
};

3. Import components

import { Button, Dialog, DialogContent, DialogTrigger, cn } from "@geowiki/design-system";

Package Exports

Export PathDescription
@geowiki/design-systemAll components, icons, hooks, and utilities
@geowiki/design-system/styles.cssCompiled CSS (Tailwind + design tokens)
@geowiki/design-system/tailwind-configTailwind configuration preset

Component Catalog

UI Primitives

41 accessible, unstyled-by-default components built on Radix UI, styled with Tailwind and class-variance-authority:

ComponentComponentComponentComponent
AccordionAlertAlertDialogAspectRatio
AvatarBadgeButtonCalendar
CardCheckboxCollapsibleCommand
ContextMenuDialogDropdownMenuForm
HoverCardInputLabelMenubar
NavigationMenuPopoverProgressRadioGroup
ScrollAreaSelectSeparatorSheet
SkeletonSliderSwitchTable
TabsTagTagListTextarea
ToastToasterToggleTooltip
useToast

Icons

28 custom SVG icon components for application UI:

AccountIcon AtomIcon BookTextIcon CalendarIcon CameraIcon ChartLineDotsIcon ChatsIcons ClipboardIcon CpuIcon DesktopCodeIcon FarmerClustersIcon GridDividersIcon HardDriveIcon HeadphonesIcon ImageIcon LayerGroupIcon LegendIcon MapLayersIcon MicroscopeIcon MinusIcon PlusIcon ResourcesIcon SettingsIcon StopWatchCheckIcon UserGroupIcon VideoPlayIcon XIcon

A polymorphic Icon component is also available for dynamic icon rendering.

Map Icons

11 specialized icons for GIS and map visualization:

Download FarmerClusterPin Hexagon IconPaths Legend LocationIcon MapIcon Microscope ObservationPin Overlay UsersGroup

Design Elements

22 higher-level, application-specific components:

AboutInfoItem Breadcrumb DesignButton Carousel DesignCheckbox Cookies Country Infobox DesignInput KeyInfoItem LastUpdatedTag NoResults DesignRadioGroup DesignSelect SimpleTag DesignSwitch DesignTag TagsGroup TestWeight ThreeColumn Typography VersionDisplay

Elements

15 utility and presentation components:

ElementButton ButtonLink Error FeatureDisabled IframeViewer Loader LocalLoader MediaEmbedItem PermissionDisabled ShowLargeText ShowShortText SizedImage UnderConstruction DisplayItem

Shared Components

Reusable composite components and hooks:

ComponentDescription
CustomTableData table built on @tanstack/react-table
FullPageLoaderFull-screen loading overlay
CustomImageEnhanced image component
LoaderInline loading spinner
PaginationPage navigation controls
SearchSearch input with debounce
ThemeSwitcherLight/dark theme toggle
useDebounceDebounce hook for values

Buttons & Inputs

ComponentDescription
DeleteButtonDestructive action button
PrimaryButtonPrimary CTA button
OldCustomInputLegacy styled input
MultiSelectMulti-value select (react-select)
TextAreaStyled textarea

Other

ComponentDescription
UmamiAnalyticsUmami analytics script injection
HeroImageHero section image component
HorizontalHorizontal panel layout

Utilities

ExportDescription
cn(...inputs)Merges class names using clsx + tailwind-merge. Use this instead of raw string concatenation to avoid Tailwind class conflicts.
getPages(totalItems, pageSize)Calculates pagination metadata (total pages, offsets).

Models

ExportDescription
LinkButtonItemTypeScript interface for link button configuration objects.

Design Tokens

The package ships a comprehensive set of CSS custom properties defined in src/styles/tokens.css. These tokens drive the Tailwind theme and can be overridden for theming.

Color System

  • Primary scale: --primary-50 through --primary-950 (11 steps)
  • Semantic colors: --background, --foreground, --card, --popover, --muted, --secondary, --accent, --destructive, --border, --input, --ring
  • Tag palette: 11 named tag colors — blue, dark-blue, light-green, dark-green, orange, light-purple, purple, dark-purple, pink, turquoise, yellow
  • Legacy colors: --primary-black, --primary-green, --primary-white, --system-error

Typography

Fonts: Montserrat (primary), Open Sans, Hanken Grotesk

ScaleSizes
Headingsh1h9 (with accent/italic variants for h1, h2)
Bodybody-12, body-14, body-15, body-16, body-18, body-20 (with medium/semibold/bold variants)
Landinglanding-title (80px, with accent italic variant)
Captioncaption (16px, tracked)

Architecture

@geowiki/design-system
├── src/
│   ├── components/
│   │   ├── ui/              # Radix UI primitives (41)
│   │   ├── Icons/           # Custom SVG icons (28)
│   │   │   └── MapIcons/    # GIS-specific icons (11)
│   │   ├── DesignElements/  # Application components (22)
│   │   ├── Elements/        # Utility components (15)
│   │   ├── Shared/          # Composite components (8) + hooks
│   │   ├── Button/          # Specialized buttons (2)
│   │   ├── Input/           # Input variants (3)
│   │   ├── Analytics/       # Analytics integration
│   │   ├── Hero/            # Hero section
│   │   └── Panel/           # Panel layouts
│   ├── lib/
│   │   ├── utils.ts         # cn(), getPages()
│   │   ├── models/          # TypeScript interfaces
│   │   └── styles/
│   │       └── tokens.css   # CSS custom properties
│   └── index.tsx            # Barrel export
├── tailwind.config.js       # Tailwind theme (importable as preset)
├── styles.css               # Entry point for CSS build
└── tsup.config.ts           # Build configuration

How it fits in the monorepo

geowiki app  →  @geowiki/ui  →  @geowiki/design-system
                (business UI)    (primitives & tokens)

@geowiki/design-system contains only standalone, dependency-free UI components. It has no knowledge of APIs, state management, or application logic. The @geowiki/ui package imports from design-system and adds business-specific behavior (API integration, store bindings, etc.).

Development

Scripts

pnpm build        # Build with tsup + Tailwind CSS
pnpm lint         # ESLint
pnpm type-check   # TypeScript validation
pnpm clean        # Remove dist, node_modules, .turbo

Build output

The build produces three artifacts in dist/:

FileFormatDescription
index.jsCommonJSNode.js / bundler import
index.mjsESMModern bundler import
index.d.tsTypeScriptType declarations
styles.cssCSSMinified Tailwind + tokens

Adding a new component

  • Create the component in the appropriate src/components/ subdirectory.
  • Export it from src/index.tsx.
  • If the component uses new design tokens, add the CSS custom properties to src/styles/tokens.css and map them in tailwind.config.js.
  • Run pnpm build to verify the build succeeds.

Tech Stack

ConcernLibrary
Component primitivesRadix UI
StylingTailwind CSS 3.3
Variant APIclass-variance-authority
Class mergingclsx + tailwind-merge
IconsCustom SVG + Lucide React + Heroicons
Data tables@tanstack/react-table
Multi-selectreact-select
Calendarreact-day-picker
CarouselEmbla Carousel
Command palettecmdk
Build tooltsup

License

MIT

FAQs

Package last updated on 15 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts