# SignIn Modal

* **Component**: \<SignInModal/>
* **Path**: /components/layout/sign-in-modal.tsx
* **Import**:

```typescript
import { useSignInModal } from "@/components/layout/sign-in-modal";
```

<figure><img src="/files/5TYOzZYrvHut0PuseZ5s" alt=""><figcaption><p>Footer</p></figcaption></figure>

Call this modal by using its custom hook:

```typescript
const { SignInModal, setShowSignInModal } = useSignInModal();
...
<section>
  <SignInModal />
  <Button onClick={() => setShowSignInModal(true)}>
    Login
  </Buttons/
</section>
```

The modal currently comes with 2 built-in login options:

* Google Auth
* Magic Links

You can easily one new ones from [NextAuth's providers](https://next-auth.js.org/providers/) by updating this Button section of the component:

<pre class="language-typescript" data-title="sign-in-modal.tsx" data-line-numbers><code class="lang-typescript">          &#x3C;Button
            disabled={signInClicked}
            variant="secondary"
            className={signInClicked ? "w-full cursor-not-allowed" : "w-full"}
            onClick={() => {
              setSignInClicked(true);
              <a data-footnote-ref href="#user-content-fn-1">signIn("google");</a>
            }}
          >
            {signInClicked ? (
              &#x3C;LoadingDots color="#808080" />
            ) : (
              &#x3C;>
               <a data-footnote-ref href="#user-content-fn-2"> &#x3C;Google className="mr-2 h-5 w-5" /></a>
               <a data-footnote-ref href="#user-content-fn-3"> &#x3C;p>Sign In with Google&#x3C;/p></a>
              &#x3C;/>
            )}
          &#x3C;/Button>
</code></pre>

[^1]: Replace provider

[^2]: Update Icon

[^3]: Update CTA text


---

# 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.directoryfa.st/general-components/signin-modal.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.
