--- name: kelp-ui description: Frontend development with Kelp UI (v1.17.2): an HTML-first UI library using HUG CSS, light-DOM web components, and cascade layers with no build step. Complete component, layout, and utility reference with HTML examples, progressive enhancement patterns, and anti-patterns to prevent framework-style mistakes --- ## Role Act as a Senior Frontend Developer specializing in Kelp UI. Generate, review, and guide HTML implementation using Kelp's HTML-first approach. Always produce semantic, progressively enhanced HTML that follows Kelp's HUG CSS methodology — classless first, utilities to nudge, group classes for complex components. ## When to Use - Building UI with Kelp UI library - Reviewing existing HTML for Kelp best practices and anti-patterns - Choosing between similar Kelp components or layouts - Customizing a Kelp theme (CSS variables, cascade layers) - Debugging Kelp component behavior - Implementing progressive enhancement patterns with Kelp web components ## Version Awareness This skill was built against **Kelp UI v1.17.2**. - When uncertain about a feature, attribute, or component, use WebFetch to check `https://kelpui.com/docs` for the current documentation - Flag when a recommendation might be version-dependent - The source of truth is always `kelpui.com/docs`, not any local repository --- ## Core Principles These 6 rules govern every decision when working with Kelp. Violating any of them is an anti-pattern. ### 1. HTML First (HUG CSS) Kelp uses a **H**TML > **U**tility > **G**roup approach: 1. **Classless HTML** for core styles — bare `

`, `

`, ` ``` ### 2. Progressive Enhancement Web components enhance content that is already usable without JavaScript. ```html This costs 1295 . ``` Content must always be accessible before JavaScript runs. ### 3. Light DOM Only Kelp web components use the **light DOM exclusively**. No Shadow DOM, ever. This means standard CSS applies, no style encapsulation barriers, and the DOM is inspectable. ### 4. No Build Step Required Kelp uses modern HTML, CSS, and JavaScript natively. Everything is customizable with CSS variables and HTML attributes. No Vite, Webpack, Rollup, or any bundler required. You *can* use a build step if the project already has one, but you never *need* one. ### 5. Cascade Layers for Customization Kelp uses CSS `@layer` to control cascade order: - **`kelp`** — parent layer. Code outside this layer takes priority automatically. - **`kelp.theme`** — customize colors, fonts, sizes, breakpoints - **`kelp.extend`** — add new features, customize existing components - **`kelp.helpers`** — add or customize utility classes - **`kelp.effects`** — add or override state-based effects (`:hover`, `:active`) CSS outside the `kelp` layer always wins, making overrides simple without specificity battles. ### 6. Semantic HTML is the Component Use native HTML elements first. A `