Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update react guide to not use visually hidden

Terry Sutton17d53e2837df
diff --git a/apps/reference/docs/guides/with-react.mdx b/apps/reference/docs/guides/with-react.mdx
index 72be1151e2a..f4202cbe688 100644
--- a/apps/reference/docs/guides/with-react.mdx
+++ b/apps/reference/docs/guides/with-react.mdx
@@ -431,10 +431,6 @@ And then open the browser to [localhost:3000](http://localhost:3000) and you sho
Every Supabase project is configured with [Storage](/docs/guides/storage) for managing large files like photos and videos.
-### Add @reach/visually-hidden
-
-The upload widget uses one additional npm library. You can install it like so: `npm install @reach/visually-hidden`.
-
### Create an upload widget
Let's create an avatar for the user so that they can upload a profile photo. We can start by creating a new component:
@@ -442,7 +438,6 @@ Let's create an avatar for the user so that they can upload a profile photo. We
```jsx title="src/Avatar.js"
import { useEffect, useState } from 'react'
import { supabase } from './supabaseClient'
-import VisuallyHidden from '@reach/visually-hidden'
export default function Avatar({ url, size, onUpload }) {
const [avatarUrl, setAvatarUrl] = useState(null)
@@ -511,7 +506,7 @@ export default function Avatar({ url, size, onUpload }) {
<label className="button primary block" htmlFor="single">
Upload an avatar
</label>
- <VisuallyHidden>
+ <div className="visually-hidden">
<input
type="file"
id="single"
@@ -519,7 +514,7 @@ export default function Avatar({ url, size, onUpload }) {
onChange={uploadAvatar}
disabled={uploading}
/>
- </VisuallyHidden>
+ </div>
</>
)}
</div>