MCPcopy Index your code
hub / github.com/cferdinandi/kelp

github.com/cferdinandi/kelp @v1.17.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.17.2 ↗ · + Follow
224 symbols 485 edges 45 files 85 documented · 38%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Kelp

A UI library for people who love HTML, powered by modern CSS and Web Components.

Read the Docs →

Quick Start

Kelp works without any build step.

The CDN is the fastest and simplest way to get started.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kelpui@1/css/kelp.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/kelpui@1/js/kelp.js"></script>

Kelp uses semantic versioning. You can grab a major, minor, or patch version from the CDN with the @1.2.3 syntax. You can find all available versions under releases.

Source Code

Kelp's compiled CSS and JS files are located in the /css and /js directories. The source files are located in the /src directory.

Kelp uses ESBuild to combine all of the modular files into a single file for performance reasons.

To run your own build, comment out the imports you don't want in the src/css and/or /src/js files, then run npm run build.

npm install
npm run build

Kelp is unminified by default. In performance testing, minification had almost no performance impact when gzip or brotli are used.

If you'd prefer to minify anyways, you can add minify: true to the esbuild.mjs build function.

await esbuild.build({
    entryPoints: [
        'src/js/*.js',
        'src/css/*.css',
    ],
    minify: true,
    // ...
});

Demo

The included index.html file is a kitchen sink demo of Kelp. It includes every feature and component in one giant file.

The web component use ES imports, and require a local server to run.

Use your preferred server, or use the included http-server by running npm run dev.

npm install
npm run dev

Tests

Kelp uses...

  • Playwright for tests
  • Biome for linting and formatting
  • Typescript with JSDoc for more friendly (and fully optional) type checking
  • A continuous integration process on deploys and PRs
# Run tests
npm run test

# Run linter
npm run lint

The test suite uses port 8080. If that's already in use, you can set a different PORT when running your test, like this...

# Run tests on port 8082
PORT=8082 npm run test

License

Free to use under the Kelp Commons License. There are also commercial license options available.

Extension points exported contracts — how you extend this code

KelpWCInstance (Interface)
(no doc)
types.d.ts
Matchers (Interface)
(no doc)
types.d.ts

Core symbols most depended-on inside this repo

emit
called by 32
js/kelp.js
emit
called by 32
src/js/utilities/emit.js
debug
called by 20
js/kelp.js
debug
called by 20
src/js/utilities/debug.js
toggle
called by 16
js/kelp.js
getFromPath
called by 15
js/kelp.js
toHaveError
called by 12
types.d.ts
ready
called by 12
js/kelp.js

Shape

Method 145
Function 43
Class 34
Interface 2

Languages

TypeScript100%

Modules by API surface

js/kelp.js72 symbols
src/js/components/invoker.polyfill.js23 symbols
src/js/components/form-validate.js15 symbols
src/js/components/form-ajax.js14 symbols
src/js/components/until-selected.js12 symbols
src/js/components/disclosure.js12 symbols
src/js/components/tabs.js10 symbols
src/js/components/toggle-pw.js9 symbols
src/js/components/subnav.js9 symbols
src/js/components/select-all.js9 symbols
src/js/components/toc.js7 symbols
src/js/components/html-ajax.js7 symbols

For agents

$ claude mcp add kelp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact