Laravel
Install newt/ui in a Laravel app running Inertia, with either the React or the Vue starter kit.
Choose the brand hue, the radius and the font in newt/create, and it prints a preset code. Pass that code to init and the project comes out already wearing it.
npx laravel newpnpm dlx laravel newyarn dlx laravel newbunx laravel newdeno run -A npm:laravel newvlx laravel newvp dlx laravel newnubx laravel newnlx laravel newupx laravel new- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
npx newtui@latest init --preset <code>pnpm dlx newtui@latest init --preset <code>yarn dlx newtui@latest init --preset <code>bunx newtui@latest init --preset <code>deno run -A npm:newtui@latest init --preset <code>vlx newtui@latest init --preset <code>vp dlx newtui@latest init --preset <code>nubx newtui@latest init --preset <code>nlx newtui@latest init --preset <code>upx newtui@latest init --preset <code>- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
npx newtui@latest add buttonnpx shadcn@latest add @newtui/buttonnpx shadcn-vue@latest add @newtui/buttonpnpm dlx newtui@latest add buttonpnpm dlx shadcn@latest add @newtui/buttonpnpm dlx shadcn-vue@latest add @newtui/buttonyarn dlx newtui@latest add buttonyarn dlx shadcn@latest add @newtui/buttonyarn dlx shadcn-vue@latest add @newtui/buttonbunx newtui@latest add buttonbunx shadcn@latest add @newtui/buttonbunx shadcn-vue@latest add @newtui/buttondeno run -A npm:newtui@latest add buttondeno run -A npm:shadcn@latest add @newtui/buttondeno run -A npm:shadcn-vue@latest add @newtui/buttonvlx newtui@latest add buttonvlx shadcn@latest add @newtui/buttonvlx shadcn-vue@latest add @newtui/buttonvp dlx newtui@latest add buttonvp dlx shadcn@latest add @newtui/buttonvp dlx shadcn-vue@latest add @newtui/buttonnubx newtui@latest add buttonnubx shadcn@latest add @newtui/buttonnubx shadcn-vue@latest add @newtui/buttonnlx newtui@latest add buttonnlx shadcn@latest add @newtui/buttonnlx shadcn-vue@latest add @newtui/buttonupx newtui@latest add buttonupx shadcn@latest add @newtui/buttonupx shadcn-vue@latest add @newtui/button- newtui
- shadcn
- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
The shadcn CLI needs the @newtui registry in your components.json. Set it up.
Laravel has no scaffold template, so the project is created by its own tool first and init runs inside the result. It detects the framework, the bundler and the stylesheet on its own.
npx laravel newpnpm dlx laravel newyarn dlx laravel newbunx laravel newdeno run -A npm:laravel newvlx laravel newvp dlx laravel newnubx laravel newnlx laravel newupx laravel new- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
npx newtui@latest initpnpm dlx newtui@latest inityarn dlx newtui@latest initbunx newtui@latest initdeno run -A npm:newtui@latest initvlx newtui@latest initvp dlx newtui@latest initnubx newtui@latest initnlx newtui@latest initupx newtui@latest init- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
npx newtui@latest add buttonnpx shadcn@latest add @newtui/buttonnpx shadcn-vue@latest add @newtui/buttonpnpm dlx newtui@latest add buttonpnpm dlx shadcn@latest add @newtui/buttonpnpm dlx shadcn-vue@latest add @newtui/buttonyarn dlx newtui@latest add buttonyarn dlx shadcn@latest add @newtui/buttonyarn dlx shadcn-vue@latest add @newtui/buttonbunx newtui@latest add buttonbunx shadcn@latest add @newtui/buttonbunx shadcn-vue@latest add @newtui/buttondeno run -A npm:newtui@latest add buttondeno run -A npm:shadcn@latest add @newtui/buttondeno run -A npm:shadcn-vue@latest add @newtui/buttonvlx newtui@latest add buttonvlx shadcn@latest add @newtui/buttonvlx shadcn-vue@latest add @newtui/buttonvp dlx newtui@latest add buttonvp dlx shadcn@latest add @newtui/buttonvp dlx shadcn-vue@latest add @newtui/buttonnubx newtui@latest add buttonnubx shadcn@latest add @newtui/buttonnubx shadcn-vue@latest add @newtui/buttonnlx newtui@latest add buttonnlx shadcn@latest add @newtui/buttonnlx shadcn-vue@latest add @newtui/buttonupx newtui@latest add buttonupx shadcn@latest add @newtui/buttonupx shadcn-vue@latest add @newtui/button- newtui
- shadcn
- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
The shadcn CLI needs the @newtui registry in your components.json. Set it up.
Create the app
laravel new my-app --reactlaravel new my-app --vueThe Inertia starter kits ship Vite and Tailwind v4 already wired, which is the
part init cannot do for you.
Declare the alias twice
{
"compilerOptions": {
"paths": { "@/*": ["./resources/js/*"] }
}
}import { fileURLToPath } from "node:url"
import laravel from "laravel-vite-plugin"
import { defineConfig } from "vite"
export default defineConfig({
plugins: [
laravel({ input: ["resources/css/app.css", "resources/js/app.tsx"] }),
],
resolve: {
alias: { "@": fileURLToPath(new URL("./resources/js", import.meta.url)) },
},
})Run init
npx newtui@latest init --framework react --css resources/css/app.csspnpm dlx newtui@latest init --framework react --css resources/css/app.cssyarn dlx newtui@latest init --framework react --css resources/css/app.cssbunx newtui@latest init --framework react --css resources/css/app.cssdeno run -A npm:newtui@latest init --framework react --css resources/css/app.cssvlx newtui@latest init --framework react --css resources/css/app.cssvp dlx newtui@latest init --framework react --css resources/css/app.cssnubx newtui@latest init --framework react --css resources/css/app.cssnlx newtui@latest init --framework react --css resources/css/app.cssupx newtui@latest init --framework react --css resources/css/app.css- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
npx newtui@latest init --framework vue --bundler vite --css resources/css/app.csspnpm dlx newtui@latest init --framework vue --bundler vite --css resources/css/app.cssyarn dlx newtui@latest init --framework vue --bundler vite --css resources/css/app.cssbunx newtui@latest init --framework vue --bundler vite --css resources/css/app.cssdeno run -A npm:newtui@latest init --framework vue --bundler vite --css resources/css/app.cssvlx newtui@latest init --framework vue --bundler vite --css resources/css/app.cssvp dlx newtui@latest init --framework vue --bundler vite --css resources/css/app.cssnubx newtui@latest init --framework vue --bundler vite --css resources/css/app.cssnlx newtui@latest init --framework vue --bundler vite --css resources/css/app.cssupx newtui@latest init --framework vue --bundler vite --css resources/css/app.css- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
There is no --template for Laravel: the app comes from laravel new, and
init runs inside it. --css points at the stylesheet the Blade layout
already loads.
Mark the root layout
<body class="newt-root font-sans antialiased">
@inertia
</body>Add a component
npx newtui@latest add buttonnpx shadcn@latest add @newtui/buttonnpx shadcn-vue@latest add @newtui/buttonpnpm dlx newtui@latest add buttonpnpm dlx shadcn@latest add @newtui/buttonpnpm dlx shadcn-vue@latest add @newtui/buttonyarn dlx newtui@latest add buttonyarn dlx shadcn@latest add @newtui/buttonyarn dlx shadcn-vue@latest add @newtui/buttonbunx newtui@latest add buttonbunx shadcn@latest add @newtui/buttonbunx shadcn-vue@latest add @newtui/buttondeno run -A npm:newtui@latest add buttondeno run -A npm:shadcn@latest add @newtui/buttondeno run -A npm:shadcn-vue@latest add @newtui/buttonvlx newtui@latest add buttonvlx shadcn@latest add @newtui/buttonvlx shadcn-vue@latest add @newtui/buttonvp dlx newtui@latest add buttonvp dlx shadcn@latest add @newtui/buttonvp dlx shadcn-vue@latest add @newtui/buttonnubx newtui@latest add buttonnubx shadcn@latest add @newtui/buttonnubx shadcn-vue@latest add @newtui/buttonnlx newtui@latest add buttonnlx shadcn@latest add @newtui/buttonnlx shadcn-vue@latest add @newtui/buttonupx newtui@latest add buttonupx shadcn@latest add @newtui/buttonupx shadcn-vue@latest add @newtui/button- newtui
- shadcn
- npm
- pnpm
- yarn
- bun
- deno
- vlt
- vp
- nub
- ni
- upm
The shadcn CLI needs the @newtui registry in your components.json. Set it up.
import { Button } from "@/components/ui/button"
export default function Welcome() {
return <Button variant="primary">Send</Button>
}<script setup lang="ts">
import { Button } from "@/components/ui/button"
</script>
<template>
<Button variant="primary">Send</Button>
</template>Blade without Inertia
An app that renders Blade templates and no JavaScript framework wants the plain CSS flavour instead: two stylesheets, BEM class names, no build step beyond the one Vite already runs. That is HTML & CSS.
What init writes
components.json the config, shared with shadcn
resources/css/app.css the --newt-* token block
resources/js/lib/utils.ts cn()
resources/js/components/ui/button.tsx add button (React)
See Dark mode for the theme toggle, and RTL if the app has to run right to left.