> ## Documentation Index
> Fetch the complete documentation index at: https://base-a060aa97-eb-mini-app-ia-overhaul.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Open/Close & External Links

> Handle closing the frame and opening external URLs safely

What you’ll build

* Buttons to close the frame and open external URLs

Do it

1. Add `useClose` and wire to a button
2. Add `useOpenUrl` and wire to external links

Verify

* Close button dismisses the frame
* External links open correctly in and out of frame contexts

Deep dive

<CardGroup cols={2}>
  <Card title="useClose" icon="book-open" href="/mini-apps/technical-reference/minikit/hooks/useClose" />

  <Card title="useOpenUrl" icon="book-open" href="/mini-apps/technical-reference/minikit/hooks/useOpenUrl" />
</CardGroup>
