For developers
Selling a component on UpFork
From your project's folder to a component on sale in a few minutes: what goes in, how its live preview is built, how every save is install-checked (with the real shadcn CLI, or in a fresh Expo app for a React Native component), and how buyers get it.
Last updated
Before you start
You need a developer account: apply to sell, prove your GitHub account or your website is yours, and we review your work. Then set your wallet address in the developer panel.
A free product costs you nothing. On a paid one, buyers pay your wallet: UpFork's share is 20%, taken as whole sales: the 5th, 10th, 15th… sale of each product is paid to UpFork's wallet, and every other sale straight to yours, in full, starting with the first four. The fees page has the details, and the founding developers pay no share for their first 12 months.
A component on UpFork is one of these:
- React with Tailwind CSS, written the way shadcn/ui components are: Tailwind 4, or Tailwind 3 with its
tailwind.config. Buyers install it with the shadcn CLI, into their own project, where it’s theirs to change. - Plain HTML, CSS and JavaScript: a page with its stylesheets, scripts and pictures. Buyers download it.
- React Native for Expo apps: a mobile component, tried live in a phone on its page. Most of this guide holds for it too; what’s its own is under Mobile components.
Drop your project
In the developer panel, start a new product and drop your project’s folder on it: the folder itself, a ZIP of it (GitHub’s “Download ZIP” works), or loose files. It’s read in your browser; node_modules and build output are never opened. The title, summary and description come from your package.json and README, and the categories are suggested from its words.
Before anything changes you see what goes where, and what’s left out and why:
- Your code keeps its folders:
components/,hooks/,lib/,app/. Imports that cross a moved folder are rewritten, and shadcn/ui’s own components become dependencies the CLI installs. - Demos come from
demos/,examples/,*.demo.tsxorapp/demo/; a component with none gets one made from its page. Files only your demos use stay out of what buyers install. - A
registry/folder, as shadcn registries keep theirs, is used instead of the rest of the project.
Up to 100 files. Change anything afterwards in the editor, which saves with Ctrl S.
Styles
What your component needs in a buyer’s global stylesheet comes from yours: its own :root and .dark variables, @theme variables and keyframes, @utility, @property. What every shadcn project has already (Tailwind’s import, shadcn’s colors) is left out. The shadcn CLI merges the rest into the buyer’s stylesheet.
Rules that would restyle a buyer’s whole site (body, *), @import and @plugin are refused, each at its line, with what to do instead. A stylesheet your component imports itself goes with it as it is.
On Tailwind CSS 3? Your tailwind.config is read, never run: its theme.extend (colors, fonts, font sizes, radii, shadows, animations, keyframes…) becomes Tailwind 4 theme variables, bare HSL colors become whole ones, and buyers still on Tailwind 3 get a config of their own. A value only running the config would give (a function, a plugin) is named at its line.
Pictures, fonts and videos
Keep them where your project has them: in public/, or beside the code that imports them. They come in with the code that uses them, are scanned and stored by UpFork, and the code that goes out points at UpFork’s copies, so the component works right after it’s installed. Buyers can host them themselves too.
Limits: pictures 10 MB, fonts 5 MB, videos 40 MB, sounds 20 MB.
The live preview
Every save builds a live preview of your demos: your component running, not a picture of it, on its card in the catalog and on its page. Most are built in under a minute. If something stops the build, each problem is shown at its file and line.
- Set each demo’s layout: centered (a component in the middle), full width (a section across the page) or full page; its background and padding; and the font the preview is set in.
- Or say it in the demo, and every import sets it: a comment like
// @upfork layout=full-page(alsobackground=andpadding=). A demo that’s a window tall (min-h-screen,min-h-svh, a hero at100svh) is shown as a full page without one, at a desktop’s width everywhere: on its card, its page and its demo page alike. - Pick the theme your previews open in: the visitor’s own, always dark or always light.
- A preview may take up to three minutes to build, packages included: keep them few and small.
The install check, and trying the install
Every save of a component is also installed the way a buyer installs it: the real shadcn CLI adds it to a fresh Next.js project, its packages are installed, and TypeScript checks the project as next build would. A missing export, a wrong import or a type error comes back at its line, before any buyer meets it. Publishing waits for a clean check.
Try the install yourself under the preview: a private link, good for a day, with the command for npm, pnpm, yarn and bun. It installs your code as last saved into a project of yours, with your own CLI token through UpFork’s registry in components.json, the way buyers install.
For the review, and Connects to
Every save is also read for what a reviewer looks at: the other sites your code sends to or loads from, text it runs as code, code that hides what it does (minified, obfuscated, encoded), private things it reads (cookies, storage, the clipboard, environment variables), and code that runs on the buyer’s server. Each one shows under the code, under For the review, at its line and with what to do. Nothing there stops a save or holds anything up.
Most are honest code that needs a word. Name each site your code talks to in Connects to, on the product’s Details, with what it sends there or loads from it: buyers see the list on its page. UpFork itself, Google Fonts and Unsplash’s pictures need no line.
The install check reads your packages too: an install script (in yours, or in one they bring), a name a letter or two from a well-known package, a package that’s new or little used, or deprecated. Each shows in the same list, with its facts from npm on hover. A package npm knows as malware stops the check. A few things are refused at save, in any file: imports of Node’s process, network and VM modules (child_process, vm, net, http…), which a UI product never needs.
Publish
The Publish step lists what’s left: a built preview, a clean install check, a price (or free), a license, and the details buyers read. Then Send it for review: UpFork looks at your code before it goes on sale (what its checks flagged, its packages and its preview) and publishes it once it’s approved, or sends it back with a note at the top of your editor. You hear either way, on the site and by e-mail.
New code you save later is built and checked the same way, then sent from Code & preview (or published as a version under Updates, which sends it with the version). Until a revision is approved, installs, the ZIP and the product’s page stay on the one before, so nothing reaches buyers unreviewed. Sending a newer revision replaces the one that waits; Withdraw takes it back. Once UpFork trusts you, a revision whose checks flag nothing to look at goes out without waiting.
How buyers get it
Members add UpFork to their project once (their own CLI token, from their account), then install with one command:
npx shadcn@latest add @upfork/your-componentYour files land in their project, your Styles in their stylesheet, the packages you use are installed, and the CLI tells them where the pictures load from. Plain HTML components, and anything that isn’t a component, are downloads.
Mobile components
A mobile component is React Native code for Expo apps, in TypeScript, for one Expo SDK at a time: SDK 57 today. It uses Expo’s own modules and plain-JavaScript packages only (Reanimated, Gesture Handler, Skia, Expo Haptics and the like): a package with native code of its own needs a custom build and has no web version to preview, so it’s refused with that reason.
Pick Mobile as the kind and drop your Expo app’s folder, or a ZIP of it. A React Native project dropped as another kind becomes a mobile component by itself. Before anything changes you see where each file goes:
components/,hooks/andlib/keep their paths; other folders of code (constants/,utils/…) go underlib/. Imports are relative, and follow any file that moves.- Demos come from
demos/orexamples/. Each is a whole screen, its default export, with aschemeprop of"light"or"dark": the preview passes the site’s theme. - Pictures, fonts, videos and sounds go in
assets/and are required from the code (require('../assets/card.png')): PNG, JPEG, GIF and WebP; TTF and OTF; MP4; MP3, M4A and WAV. - Your app’s own parts stay out, each with why: its screens (
app/), its entry (App.tsx),ios/andandroid/, configuration and lockfiles. Buyers install packages withnpx expo install, at their SDK’s versions.
Every save checks the code against a few rules, each at its line, with what to do:
- Presses and drags go through
Pressableor Gesture Handler, which answer both a finger and the mouse;onTouchStartand the like answer only fingers, and most people first try a component with a mouse. - Sizes come from
useWindowDimensions()oronLayout, notDimensions.get(): the preview’s phone frame resizes, and phones rotate. - A component never loads Skia’s web engine itself (
LoadSkiaWeb,WithSkiaWeb): the preview does, once for every Skia demo a visitor sees, and buyers do in their app’s entry. - Imports stay inside the product, the files and pictures they name exist, and every demo has a default export.
A mobile component’s preview, check and buyers
The preview. Every save builds your demos for the web, with Expo’s own bundler, from the same code buyers get. On its page and its card it runs in a phone frame: with the mouse on a computer, full screen with a finger on a phone, and on a visitor’s own phone through the QR code beside it. Skia draws as it does on phones. Its card shows the phone’s screen until it’s hovered.
The install check. Every save is also installed the way a buyer installs it: your folders go into a fresh Expo app (SDK 57, TypeScript), its packages are installed with the versions npx expo install picks, TypeScript checks the whole app in strict mode, and the app is built for the web. A type error or a missing package comes back at its file and line. Publishing waits for a clean check.
Buyers get its folders as a ZIP, with a package.json naming its packages at the versions the check installed, and a README: the npx expo install line, the App.tsx that shows your first demo, and for Skia, the web’s setup. AI assistants install it through UpFork’s MCP server. Its page shows the same steps; Install mobile components is the buyers’ side of it.
Questions
Stuck on something the editor doesn’t explain? Open a support ticket about selling, with your product’s name, or write to support@upfork.dev.