mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-13 10:51:32 +00:00
Compare commits
26 Commits
shadcn@4.0
...
shadcn@4.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cdb4a4547f | ||
|
|
048dac9359 | ||
|
|
f93d44730e | ||
|
|
21c64cb561 | ||
|
|
7e405f1568 | ||
|
|
04248d752e | ||
|
|
15f6a0fe49 | ||
|
|
54d254100d | ||
|
|
6d7f3479d1 | ||
|
|
5e1fca8b4e | ||
|
|
30229bfd14 | ||
|
|
1ce9c2dd6a | ||
|
|
5edf9c95b7 | ||
|
|
b7786c4b42 | ||
|
|
6ca3784b67 | ||
|
|
119d534e85 | ||
|
|
b600dd7091 | ||
|
|
d59e5be214 | ||
|
|
cddbc1f3ff | ||
|
|
7c0d413e3c | ||
|
|
00de8addfe | ||
|
|
869e7bb17f | ||
|
|
8491d4207a | ||
|
|
3a431547bb | ||
|
|
f26db39334 | ||
|
|
e9f4cfb010 |
@@ -80,10 +80,11 @@ export function ProjectForm({
|
||||
|
||||
const commands = React.useMemo(() => {
|
||||
const presetFlag = ` --preset ${presetCode}`
|
||||
const baseFlag = params.base !== "radix" ? ` --base ${params.base}` : ""
|
||||
const templateFlag = ` --template ${framework}`
|
||||
const monorepoFlag = isMonorepo ? " --monorepo" : ""
|
||||
const rtlFlag = params.rtl ? " --rtl" : ""
|
||||
const flags = `${presetFlag}${templateFlag}${monorepoFlag}${rtlFlag}`
|
||||
const flags = `${presetFlag}${baseFlag}${templateFlag}${monorepoFlag}${rtlFlag}`
|
||||
|
||||
return IS_LOCAL_DEV && !process.env.NEXT_PUBLIC_RC
|
||||
? {
|
||||
@@ -98,7 +99,7 @@ export function ProjectForm({
|
||||
yarn: `yarn dlx shadcn${SHADCN_VERSION} init${flags}`,
|
||||
bun: `bunx --bun shadcn${SHADCN_VERSION} init${flags}`,
|
||||
}
|
||||
}, [framework, isMonorepo, params.rtl, presetCode])
|
||||
}, [framework, isMonorepo, params.base, params.rtl, presetCode])
|
||||
|
||||
const command = commands[packageManager]
|
||||
|
||||
|
||||
@@ -170,22 +170,22 @@ function BlockViewerToolbar({ styleName }: { styleName: Style["name"] }) {
|
||||
<div className="h-8 items-center gap-1.5 rounded-md border p-[3px] shadow-none">
|
||||
<ToggleGroup
|
||||
type="single"
|
||||
defaultValue="100"
|
||||
defaultValue="100%"
|
||||
onValueChange={(value) => {
|
||||
setView("preview")
|
||||
if (resizablePanelRef?.current) {
|
||||
resizablePanelRef.current.resize(parseInt(value))
|
||||
resizablePanelRef.current.resize(value)
|
||||
}
|
||||
}}
|
||||
className="gap-1 *:data-[slot=toggle-group-item]:size-6! *:data-[slot=toggle-group-item]:rounded-sm!"
|
||||
>
|
||||
<ToggleGroupItem value="100" title="Desktop">
|
||||
<ToggleGroupItem value="100%" title="Desktop">
|
||||
<Monitor />
|
||||
</ToggleGroupItem>
|
||||
<ToggleGroupItem value="60" title="Tablet">
|
||||
<ToggleGroupItem value="60%" title="Tablet">
|
||||
<Tablet />
|
||||
</ToggleGroupItem>
|
||||
<ToggleGroupItem value="30" title="Mobile">
|
||||
<ToggleGroupItem value="30%" title="Mobile">
|
||||
<Smartphone />
|
||||
</ToggleGroupItem>
|
||||
<Separator orientation="vertical" className="h-4!" />
|
||||
|
||||
@@ -27,7 +27,7 @@ A preset packs your entire design system config into a short code. Colors, theme
|
||||
Build your preset on [shadcn/create](/create), preview it live and grab the code when you're ready.
|
||||
|
||||
```bash
|
||||
npx shadcn init --preset a1Dg5eFl
|
||||
npx shadcn@latest init --preset a1Dg5eFl
|
||||
```
|
||||
|
||||
Use it to scaffold projects from custom config, share with your team or publish in your registry. Drop it in prompts so your agent knows where to start. Use it across Claude, Codex, v0, Replit. Take your preset with you.
|
||||
@@ -37,7 +37,7 @@ Use it to scaffold projects from custom config, share with your team or publish
|
||||
When you're working on a new app, it can take a few tries to find something you like so we've made switching presets really easy. Run init --preset in your app, and the cli will take care of reconfiguring everything including your components.
|
||||
|
||||
```bash
|
||||
npx shadcn init --preset ad3qkJ7
|
||||
npx shadcn@latest init --preset ad3qkJ7
|
||||
```
|
||||
|
||||
### Skills + Presets
|
||||
@@ -56,9 +56,9 @@ To help you build custom presets, we rebuilt [shadcn/create](/create). It now in
|
||||
Inspect what a registry will add to your project before anything gets written. Review the payload yourself or pipe it to your coding agent for a second look.
|
||||
|
||||
```bash
|
||||
npx shadcn add button --dry-run
|
||||
npx shadcn add button --diff
|
||||
npx shadcn add button --view
|
||||
npx shadcn@latest add button --dry-run
|
||||
npx shadcn@latest add button --diff
|
||||
npx shadcn@latest add button --view
|
||||
```
|
||||
|
||||
### Updating primitives
|
||||
@@ -66,7 +66,7 @@ npx shadcn add button --view
|
||||
You can use the `--diff` flag to check for registry updates. Or ask your agent: "check for updates from @shadcn and merge with my local changes".
|
||||
|
||||
```bash
|
||||
npx shadcn add button --diff
|
||||
npx shadcn@latest add button --diff
|
||||
```
|
||||
|
||||
### shadcn init --template
|
||||
@@ -74,7 +74,7 @@ npx shadcn add button --diff
|
||||
`shadcn init` now scaffolds full project templates for Next.js, Vite, Laravel, React Router, Astro and TanStack Start. Dark mode included for Next.js and Vite.
|
||||
|
||||
```bash
|
||||
npx shadcn init
|
||||
npx shadcn@latest init
|
||||
|
||||
Select a template › - Use arrow-keys. Return to submit.
|
||||
❯ Next.js
|
||||
@@ -88,7 +88,7 @@ Select a template › - Use arrow-keys. Return to submit.
|
||||
Use `--monorepo` to set up a monorepo.
|
||||
|
||||
```bash
|
||||
npx shadcn init -t next --monorepo
|
||||
npx shadcn@latest init -t next --monorepo
|
||||
```
|
||||
|
||||
### shadcn init --base
|
||||
@@ -96,7 +96,7 @@ npx shadcn init -t next --monorepo
|
||||
Pick your primitives. Use `--base` to start a project with Radix or Base UI.
|
||||
|
||||
```bash
|
||||
npx shadcn init --base radix
|
||||
npx shadcn@latest init --base radix
|
||||
```
|
||||
|
||||
### shadcn info
|
||||
@@ -104,7 +104,7 @@ npx shadcn init --base radix
|
||||
The `info` command now shows the full picture: framework, version, CSS vars, which components are installed, and where to find docs and examples for every component. Great for giving coding agents the context they need to work with your project.
|
||||
|
||||
```bash
|
||||
npx shadcn info
|
||||
npx shadcn@latest info
|
||||
```
|
||||
|
||||
### shadcn docs
|
||||
@@ -112,7 +112,7 @@ npx shadcn info
|
||||
Get docs, code and examples for any UI component right from the CLI. Gives your coding agent the context to use your primitives correctly.
|
||||
|
||||
```bash
|
||||
npx shadcn docs combobox
|
||||
npx shadcn@latest docs combobox
|
||||
|
||||
combobox
|
||||
- docs https://ui.shadcn.com/docs/components/radix/combobox
|
||||
@@ -142,7 +142,7 @@ Fonts are now a first-class registry type. Install and configure them the same w
|
||||
```
|
||||
|
||||
```bash
|
||||
npx shadcn add font-inter
|
||||
npx shadcn@latest add font-inter
|
||||
```
|
||||
|
||||
## Links
|
||||
@@ -150,4 +150,4 @@ npx shadcn add font-inter
|
||||
- [shadcn/skills](/skills)
|
||||
- [shadcn/create](/create)
|
||||
- [shadcn/cli](/cli)
|
||||
- [shadcn/registry](/registry)
|
||||
- [shadcn/registry](/docs/registry)
|
||||
|
||||
@@ -103,18 +103,20 @@ The `type` property is used to specify the type of your registry item. This is u
|
||||
|
||||
The following types are supported:
|
||||
|
||||
| Type | Description |
|
||||
| -------------------- | ------------------------------------------------ |
|
||||
| `registry:block` | Use for complex components with multiple files. |
|
||||
| `registry:component` | Use for simple components. |
|
||||
| `registry:lib` | Use for lib and utils. |
|
||||
| `registry:hook` | Use for hooks. |
|
||||
| `registry:ui` | Use for UI components and single-file primitives |
|
||||
| `registry:page` | Use for page or file-based routes. |
|
||||
| `registry:file` | Use for miscellaneous files. |
|
||||
| `registry:style` | Use for registry styles. eg. `new-york` |
|
||||
| `registry:theme` | Use for themes. |
|
||||
| `registry:item` | Use for universal registry items. |
|
||||
| Type | Description |
|
||||
| -------------------- | ------------------------------------------------- |
|
||||
| `registry:base` | Use for entire design systems. |
|
||||
| `registry:block` | Use for complex components with multiple files. |
|
||||
| `registry:component` | Use for simple components. |
|
||||
| `registry:font` | Use for fonts. |
|
||||
| `registry:lib` | Use for lib and utils. |
|
||||
| `registry:hook` | Use for hooks. |
|
||||
| `registry:ui` | Use for UI components and single-file primitives. |
|
||||
| `registry:page` | Use for page or file-based routes. |
|
||||
| `registry:file` | Use for miscellaneous files. |
|
||||
| `registry:style` | Use for registry styles. eg. `new-york`. |
|
||||
| `registry:theme` | Use for themes. |
|
||||
| `registry:item` | Use for universal registry items. |
|
||||
|
||||
### author
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
"rehype-pretty-code": "^0.14.1",
|
||||
"rimraf": "^6.0.1",
|
||||
"server-only": "^0.0.1",
|
||||
"shadcn": "4.0.0",
|
||||
"shadcn": "4.0.1",
|
||||
"shiki": "^1.10.1",
|
||||
"sonner": "^2.0.0",
|
||||
"swr": "^2.3.6",
|
||||
|
||||
@@ -473,6 +473,12 @@
|
||||
"url": "https://www.scrollxui.dev/registry/{name}.json",
|
||||
"description": "ScrollX UI is an open-source React and shadcn-compatible component library for animated, interactive, and customizable user interfaces. It offers motion-driven components that blend seamlessly with modern ShadCN setups."
|
||||
},
|
||||
{
|
||||
"name": "@spell",
|
||||
"homepage": "https://spell.sh",
|
||||
"url": "https://spell.sh/r/{name}.json",
|
||||
"description": "Beautiful, sophisticated UI components designed for modern React and Tailwind CSS applications."
|
||||
},
|
||||
{
|
||||
"name": "@square-ui",
|
||||
"homepage": "https://square.lndev.me",
|
||||
@@ -820,5 +826,17 @@
|
||||
"homepage": "https://emerald-ui.com",
|
||||
"url": "https://emerald-ui.com/r/{name}.json",
|
||||
"description": "Emerald UI - collection of components built with Motion, GSAP, Tailwind CSS and shadcn/ui."
|
||||
},
|
||||
{
|
||||
"name": "@iconiq",
|
||||
"homepage": "https://iconiqs.vercel.app",
|
||||
"url": "https://iconiqs.vercel.app/r/{name}.json",
|
||||
"description": "Iconiq is a collection of icons designed for web applications. It is a modern, clean, and minimalistic icon set that is perfect for web applications."
|
||||
},
|
||||
{
|
||||
"name": "@fonttrio",
|
||||
"homepage": "https://www.fonttrio.xyz",
|
||||
"url": "https://www.fonttrio.xyz/r/{name}.json",
|
||||
"description": "Curated font pairing registry for shadcn. Three fonts. One command. Install perfectly configured typography (heading + body + mono) with shadcn add. Includes editorial-grade type scales, CSS variables, and a live preview site."
|
||||
}
|
||||
]
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -777,11 +777,17 @@ async function buildTemplates() {
|
||||
".git",
|
||||
"--exclude",
|
||||
"pnpm-lock.yaml",
|
||||
"--exclude",
|
||||
"._*",
|
||||
"-C",
|
||||
templatesDir,
|
||||
name,
|
||||
],
|
||||
{ cwd: process.cwd(), stdio: "pipe" }
|
||||
{
|
||||
cwd: process.cwd(),
|
||||
stdio: "pipe",
|
||||
env: { ...process.env, COPYFILE_DISABLE: "1" },
|
||||
}
|
||||
)
|
||||
let stderr = ""
|
||||
proc.stderr?.on("data", (data) => (stderr += data))
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @shadcn/ui
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#9896](https://github.com/shadcn-ui/ui/pull/9896) [`1ce9c2dd6a3d16422a6586e39632ebbccc45d3a4`](https://github.com/shadcn-ui/ui/commit/1ce9c2dd6a3d16422a6586e39632ebbccc45d3a4) Thanks [@shadcn](https://github.com/shadcn)! - fix apple metadata files in template
|
||||
|
||||
- [#9897](https://github.com/shadcn-ui/ui/pull/9897) [`5edf9c95b7d13dcbd325aa4cf6b48d58a53b07c6`](https://github.com/shadcn-ui/ui/commit/5edf9c95b7d13dcbd325aa4cf6b48d58a53b07c6) Thanks [@shadcn](https://github.com/shadcn)! - fix fallback style resolving issue
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "shadcn",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"description": "Add components to your apps.",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
2
pnpm-lock.yaml
generated
2
pnpm-lock.yaml
generated
@@ -278,7 +278,7 @@ importers:
|
||||
specifier: ^0.0.1
|
||||
version: 0.0.1
|
||||
shadcn:
|
||||
specifier: 4.0.0
|
||||
specifier: 4.0.1
|
||||
version: link:../../packages/shadcn
|
||||
shiki:
|
||||
specifier: ^1.10.1
|
||||
|
||||
Reference in New Issue
Block a user