# slot-name-casing

Rule `vue/slot-name-casing`. Enforce specific casing for slot names

- Source: vue
- Technologies: Vue
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1852 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/slot-name-casing` | no | no | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/slot-name-casing.html) |
| Biome | `nursery/useVueSlotNameCasing` | no | no | group nursery, since 2.6.5 | [docs](https://biomejs.dev/linter/rules/use-vue-slot-name-casing/) |

## Code examples

### Incorrect: the rule reports this

```vue
  <slot name="foo-bar" />
  <slot name="foo_bar" />
  <slot name="foo:bar" />
</template>
```

```vue
  <slot name="fooBar" />
  <slot name="foo_bar" />
  <slot name="foo:bar" />
</template>
```

```vue
  <slot name="foo-bar" />
  <slot name="fooBar" />
  <slot name="foo_bar" />
  <slot name="foo:bar" />
</template>
```

### Correct: the rule accepts this

```vue
<slot name="foo" />
<slot name="fooBar" />
```

```vue
<slot name="foo" />
<slot name="foo-bar" />
```

```vue
<slot name="foo" />
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import vue from "eslint-plugin-vue";

export default [
  {
    plugins: { vue },
    rules: {
      "vue/slot-name-casing": "error",
    },
  },
];
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "useVueSlotNameCasing": "error"
      }
    }
  }
}
```

## Related rules

- [vue/require-typed-object-prop](https://lintradar.dev/rules/vue/require-typed-object-prop.md): Enforce adding type declarations to object props
- [vue/v-for-delimiter-style](https://lintradar.dev/rules/vue/v-for-delimiter-style.md): Enforce `v-for` directive's delimiter style
- [vue/require-macro-variable-name](https://lintradar.dev/rules/vue/require-macro-variable-name.md): Require a certain macro variable name
- [vue/v-on-handler-style](https://lintradar.dev/rules/vue/v-on-handler-style.md): Enforce writing style for handlers in `v-on` directives
- [vue/require-explicit-slots](https://lintradar.dev/rules/vue/require-explicit-slots.md): Require slots to be explicitly defined
- [vue/require-emit-validator](https://lintradar.dev/rules/vue/require-emit-validator.md): Require type definitions in emits

---

Web page: https://lintradar.dev/rules/vue/slot-name-casing. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
