# Toggle Modules

Toggle contracts have authority to switch the `hat.active` status of a hat, such as from `active` to `inactive`. When a hat is inactive, it does not have any wearers (i.e., the balance of its previous wearers' is changed to 0).

Any address can serve as a hat's toggle. As with eligibility modules, Hats Protocol supports two categories of toggle modules:

1. **Mechanistic toggles** are logic contracts that implement the [`IHatsToggle` interface](https://docs.hatsprotocol.xyz/for-developers/v1-protocol-spec/interfaces/ihatstoggle.sol), which enables the hats contract to *pull* a hat's active status by calling `checkToggle` from within the `Hats.balanceOf` function. Mechanistic toggle enable instantaneous deactivation (or reactivation) based on pre-defined logic, such as timestamps ("this hat expires at the end of the year").
2. **Humanistic toggles** are either EOAs or governance contracts. To deactivate (or reactivate) a hat, humanistic toggles must *push* updates to the Hats contract by calling `Hats.toggleHatStatus`.

Unlike admins — and like [eligibility modules](https://docs.hatsprotocol.xyz/for-developers/hats-protocol-for-developers/eligibility-modules), toggle modules are explicitly set as addresses, not Hats.

Toggle modules offer a large design space for developers to extend and customize organizational infrastructure. See [Building Hats Modules](https://docs.hatsprotocol.xyz/for-developers/hats-modules/building-hats-modules) for more information.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hatsprotocol.xyz/for-developers/hats-protocol-for-developers/toggle-modules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
