Skip to content

Best Practices

Open Frames is a powerful tool for creating interactive link previews. Below are some best practices to keep in mind when building Open Frames.

Performance

For the best UX, frames should be fast and snappy. Clients are encouraged to enforce a 5 second timeout, which is something to be aware of as a frames developer.

  • Avoid using dynamic images when possible, opting for static ones instead
  • For slow APIs like LLMs, we recommend responding with a "loading frame" that has a refresh button rather than waiting for the response.
  • Consider the physical location of the servers you're deploying to - we recommend these be in North America for the time being.

User Interface

Frames should be designed to be user-friendly and accessible. Here are some tips to keep in mind:

  • Frames are displayed in feeds which are primarily consumed on mobile devices - make sure your text is legible on small screen sizes.
  • Prefer buttons over text inputs that require thse user to do external information lookups where possible. This may require you to look up external information about a user based on their identity and given frame context for presentation as a button.

Security

When taking actions on a user's behalf via frame interactions, be sure to only use trusted data and validate the user's identity to prevent impersonation attacks.