Tauri UI Template is a starting point for building modern desktop applications with web technologies. Customizable UI components with shadcn/ui, a lightweight and secure desktop app framework Tauri 2, the React-based framework Next.js 13, the utility-first CSS framework Tailwind.
- Support for dark and light modes
- Components-based UI design
- A draggable titlebar with minimize, maximize, and close buttons
- Radix UI for UI primitives
- TypeScript
- Lucide Icons
- Bundle size optimized
Cargo.toml
(.exe 3mb, .msi 2mb) - Tauri GitHub Action
You can download pre-built final bundles from the Releases section.
Next.js is used in this template to facilitate quick integration of the
/examples
directory of shadcn/ui. You can also easily use shadcn/ui with the React + Vite stack and any React router library in Tauri.
gh repo clone agmmnn/tauri-ui
cd tauri-ui
pnpm i
pnpm tauri dev
pnpm tauri build
The template can be customized by editing the following files:
- src-tauri/tauri.conf.json
- package.json
- src-tauri/cargo.toml
- To change the app icon, update
app-icon.png
, and then runpnpm tauri icon
. This will automatically generate icon files into src-tauri/icons.
Note that shadcn/ui is not a library, therefore you will need to update the components manually. To do so, you can download the shadcn/ui/apps/www/components/ui directory and paste it into src/components/ui.
- Titlebar draggable.
- Titlebar minimize, maximize, close buttons.
- Titlebar double-click maximize.
- Decomposing UI into components.
- Dark-Light mode switch.
- Get simple data from the Rust backend code.
.
βββ next-env.d.ts
βββ next.config.js //nextjs config file https://nextjs.org/docs/api-reference/next.config.js/introduction
βββ package.json
βββ postcss.config.js
βββ README.md
βββ public
βββ src //frontend src:
β βββ app //next.js appdir https://beta.nextjs.org/docs/routing/fundamentals
β βββ assets
β βββ components //from shadcn/ui
β β βββ ui
β βββ data
β βββ hooks
β βββ lib
β βββ styles
βββ src-tauri //backend src:
β βββ build.rs
β βββ Cargo.lock
β βββ Cargo.toml //https://doc.rust-lang.org/cargo/reference/manifest.html
β βββ icons //https://tauri.app/v1/guides/features/icons/
β βββ src //rust codes
β βββ tauri.conf.json //tauri config file https://next--tauri.netlify.app/next/api/config
βββ prettier.config.js //prettier config file https://prettier.io/docs/en/configuration.html
βββ tailwind.config.js //tailwind config file https://tailwindcss.com/docs/configuration
βββ tsconfig.json //typescript config file https://www.typescriptlang.org/docs/handbook/tsconfig-json.html