Skip to content

3lvia/designsystem / skills/elvia-design-system

elvia-design-system

Verified

Reference for UI components and patterns in Elvia's design system ("Elvis"). Covers component- and pattern-specific guidelines for sizing, color tokens for custom UI, types, ordering, labeling, accessibility attributes, CSS setup, and web-component registration. Use when building, reviewing, or fixing UI in an Elvia frontend, even if the request doesn't name Elvia or the CSS classes explicitly (e.g. "add a save button", "make this icon bigger", "add a tooltip").

FileKindSize
README.mdmarkdown726 B
SKILL.mdskill md10.4 KB
references/accordion.mdmarkdown5.9 KB
references/alert.mdmarkdown4.3 KB
references/app-bridge.mdmarkdown3.3 KB
references/autocomplete.mdmarkdown5.5 KB
references/badge.mdmarkdown2.3 KB
references/box.mdmarkdown2.0 KB
references/breadcrumb.mdmarkdown2.9 KB
references/button.mdmarkdown6.0 KB
references/card.mdmarkdown5.6 KB
references/carousel.mdmarkdown4.4 KB
references/checkbox.mdmarkdown4.7 KB
references/chip.mdmarkdown4.1 KB
references/color-tokens.mdmarkdown5.6 KB
references/content-loader.mdmarkdown2.0 KB
references/context-menu.mdmarkdown6.6 KB
references/data-formats.mdmarkdown2.1 KB
references/datepicker-range.mdmarkdown5.4 KB
references/datepicker.mdmarkdown6.0 KB
references/divider.mdmarkdown2.4 KB
references/drag-and-drop.mdmarkdown2.0 KB
references/dropdown.mdmarkdown6.7 KB
references/empty-state.mdmarkdown3.0 KB
references/file-upload.mdmarkdown2.6 KB
references/form-field.mdmarkdown2.7 KB
references/header.mdmarkdown5.8 KB
references/icon.mdmarkdown5.0 KB
references/illustrations.mdmarkdown1.4 KB
references/input.mdmarkdown2.5 KB
references/installation.mdmarkdown2.1 KB
references/link.mdmarkdown3.3 KB
references/list.mdmarkdown2.0 KB
references/modal.mdmarkdown6.1 KB
references/pagination.mdmarkdown4.0 KB
references/popover.mdmarkdown5.3 KB
references/progress-linear.mdmarkdown3.1 KB
references/radio-button.mdmarkdown2.6 KB
references/radio-filter.mdmarkdown2.8 KB
references/search-pattern.mdmarkdown2.7 KB
references/segmented-control.mdmarkdown3.9 KB
references/shadows.mdmarkdown1.3 KB
references/slider.mdmarkdown3.6 KB
references/stepper.mdmarkdown4.7 KB
references/table.mdmarkdown8.4 KB
references/tabs.mdmarkdown3.8 KB
references/tag.mdmarkdown5.0 KB
references/thumbnail.mdmarkdown1.9 KB
references/timepicker.mdmarkdown5.1 KB
references/toast.mdmarkdown3.4 KB
references/toggle.mdmarkdown2.1 KB
references/tooltip.mdmarkdown4.1 KB
references/typography.mdmarkdown3.3 KB
references/utility-classes.mdmarkdown3.9 KB
references/web-components.mdmarkdown2.1 KB

references/icon.md

View on GitHub
- [Elvis Icons](#elvis-icons)
  - [Reference](#reference)
  - [Packages](#packages)
  - [Register](#register)
  - [Use](#use)
  - [Attributes](#attributes)
    - [Name](#name)
    - [Size](#size)
    - [Color](#color)
  - [Accessibility](#accessibility)

# Elvis Icons

## Reference

https://design.elvia.io/brand/icon

`<e-icon>` is a web component.

## Packages

These packages are required for the icon registry and tree-shakeable icon assets.

```
npm install @elvia/elvis-icons @elvia/elvis-assets-icons
```

- `@elvia/elvis-icons` — registry (`addIcons`, `<e-icon>` element)
- `@elvia/elvis-assets-icons` — tree-shakeable per-icon SVG exports

<details>
<summary>Old patterns (deprecated)</summary>

`@elvia/elvis-icon` (singular) and the `elvis.js`/`e-icon--NAME` class method are deprecated — they pull in
the whole icon set instead of tree-shaking. Only touch these if the codebase already relies on them.

</details>

## Register

```typescript
import { accessControl, addCircle } from '@elvia/elvis-assets-icons';
import { addIcons } from '@elvia/elvis-icons';

addIcons({
  accessControl: { svg: accessControl.getIcon() },
  addCircle: { svg: addCircle.getIcon() },
});
```

Each icon must be registered once app-wide, not per-component/feature. Keep all registrations as one flat
object literal in the bootstrap file. `addIcons` merges by key, so re-registering the same name overwrites it
silently (no error, no runtime guard needed); before adding a new entry, search the file for the key to avoid
a duplicate line.

Referencing an unregistered icon `name` throws at render time (`Icon "X" not found...`). If an icon isn't
showing, first check it's been registered, then check it hasn't been renamed/deprecated in a newer
`@elvia/elvis-assets-icons` version. After adding a new icon, verify it renders with no console error.

## Use

```html
<e-icon name="accessControl"></e-icon>
```

For state-driven icons, bind `name` reactively rather than duplicating the element per conditional branch.

## Attributes

### Name

`name` attribute is required. It must match a key in `addIcons()`.

### Size

`size` attribute, `xxs`: 8px, `xs` 16px, `sm` 24px, `md` 32px, `lg` 40px, `xl` 48px, `xxl` 56px.

```html
<e-icon name="accessControl" size="md"></e-icon>
```

### Color

Prefer the semantic color classes over picking a color manually:

```html
<e-icon name="chat" class="e-icon--color-default"></e-icon>
<e-icon name="chat" class="e-icon--color-disabled-1"></e-icon>
<!-- or -disabled-2 -->
<e-icon name="chat" class="e-icon--color-placeholder"></e-icon>
<e-icon name="informationCircle" class="e-icon--color-info"></e-icon>
<e-icon name="checkCircle" class="e-icon--color-positive"></e-icon>
<e-icon name="warningCircle" class="e-icon--color-warning"></e-icon>
<e-icon name="removeCircle" class="e-icon--color-error"></e-icon>
```

`-positive` (green) = hover/interactive & success; `-warning`/`-error` reserved for warnings/errors.

Two ways to set a custom color when no class matches — the choice depends on whether the color is fixed or
varies at runtime:

- **Fixed, same everywhere that icon key is used** → pass it to `getIcon()` at registration time (accepts a
  theme color label or a raw string). This bakes the color into every instance of that registered icon:

```typescript
addIcons({ download: { svg: download.getIcon('positive') } });
```

- **Varies per instance or by runtime state** (e.g. different color per row, or color driven by a value only
  known at render time) → override the CSS variable on that specific icon instead, since registration only
  happens once and can't react to per-instance state:

```css
--e-color-icon-stroke-1
--e-color-icon-filled-foreground-1
--e-color-icon-filled-background-1
--e-color-brand-accent
--e-color-icon-positive
--e-color-icon-caution
--e-color-icon-warning
--e-color-icon-danger
```

Static-color icon variants stay black/white in dark theme. Don't mix filled and outlined icons in the same
group.

## Accessibility

Icon's inner `<svg>` has `aria-hidden="true"` baked in. Don't add `aria-hidden` on `<e-icon>` yourself.

Icon next to visible text → nothing extra needed:

```html
<e-icon name="accessControl"></e-icon><span>Tilgangskontroll</span>
```

Icon-only button → use the button classes (read [./button.md](./button.md)) and put `aria-label` on the
`<button>`.

```html
<button class="e-btn e-btn--icon" aria-label="Slett">
  <span class="e-btn__icon">
    <e-icon name="bin"></e-icon>
  </span>
</button>
```

Disabled → use `disabled` attribute, `aria-label` stays:

```html
<button class="e-btn e-btn--icon" disabled aria-label="Slett">
  <span class="e-btn__icon">
    <e-icon name="bin"></e-icon>
  </span>
</button>
```

Loading → `e-btn--loading`, `aria-busy="true"`, `aria-live="polite"`:

```html
<button class="e-btn e-btn--icon e-btn--loading" aria-label="Laster opp" aria-live="polite" aria-busy="true">
  <span></span>
  <span></span>
  <span></span>
</button>
```

After adding any icon-only control, run/check axe to confirm it has an accessible name.
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall