CSS Hooks
Documentation
Source on GitHub

Home > @css-hooks/core > CreateHooksFn

CreateHooksFn type

Represents the function used to declare hooks and related configuration.

Signature:

typescript
export type CreateHooksFn<CSSProperties> = <const ConfiguredHooks extends Hook[]>(...hooks: ConfiguredHooks) => Hooks<ConfiguredHooks, CSSProperties>;

References: Hook, Hooks

Remarks

When the declared hooks are known to include one or more %<name> values, the return type also exposes enable and disable functions restricted to those flags.