Skip to content

Interface: ClassUsage

Defined in: packages/index/src/index.ts:71

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

The base component class among the tokens, if any (e.g. .buttonbutton).


elementName?

ts
optional elementName?: string;

Defined in: packages/index/src/index.ts:79

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

Where the token sits in the host document.


token

ts
token: string;

Defined in: packages/index/src/index.ts:77

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


tokens

ts
tokens: string[];

Defined in: packages/index/src/index.ts:75

Every class token on the element.

Released under the MIT License