This file provides guidance to Claude Code when working with code in this repository.
@uniweb/kit is the standard component library for Uniweb foundations. It provides React components, hooks, and utilities that foundation themes import to build websites on the Uniweb platform.
This package ships raw source files — there is no bundler or build step. The exports field in package.json points directly to ./src/index.js. Consumers (Uniweb foundations) bundle kit code themselves via Vite.
src/index.js— Single entry point; re-exports everythingsrc/components/— Unstyled primitive components (Image, Link, Media, Icon, Text, etc.)src/styled/— Pre-styled Tailwind-based components (Section, Visual, Prose, Article, etc.)src/hooks/— React hooks (useWebsite, useRouting, useTheme, useInView, etc.)src/utils/— Utilities (cnfor class merging,detectMediaType,parseIconRef, etc.)src/search/— Client-side search (Fuse.js-based)src/theme-tokens.css— CSS custom properties for theming (exported separately)
Each component lives in its own folder with an index.js barrel file:
src/components/Image/
Image.jsx # Implementation
index.js # Re-export
@uniweb/core— Runtime core (published separately, referenced aslatest)clsx+tailwind-merge— Class name merging (cn()utility)fuse.js— Client-side searchshiki— Syntax highlighting- React 18/19 as peer dependency
- Bump version in
package.json - Commit and push to
main - Run
npm publish --access public
No build step is needed before publishing.