edible-web-components

Interactive web components for EdibleCSS.

Just add HTML, get styled components. No classes. No configuration.

About

EdibleCSS styles native HTML5 elements automatically. But some UI patterns genuinely require JavaScript — a searchable dropdown, a multi-tag input, a toast notification. Native HTML has no equivalent elements for these.

edible-web-components fills that gap with custom elements that look and feel like native HTML5 tags, inherit EdibleCSS design tokens automatically, and activate with a single <script> tag.

Key Features

Installation

CDN

Add both EdibleCSS and the components to your <head>:

<link rel="stylesheet"
  href="https://unpkg.com/@svmukhin/edible-css@latest/dist/edible.css" />

<script
  src="https://unpkg.com/@svmukhin/edible-web-components@latest/dist/edible-wc.js"
  defer></script>

All components are now available as HTML tags. No JavaScript required in your own code.

Always use defer when loading in <head>. Without it the script runs before child elements (like <option> inside <edible-combobox>) are parsed. Alternatively, place the script at the end of <body>.

npm

npm install @svmukhin/edible-web-components
import '@svmukhin/edible-web-components';

Components

Form components

Component Description Examples
<edible-combobox> Searchable dropdown replacing <select> View examples
<edible-tags-input> Multi-value pill tag input View examples
<edible-file-drop> Drag-and-drop file upload zone View examples

Feedback components

Component Description Examples
<edible-toast> Programmatic auto-dismissing notifications View examples
<edible-tooltip> Styled tooltip replacing the title attribute View examples
<edible-badge> Pill-style status badge View examples

Layout components

Component Description Examples
<edible-tabs> Accessible tab panel with keyboard navigation View examples
<edible-nav-dropdown> Grouped navigation item with hover and keyboard dropdown View examples

Live demos

edible-combobox

edible-tags-input

edible-badge

New   Active   Pending   Failed

edible-tooltip

Hover or focus this button:

edible-toast

edible-tabs

This is the overview panel. Click another tab or press Arrow Left / Arrow Right to navigate.

This is the details panel. Full keyboard and ARIA support is built in.

This is the history panel. No configuration required.

edible-nav-dropdown

Design Tokens

All components inherit EdibleCSS custom properties. Override at :root to affect both EdibleCSS and the components at once — no component-specific variables needed.

:root {
  --accent: #7c3aed; /* purple — applied everywhere automatically */
}