---
url: /reference/@cssdoc/providers/functions/hoverForClass.md
---
# Function: hoverForClass()

```ts
function hoverForClass(
   base, 
   token, 
   index, 
   detail?, 
   sections?, 
   sectionOrder?
): Hover | undefined;
```

Defined in: [packages/providers/src/index.ts:172](https://github.com/thedannywahl/cssdoc/blob/main/packages/providers/src/index.ts#L172)

Hover for a class token: the modifier's docs, else the component's card (at the given detail).

## Parameters

### base

`string`

### token

`string`

### index

[`CssDocIndex`](../../index/classes/CssDocIndex.md)

### detail?

[`HoverDetail`](../../cssdoc/type-aliases/HoverDetail.md) = `"full"`

### sections?

[`HoverSections`](../../cssdoc/type-aliases/HoverSections.md)

### sectionOrder?

[`HoverSectionOrder`](../../cssdoc/type-aliases/HoverSectionOrder.md)

## Returns

[`Hover`](../../cssdoc/interfaces/Hover.md) | `undefined`
