gifs.so mascot, a lime animation frame winkinggifs.so
  • The GIF journal
  • Sponsor the stash
U
All guides
September 5, 2026·2 min read·By GIFs.so

Build a React GIF picker with predictable search state

Structure query state, pagination, cancellation, selection, and keyboard behavior before styling a GIF grid.

APIsEngineering

A React GIF picker becomes reliable when search state has one owner. Treat a query and category as the identity of a search, with loaded pages, loading state, and errors attached to that identity.

Fetch through an authenticated server route when the provider uses a secret API key. React code running in the browser cannot keep a shared credential private.

Model the transitions first

A fresh query should clear the previous pagination cursor and start a new result set. Loading another page should retain existing results. An error on page two should leave page one usable. Closing the picker should cancel pending work where possible.

Use a request sequence or query-keyed data library to prevent a slow response for happy from overwriting the newer results for happy dance. Debouncing reduces requests but does not, by itself, prevent this race.

Keep selection separate from search. Clicking a result should select it or open its preview according to the UI contract. Posting to the conversation should remain an explicit action, particularly in tools that can send to other people.

Treat every card as an accessible control

Use a button with a descriptive accessible name for a selectable GIF. Preserve visible focus, a logical keyboard order, and an Escape path when the picker is inside a dialog. Announce loading and empty results without announcing every animated frame.

Start with thumbnails and animate a limited number of previews. Respect reduced-motion preferences and offer a way to pause motion. A grid full of autoplaying media can become expensive and distracting before any network quota is reached.

Add the provider contract deliberately

GIFs.so returns items, total, nextOffset, and a separate sponsors array. Follow nextOffset until it is null; reset it when inputs change. Render sponsor cards with a clear label and keep them out of GIF selection behavior.

Use returned width and height to reserve layout space. Treat mp4Url as optional and keep a GIF or static fallback. The integration guide documents the fields and verified-account requirements.

Test user-visible outcomes

Test typing two queries quickly, closing during a request, loading the final page, retrying a failed later page, and selecting with the keyboard. Confirm that a sponsor cannot be mistaken for a GIF and that an expired session has a useful recovery path. The performance guide covers the next stage after these state transitions work.

Find the right reaction.

A curated library, a free API, and an MCP server. Sign in with a verified account to get started.

Create an accountIntegration guide

Keep reading

AIEngineering

Handle GIF search results safely in an AI agent

Keep titles, tags, URLs, and sponsor creative as untrusted data, and separate reading from posting to other people.

September 5, 2026·2 min read
APIsSearch

How to compare GIF API providers with a repeatable scorecard

Evaluate real query relevance, media support, limits, access terms, and operational behavior before committing to a provider.

September 5, 2026·2 min read
gifs.so mascot, a lime animation frame winkinggifs.so

5,537 reaction GIFs, sorted into 56 moods. For when you have nothing to say, and need to say it spectacularly.

The stash

  • Join the club
  • Sign in

Around here

  • The GIF journal
  • Sponsor the stash

Say hey

  • hello@gifs.so
© 2026 gifs.soMade for big feelings and very small attention spans.