emotion

Defined in: emotion.ts:30

Shared sink for Emotion compat modules on one registry.

Property Type Description Defined in
sink? StyleSink Notified when a compat module registers. Shared across createEmotion calls on the same registry. emotion.ts:32

Defined in: emotion.ts:56

Emotion-shaped authoring API bound to one Distillery registry.

css(strings, ...values): EmotionCss;
		

Defined in: emotion.ts:58

Authors styles and returns a handle that can be used directly or passed to cx.

Parameter Type
strings TemplateStringsArray
...values readonly unknown[]

EmotionCss

cx(...args): string;
		

Defined in: emotion.ts:60

Combines handles, conditional classes, and plain strings into a space-separated string.

Parameter Type
...args readonly ClassNameArg[]

string

globalModules(): readonly StylesModule<StylesObject>[];
		

Defined in: emotion.ts:69

Returns the underlying modules backing injectGlobal calls.

readonly StylesModule<StylesObject>[]

injectGlobal(strings, ...values): void;
		

Defined in: emotion.ts:62

Defines styles that apply globally (e.g. body, html).

Parameter Type
strings TemplateStringsArray
...values readonly unknown[]

void

stylesheet(): string;
		

Defined in: emotion.ts:67

Emits the full CSS for all generated emotion styles.

string


Defined in: emotion.ts:36

Style handle that stringifies to its readable class name.

Property Modifier Type Description Inherited from Defined in
declarations readonly Declarations CSS properties for this handle. StyleHandle.declarations styles/types.ts:117
key readonly string Full path joined by dots. StyleHandle.key styles/types.ts:113
kind readonly "handle" Discriminant for StyleEntry. StyleHandle.kind styles/types.ts:107
localName readonly string Leaf key if at root, or composed path for nested handles. StyleHandle.localName styles/types.ts:111
moduleName readonly string The registered module name this handle belongs to. StyleHandle.moduleName styles/types.ts:109
readableName readonly string Predictable name used for output CSS classes. StyleHandle.readableName styles/types.ts:115
variant readonly boolean true when produced inside variants(...). Skipped by StylesCollector.use. StyleHandle.variant styles/types.ts:119
toPrimitive: string;
		

Defined in: emotion.ts:40

Template interpolation; same as EmotionCss.toString.

Parameter Type
hint string

string

resolveClassName(context): string;
		

Defined in: styles/types.ts:121

Produces the final class name via the provided resolver context.

Parameter Type Description
context { resolveClassName: (...handles) => string; } -
context.resolveClassName (...handles) => string Joins one or more handles into a class-name string.

string

StyleHandle.resolveClassName

toString(): string;
		

Defined in: emotion.ts:38

Stringifies to the readable class name.

string

type ClassNameArg =
  | string
  | number
  | false
  | null
  | undefined
  | EmotionCss
  | StyleHandle
  | ClassNameArg[]
  | {
[className: string]: boolean;
};
		

Defined in: emotion.ts:44

One cx(...) argument: a class, handle, list, or truthy map.

function createEmotion<TTokens>(distillery, options?): Emotion;
		

Defined in: emotion.ts:114

@emotion/css-shaped API over a distillery.

String(css\...`)is the readable class name and does not collect. Passing the wrapper throughresolveClassName` collects and compacts like a native handle.

Type Parameter
TTokens
Parameter Type Description
distillery Distillery<TTokens> Bound distillery that owns the underlying registry.
options CreateEmotionOptions Optional sink for DOM injection.

Emotion

Re-exports createDomSink


Re-exports CreateDomSinkOptions


Re-exports DocumentLike


Re-exports StyleElementLike


Re-exports StyleParentLike


Re-exports StyleSink