格式化与代码
shadcn/ui 组件生成器
Compose shadcn primitives into ready-to-paste components.
Runs in your browser
shadcn primitives
UserCard.tsx
lines: 20chars: 568size: 568 B
live
编辑注
Understanding · Not a library. A copy-paste project.
本深度章节目前仅有英文版本。上方的转换工具支持您的语言;长篇说明文章尚未翻译。
常见问题
Quick answers.
›Do I need to install shadcn/ui first?
Yes. This tool generates code that assumes you have the `shadcn-ui` CLI configured and the necessary primitives installed via `npx shadcn-ui@latest add`.
›Is the code compatible with Next.js?
Yes. The generated output uses standard React and Tailwind CSS conventions that work in Next.js, Vite, and other modern frameworks.
›Does this support TypeScript?
The generator provides TypeScript-first code by default, including the necessary types for props and component refs.
›Can I customise the styling?
The output uses Tailwind CSS utility classes. You can modify the generated classes directly in your editor to match your specific design requirements.
大家也在搜索
相关工具
More in this room.
- JSON 转 React Hook Form + Zod根据 JSON 结构生成类型化的表单 schema 和 useForm hook。
- JSON 转 Next.js Server Action带有 Zod 解析和 revalidatePath 的 Server Action。
- JSON 转 Prisma Schema Model从 JSON 示例生成 Prisma 模型块。
- JSON 转 Drizzle ORM SchemaDrizzle pgTable 定义,带有 $inferSelect / $inferInsert。
- JSON 转 TypeORM Entity带有装饰器和生成的 id 的 TypeORM @Entity 类。
- JSON 转 Mongoose Schema + Model带有时间戳和类型的 Mongoose Schema + 模型。