Semantic UI CDN

Quick Start

Semantic UI provides a consolidated endpoint to import components, CSS, icons, and fonts in a single tag.

Use components to load UI elements. Tokens, Lucide, and Lato included automatically.

<script src="https://cdn.semantic-ui.com/load" components></script>

<ui-button primary>
  <ui-icon home></ui-icon>
  Home
</ui-button>

Use authoring to build custom components. Tokens auto-injected.

<script src="https://cdn.semantic-ui.com/load" authoring></script>

<script type="module">
  import { defineComponent } from '@semantic-ui/component';

  defineComponent({
    tagName: 'my-counter',
    template: 'Count: {count}',
    defaultState: { count: 0 },
    onCreated({ state }) {
      setInterval(() => state.count.increment(), 1000);
    },
  });
</script>

<my-counter></my-counter>

Use tailwind to style components with utility classes — even inside Shadow DOM.

<script src="https://cdn.semantic-ui.com/load" authoring tailwind></script>

<script type="module">
  import { defineComponent } from '@semantic-ui/component';
  import { TailwindPlugin } from '@semantic-ui/tailwind';

  let definition = {
    tagName: 'my-card',
    template: '<div class="p-4 rounded-lg shadow-md">{>slot}</div>',
  };
  definition = await TailwindPlugin(definition);
  defineComponent(definition);
</script>

<my-card>Hello</my-card>

Use reactivity for signals with automatic dependency tracking and mutation helpers.

<script src="https://cdn.semantic-ui.com/load" reactivity></script>
<script type="module">
  import { Signal } from '@semantic-ui/reactivity';

  const items = new Signal(['a', 'b']);
  const count = items.derive(arr => arr.length);

  items.push('c');       // no .get()/.set() — just .push()
  count.get();          // 3 — auto-updated
</script>

Use query for DOM selection. $$ pierces Shadow DOM. Events return promises.

<script src="https://cdn.semantic-ui.com/load" query></script>
<script type="module">
  import { $, $$ } from '@semantic-ui/query';

  $('ui-dropdown .item').length;    // 0 — blocked by Shadow DOM
  $$('ui-dropdown .item').length;   // 5 — pierces through

  await $('ui-modal').onNext('hide'); // promise-based events
</script>

Use utils for iteration, cloning, search, and 200+ functions you'd write from scratch.

<script src="https://cdn.semantic-ui.com/load" utils></script>
<script type="module">
  import { each, clone, weightedObjectSearch } from '@semantic-ui/utils';

  each(new Map([['a', 1]]), (val, key) => {});  // handles Array, Object, Map, Set, iterables
  clone(obj, { preserveDOM: true }); // handles DOM, Map, Set, Date, classes
  weightedObjectSearch('sema', items, { fields: { name: 3, tags: 1 } });
</script>

Customization

Components

Use components to cherry-pick by name.

<script src="https://cdn.semantic-ui.com/load"
  components="button,input,modal,tooltip"
></script>

Component Bundles

Use a bundle name to load a curated set. Bare components defaults to standard.

<script src="https://cdn.semantic-ui.com/load"
  components="extended"
></script>

Bundles: standard, extended, full. What's in each bundle →

Packages

Use bare attributes to load standalone packages. No CSS auto-injection. Combine freely.

<!-- Signals + utilities, no UI -->
<script src="https://cdn.semantic-ui.com/load"
  reactivity utils
></script>

Available: reactivity, query, utils, templating, renderer, compiler, specs, tailwind.

Versions

Use version to pin to a specific release. Default is latest.

<script src="https://cdn.semantic-ui.com/load"
  components
  version="0.18.0"
></script>

Values: semver ("0.18.0"), "canary" (latest push to main), "latest" (default).

CSS

Use css to add page-level styles — reset, typography, scrollbars. Tokens are injected automatically with components. Suppress with css="none".

<!-- Add page styles (reset + base) -->
<script src="https://cdn.semantic-ui.com/load"
  components="button,input"
  css
></script>

Values: bare (page styles), "none" (suppress all CSS). Tokens are custom properties — zero side effects, safe on any page.

Fonts

Use fonts to override the default. Lato loads automatically with components. Suppress with fonts="none".

<!-- Suppress default font -->
<script src="https://cdn.semantic-ui.com/load"
  components="button"
  fonts="none"
></script>

Available: lato (default). More fonts planned.

Icons

Use icons to choose a different set. Lucide loads automatically with components. Suppress with icons="none".

<!-- Use Phosphor instead of Lucide -->
<script src="https://cdn.semantic-ui.com/load"
  components="button,icon"
  icons="phosphor"
></script>

Available: lucide (default), phosphor, tabler, material-symbols, heroicons, brands. Combine: icons="lucide,brands".


Advanced

Direct ESM

ESM Imports are available for use with custom build tools or custom import maps.

<link rel="stylesheet" href="https://cdn.semantic-ui.com/css">
<link rel="stylesheet" href="https://cdn.semantic-ui.com/icons/lucide">
<link rel="stylesheet" href="https://cdn.semantic-ui.com/fonts/lato">
<script type="module" src="https://cdn.semantic-ui.com/core@canary"></script>

Embedding

Use none for css icons or fonts to suppress auto-injection when embedding into existing pages.

<script src="https://cdn.semantic-ui.com/load"
  components="button"
  css="none" icons="none" fonts="none"
></script>

Custom Import Maps

Use your own import map to mix versions or add packages the loader doesn't cover.

<script type="importmap">
{
  "imports": {
    "@semantic-ui/core": "https://cdn.semantic-ui.com/core@0.18.0",
    "@semantic-ui/reactivity": "https://cdn.semantic-ui.com/reactivity@0.17.0",
    "@semantic-ui/utils": "https://cdn.semantic-ui.com/utils@0.18.0",
    "zod": "https://esm.sh/zod@3.24"
  }
}
</script>

<script type="module">
  import { Signal } from '@semantic-ui/reactivity';
  import { z } from 'zod';
</script>

Component Bundles

Use bundles to load curated component sets. Sourced from component specs at build time.

BundleDescription
standardDefault - General-purpose primitives (~40 at 1.0) — button, input, modal, card, table, menu, etc.
extendedStandard + specialized components — data table, color picker, calendar, etc.
fullEvery component in the framework.

Reference

JS Loading

AttributeBehavior
components="button,input"Cherry-pick components. Auto-injects tokens, Lato, Lucide.
components="standard"Named preset. Same auto-injection.
authoringLoads @semantic-ui/component. Tokens auto-injected.
reactivityLoads @semantic-ui/reactivity. No auto-injection.
queryLoads @semantic-ui/query. No auto-injection.
utilsLoads @semantic-ui/utils. No auto-injection.
templatingLoads @semantic-ui/templating. No auto-injection.
rendererLoads @semantic-ui/renderer. No auto-injection.
compilerLoads @semantic-ui/compiler. No auto-injection.
specsLoads @semantic-ui/specs. No auto-injection.
tailwindLoads @semantic-ui/tailwind. No auto-injection.
(none)Import map only — resolution without loading.

CSS & Assets

AttributeBehavior
cssFull page styles: tokens + reset + base.
css="none"Suppress all CSS auto-injection.
iconsLucide (same as default with components).
icons="phosphor"Override default icon set.
icons="lucide,brands"Multiple sets.
icons="none"Suppress icon auto-injection.
fontsLato (same as default with components).
fonts="none"Suppress font auto-injection.

Framework

EndpointDescriptionType
/loadOne-tag setup — components, CSS, icons, fontsclassic script
/cssDesign tokens + reset + base page stylestext/css
/css/{layer}Individual layers: tokens, reset, basetext/css
/coreComponent framework — all primitives, components, behaviorsmodule

Packages

Standalone. Usable without the component framework.

EndpointnpmDescription
/component@semantic-ui/componentdefineComponent, templates, lifecycle
/reactivity@semantic-ui/reactivitySignals, Reactions, dependency tracking
/query@semantic-ui/queryDOM selection, events, Shadow DOM piercing
/utils@semantic-ui/utilsArrays, objects, strings, debounce, clone, equality
/templating@semantic-ui/templatingTemplate compiler, expression evaluator
/renderer@semantic-ui/rendererLit-based reactive renderer
/compiler@semantic-ui/compilerTemplate-to-AST compiler
/specs@semantic-ui/specsComponent specifications and metadata
/tailwind@semantic-ui/tailwindTailwind v4 runtime for Shadow DOM

Assets

EndpointDefaultAvailable sets
/iconsLucidelucide, phosphor, tabler, material-symbols, heroicons, brands
/fontsLatolato

Vendor

Third-party deps. Pinned to exact versions. No @latest / @canary.

PackageVersion
/vendor/lit3.3.2
/vendor/lit-html3.3.2
/vendor/lit-element4.2.1
/vendor/@lit/reactive-element2.1.1
/vendor/tailwindcss4.1.12

Versioning

PatternBehaviorCache
/core@0.18.0Exact version — served directlyImmutable (1 year)
/core@canaryOverwritten on every main merge60 seconds
/core@latest302 → current stable5 min
/coreSame as @latest5 min

Pin to an exact version for production. Vendor packages are always pinned.