徐州企业网站模板建站,seo优化的方法,安卓从网站获取视频怎么做,三明市住房与建设局网站1、安装nextjs
创建文件夹next-shadcn 在文件夹中执行
npx create-next-applatest . --typescript --tailwind --eslint安装后#xff0c;跑起来 2、安装shadcn
在刚才目录下#xff0c;运行命令
npx shadcn-uilatest init目录中会增加两个目录
components 和lib
替换原…1、安装nextjs
创建文件夹next-shadcn 在文件夹中执行
npx create-next-applatest . --typescript --tailwind --eslint安装后跑起来 2、安装shadcn
在刚才目录下运行命令
npx shadcn-uilatest init目录中会增加两个目录
components 和lib
替换原始page.tsx文件 export default function Home() {return (h1Hello World/h1/);
}3、安装一个button组件
npx shadcn-uilatest add button4、增加一个自定义样式
myButton: p-2 bg-orange-400,page.tsx代码
import { Button } from /components/ui/button;export default function Home() {return (h1Hello World/h1Button variantoutlineButton/ButtonButton variantmyButtonButton/Button/);
}界面效果 学习资源https://www.freecodecamp.org/news/shadcn-with-next-js-14/#how-to-install-next-js