TailwindFetch
Like TailwindCSS, but for fetch().
className your way to API data!
React Server ComponentsZero ConfigTypeScriptSuspense Ready
<Fetch className="fetch-[...posts/1]-select-title" />renders
sunt aut facere repellat provident occaecati excepturi optio reprehenderit
Syntax Reference
fetch-[url]-select-path.to.data
fetch-[url]The URL to fetch
-select-pathDot notation selector
as="table"Render format
Interactive Playground
Edit the URL, selector, and format to see live results
Try:
<FetchClient className="fetch-[https://jsonplaceholder.typicode.com/posts/1]-select-title" as="span"/>Live Result
sunt aut facere repellat provident occaecati excepturi optio reprehenderit
More Examples
Different ways to fetch and render API data
Component Integrations
Pass fetch data to children using $$response tokens
Token Syntax
| Token | Result |
|---|---|
$$response | Full response (stringified if object) |
$$response.name | Nested property access |
$$response.users[0].id | Array index access |