mirror of
https://github.com/michivonah/nextjs.git
synced 2025-12-22 22:16:28 +01:00
add shadcn/ui + docs
This commit is contained in:
parent
c1cbd0b0d7
commit
db91ca0269
11 changed files with 452 additions and 23 deletions
30
docs/shadcn-ui/README.md
Normal file
30
docs/shadcn-ui/README.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# shadcn/ui
|
||||
|
||||
shadcn/ui is UI component library for React components. Shadcn/ui is modular in comparison to other component libraries. You only install the components you really need and not import anything. Further is the code stored directly in the project, instead coming from a dependencie.
|
||||
|
||||
Website shadcn/ui: https://ui.shadcn.com/
|
||||
|
||||
Next.js docs: https://ui.shadcn.com/docs/installation/next
|
||||
|
||||
Install shadcn/ui
|
||||
```zsh
|
||||
npx shadcn@latest init
|
||||
```
|
||||
|
||||
Install a UI component
|
||||
```zsh
|
||||
npx shadcn@latest add <COMPONENT-NAME>
|
||||
```
|
||||
|
||||
Usage in code
|
||||
```tsx
|
||||
import { Button } from "@/components/ui/button"
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div>
|
||||
<Button>Click me</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue