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

View on GitHub
- [Button (`e-btn`)](#button-e-btn)
  - [Reference](#reference)
  - [Installation](#installation)
  - [Use](#use)
  - [Props](#props)
    - [Type](#type)
    - [Size](#size)
  - [Guidelines](#guidelines)
    - [Order](#order)
    - [Label](#label)
    - [Icons on buttons](#icons-on-buttons)
  - [Accessibility](#accessibility)
  - [Classes](#classes)
  - [Examples](#examples)

# Button (`e-btn`)

## Reference

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

Button is a CSS-based component, consisting of only CSS classes.

## Installation

This CSS-based component requires the `@elvia/elvis` package. If it is not already installed, follow the
[Elvis installation reference](./installation.md) before using the button classes.

## Use

```html
<button class="e-btn">
  <span class="e-btn__title">Lagre</span>
</button>

<!-- Primary + secondary -->
<div>
  <button class="e-btn e-btn--secondary">
    <span class="e-btn__title">Avbryt</span>
  </button>
  <button type="submit" class="e-btn e-btn--primary">
    <span class="e-btn__title">Lagre</span>
  </button>
</div>

<!-- Icon button in a table row -->
<button class="e-btn e-btn--icon" aria-label="Slett tilgang for Ola">
  <span class="e-btn__icon">
    <e-icon name="bin"></e-icon>
  </span>
</button>

<!-- Danger action -->
<button class="e-btn e-btn--danger">
  <span class="e-btn__title">Fjern tilgang</span>
</button>

<!-- Modifier combined conditionally, e.g. a loading state -->
<button class="e-btn e-btn--primary e-btn--loading" aria-live="polite" aria-busy="true">
  <span></span>
  <span></span>
  <span></span>
</button>

<!-- Icon button with circled icon. Notice the Icon name -->
<button class="e-btn e-btn--icon e-btn--circled" aria-label="Les mer om Elvia">
  <span class="e-btn__icon">
    <e-icon name="informationCircle"> </e-icon>
    <e-icon name="informationCircleFilledColor"> </e-icon>
  </span>
</button>
```

## Props

### Type

One type per button, based on the action's importance. Primary, secondary, tertiary, danger, and icon are
mutually exclusive.

- **Primary** (`e-btn--primary`): the action you want the user to take. Example: save, send, submit, register.
  Only one primary button per view/section.
- **Secondary** (`e-btn--secondary`): the alternative to primary. Example: cancel, decline, go back. Pairs
  with primary or stands alone.
- **Tertiary** (`e-btn--tertiary`): minor/optional actions. Example: download, edit. Icons are encouraged for
  tertiary button, they help signal it's clickable.
- **Danger** (`e-btn--danger`): destructive actions. Confirm with a dialog before the action fires.
- **Icon** (`e-btn--icon`): simple actions grouped together (close, edit, delete in a table row). Requires
  `aria-label`; add a `<elvia-tooltip>` if the icon alone isn't obvious.

### Size

- **Small** `e-btn--sm`
- **Medium** `e-btn` (default).
- **Large** `e-btn--lg`

Size combines with type (e.g. `e-btn--primary e-btn--sm`).

- Match size to priority/attention, and to whatever is in that UI region (don't put a large button next to
  small form controls).

Do NOT resize buttons with other classes or custom CSS. Use only the button size modifiers.

Use `e-w-100` to make a button fill its container width.

## Guidelines

### Order

- When a primary and secondary button are together, primary goes on the **right**, secondary on the **left**.
  Don't flip it for visual balance.

### Label

- The label should be a verb. Three words max. If a longer explanation is needed, put it in surrounding copy.
- Always wrap a button label in an element with the `e-btn__title` class.

### Icons on buttons

- Only add an icon when it clarifies something the label alone doesn't.
  - **Exception for tertiary buttons**: icon + text is preferred even without clarifying value, since it helps
    signal that the button is clickable.
- Icon can sit left or right of the text.
- Icon-only buttons are always `e-btn--icon` (or `e-btn--icon e-btn--circled` when used standalone, e.g. a
  floating circular action, circled buttons have a different hover effect) — never a text button with the
  label visually hidden.

## Accessibility

- Icon-only buttons must have an `aria-label` on the `<button>`.
- Do not add `aria-hidden="true"` to `<e-icon>`; its inner SVG already has it.
- A tooltip supplements the accessible name; it does not replace `aria-label`.

Links with `e-btn` styling do not support a disabled state. The `e-btn` disabled styles do not apply to `<a>`
elements with a `disabled` attribute. If an action can be disabled, use a `<button>` instead of a link.

## Classes

Classes use BEM.

Base: `e-btn`

**Elements**

- `e-btn__icon`
- `e-btn__title`

**Modifiers**

- `e-btn--circled`
- `e-btn--danger`
- `e-btn--icon`
- `e-btn--inverted`
- `e-btn--lg`
- `e-btn--loading`
- `e-btn--primary`
- `e-btn--secondary`
- `e-btn--sm`
- `e-btn--tertiary`

**Pseudos**

- `e-btn---active`
- `e-btn---disabled`
- `e-btn---focus`
- `e-btn---hover`
- `e-btn---selected`

## Examples

**Input:** Add a form footer with a way to cancel and a way to save the changes.

**Output:**

```html
<div>
  <button class="e-btn e-btn--secondary">
    <span class="e-btn__title">Avbryt</span>
  </button>
  <button type="submit" class="e-btn e-btn--primary">
    <span class="e-btn__title">Lagre</span>
  </button>
</div>
```

**Input:** "There's a table of access grants, each row needs a way to remove that person's access."

**Output:**

```html
<button class="e-btn e-btn--icon" aria-label="Fjern tilgang for Kari">
  <span class="e-btn__icon">
    <e-icon name="bin"></e-icon>
  </span>
</button>
```

**Input:** "We need a button to delete a customer's saved payment method."

**Output:**

```html
<button class="e-btn e-btn--danger">
  <span class="e-btn__title">Slett betalingsmetode</span>
</button>
```

```html
<!-- shown after the button above is clicked, before the delete actually fires -->
<div>
  <p>Vil du slette betalingsmetoden?</p>
  <button class="e-btn e-btn--secondary">
    <span class="e-btn__title">Avbryt</span>
  </button>
  <button class="e-btn e-btn--danger">
    <span class="e-btn__title">Slett</span>
  </button>
</div>
```
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