Styling the React SDK
Components in@syncsnap/react use Tailwind CSS and CSS variables for the theme. You can use the built-in theme or adapt it to your app.
Option 1: Minimal setup (recommended)
If your app uses Tailwind v4, add these imports in your main CSS (e.g.app/globals.css):
@source so Tailwind scans the SDK for class names. No extra config or copy-paste needed.
If you use shadcn or tw-animate, you may need:
Option 2: Tailwind v3
Ensure Tailwind can see the SDK’s class names. Intailwind.config.js:
Option 3: Copy the full stylesheet
You can copy the SDK’s full styles (e.g. from the example app in this repo) into your project and import that instead. Use this if you want a single self-contained file or need to tweak the theme heavily.Requirements
- Tailwind (v3 or v4) so utility classes used by the components are generated.
- Content scanning of the SDK so classes like
bg-background,rounded-xl, etc. are included (via@sourcein v4 orcontentin v3 config).
Customizing the button
You can pass aclassName to SyncsnapUploadButton to style the wrapper or rely on your own button: