Home > @css-hooks/core > Hook
Hook type
Represents a hook registered with createHooks.
Signature:
export type Hook = `${string}&${string}` | `@${"media" | "container" | "supports"} ${string}` | `@scope (${string})` | "@starting-style" | `flag:${string}`;
Remarks
Four forms are supported:
- A selector hook, where
&is used as a placeholder for the element to which the condition applies. The&character must appear somewhere. 2. An at-rule hook beginning with@media,@container,@supports, or@scope, followed by a space.@scoperequires an explicit scope root. 3. The@starting-styleat-rule hook with no additional parameters. 4. A named boolean flag hook beginning withflag:.