Comments (10)
Right now, we don't support styling the button, it is on my list of planned features though.
In the mean time, you would need to create your own button and hook it up using the useUploadThing()
hook
from uploadthing.
The quick workaround for this is to change the order of imports. Making sure that the uploadthing component styles are imported before others usually does the trick
import "@uploadthing/react/styles.css"; import "../styles/globals.css";
This workaround works in dev, but after building and/or publishing to Vercel there are still conflicts.
from uploadthing.
@markflorkowski custom styling had been implemented and released. I guess this issue can be closed
from uploadthing.
@markflorkowski how can one use the useUploadThing hook? the package doesn't export it
from uploadthing.
@kitze Sorry, just seeing this now. You can use the generateReactHelpers()
function to get it.
from uploadthing.
I didn't import the styles and provided new styles as overrides in my css file.
.ut-hidden {
@apply hidden;
}
.ut-bg-blue-600 {
@apply flex h-10 w-36 cursor-pointer items-center justify-center rounded-md bg-blue-600 hover:bg-blue-500;
}
.ut-text-white {
@apply text-white;
}
.ut-text-xs {
@apply text-center text-xs leading-5 text-gray-600;
}
Could be way better but quick fix for the moment.
from uploadthing.
There's a CSS style conflict for reset and submit button's with shadcn UI forms. Upload thing's styling overrides shadcn UI's form's default button styles.
from uploadthing.
The quick workaround for this is to change the order of imports. Making sure that the uploadthing component styles are imported before others usually does the trick
import "@uploadthing/react/styles.css";
import "../styles/globals.css";
from uploadthing.
Also another very simple thing i would expect is to be able to change the button name. I had to change it with element.innerText. no time to open a feature request but this should be a default option anyways.
from uploadthing.
As of @uploadthing/[email protected]
custom styling of the components is now supported. Please see the docs for more info on how to use the new styling options.
from uploadthing.
Related Issues (20)
- [Bug]: Unable to delete account HOT 5
- feat: add us-east-1 N. Virginia HOT 4
- [misc]: Sending presigned URLs to client stuck HOT 3
- [misc]: Vercel preview URLs make up all the top search results for upload thing docs HOT 1
- feat: add ap-southeast-1 Singapore HOT 1
- RFC: What regions would you like to see us add to Uploadthing? HOT 2
- feat: Ability to export multiple images as a CSV or JSON HOT 2
- feat: More restrictive MIME types for better UX uploading images from Android HOT 3
- [bug]: Error uploading the file in NextJs
- [bug]: startUpload doesn't return a response. It gives an error. Even though in the console(GUI), it shows the upload was successful HOT 7
- [Bug]: Charset not set properly HOT 3
- [Bug]: your file filters are broken
- onUploadProgress of useUploadThing going back to previous value HOT 1
- feat: rename files through gui HOT 4
- [bug]: Effect package version mismatch? HOT 4
- [misc]: Module '"uploadthing/client"' has no exported member 'UploadFileResponse'.ts(2305) HOT 9
- [misc]: add pnpm catalogs
- [billing]: How do I pay for org plan instead of personal? HOT 3
- [Bug]: `UTApi` is deleting the file but still able to directly access the file from its URL. HOT 5
- [misc]: Can still request file urls for deleted files HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uploadthing.