---
url: /reference/@cssdoc/index/interfaces/ClassUsage.md
---
# Interface: ClassUsage

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

A member usage on one element: the classes on the element, the specific `token` under inspection,
and the resolved `base` component class (when one of the tokens names a documented component).
`token` is normally a class token, but for attribute conventions (CUBE) it may be an attribute
expression like `data-variant="ghost"`. Producers for HTML, JSX, and CSS selectors all emit this
shape.

## Properties

### base?

```ts
optional base?: string;
```

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

The base component class among the tokens, if any (e.g. `.button` → `button`).

***

### elementName?

```ts
optional elementName?: string;
```

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

The host element tag name for this usage site (lowercase), when known.

***

### loc?

```ts
optional loc?: SourceSpan;
```

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

Where the token sits in the host document.

***

### token

```ts
token: string;
```

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

The specific token/expression this usage is about (a modifier candidate).

***

### tokens

```ts
tokens: string[];
```

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

Every class token on the element.
