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/tabs.md

View on GitHub
- [Tabs (`<elvia-tabs>`)](#tabs-elvia-tabs)
  - [Reference](#reference)
  - [Installation](#installation)
  - [Use](#use)
  - [Attributes](#attributes)
    - [items](#items)
    - [value](#value)
    - [valueOnChange](#valueonchange)
    - [ariaLabel](#arialabel)
    - [isInverted](#isinverted)
    - [hasManualActivation](#hasmanualactivation)
    - [tabIdPrefix](#tabidprefix)
  - [Guidelines](#guidelines)
  - [Accessibility](#accessibility)
  - [Examples](#examples)

# Tabs (`<elvia-tabs>`)

## Reference

https://design.elvia.io/components/tabs

## Installation

This web component requires the `@elvia/elvis-tabs` package. If it is not already installed, follow the
[Installation reference](./installation.md).

## Use

`<elvia-tabs>` renders the tablist and tracks its selection. The caller listens to `valueOnChange` and shows
the matching panel.

For updates to `value` or `items` after initialization, follow the shared
[attribute and property guidance](./web-components.md#attributes-and-properties).

## Attributes

### items

Required. An array of strings, one per tab. Order sets the tab order. See
[Arrays and objects](./web-components.md#arrays-and-objects) for how to pass the value.

### value

The index of the selected tab. Defaults to `0`.

### valueOnChange

Fires when a tab is activated, with its index as the value. Bind `value` only to control the selection
externally. See [Events](./web-components.md#events) for the event shape and naming.

### ariaLabel

Labels the tablist for assistive technology. Describe what the tabs are choosing between (e.g. the section of
the page they control), not "Tabs".

### isInverted

A boolean. Set it when the tabs sit on a dark/inverted background.

### hasManualActivation

A boolean. Defaults to `false` (automatic activation): arrow keys immediately move focus and select the tab.
Set it to `true` for manual activation: arrow keys only move focus, and the user must press Enter or Space to
select. Prefer manual activation when selecting a tab is expensive, e.g. it triggers a network request.

### tabIdPrefix

A string. Disambiguates the generated tab and tabpanel ids when more than one `<elvia-tabs>` instance exists
on the same page.

## Guidelines

Use tabs to divide content into sections at the same level of the hierarchy that are related. Exactly one tab
must be selected. Use 2–6 tabs with short, descriptive, unique labels of no more than two words. Scroll
buttons appear automatically when tabs overflow and are not configurable.

## Accessibility

- The component sets the tab roles, `aria-selected`, and `aria-controls`.
- Tab ids follow `ewc-tabs-{tabIdPrefix-}{index}`; the matching panel id is
  `ewc-tabpanel-{tabIdPrefix-}{index}` (0-based). The caller must render a panel for every tab with
  `role="tabpanel"`, that id, and `aria-labelledby` pointing at the corresponding tab id, so every
  `aria-controls` resolves. Use `tabIdPrefix` to keep ids unique when multiple `<elvia-tabs>` instances exist
  on the same page.
- Always set `ariaLabel`.

## Examples

**Input:** "A settings page with sections for profile, security, and notifications, one visible at a time."

**Output:**

```html
<elvia-tabs items='["Profil","Sikkerhet","Varsler"]' value="0" ariaLabel="Kontoinnstillinger"></elvia-tabs>

<section id="ewc-tabpanel-0" aria-labelledby="ewc-tabs-0" role="tabpanel">Profil</section>
<section id="ewc-tabpanel-1" aria-labelledby="ewc-tabs-1" role="tabpanel" hidden>Sikkerhet</section>
<section id="ewc-tabpanel-2" aria-labelledby="ewc-tabs-2" role="tabpanel" hidden>Varsler</section>

<script>
  const tabs = document.querySelector('elvia-tabs');
  const panels = document.querySelectorAll('[role="tabpanel"]');

  tabs.addEventListener('valueOnChange', (event) => {
    panels.forEach((panel, index) => {
      panel.hidden = index !== event.detail.value;
    });
  });
</script>
```
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