# Vue: [plugin:vite:vue] Duplicate attribute. / [vue/no-duplicate-attributes] Duplicate attribute 'class'

**Code:** `Duplicate attribute (Vue template)` · **Category:** Vue · **Seen on:** Vue

The same attribute appears twice on an element in a template.

## Meaning

Merge them: for `class`/`style` use a single binding or `:class="['a', b]"`; `class="a" :class="b"` is allowed (static + bound), but two static `class` attributes are not. Remove duplicates of props and event listeners.

## Common causes

- Two static `class` or `id` attributes
- Duplicate prop pass-through
- Copy-paste error
- Conflicting v-bind object with explicit attr
- Lint rule flagging duplicates

## Quick fix

1. Combine into one attribute
2. Use `:class="[...]"` arrays
3. Remove the duplicate

## Detailed fix by platform

### Vue

1. `<div class="card" :class="{ active: isActive }">`

## How to diagnose

1. **Attribute** — Duplicate?
2. **Merge** — Array binding?
3. **Props** — Repeated?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/vue/vue-error-duplicate-attribute)
