In this tutorial, we will see how to use separator line in next js 13 with shadcn ui. First you need to setup next js 13 with shadcn ui project.
how to use shadcn ui in next js 13
Before use divider separator line in next js 13 with shadcn ui you need to install npx shadcn-ui@latest add separator.
npx shadcn-ui@latest add separator
or
npx shadcn-ui@latest add
1. Create next js 13 with shadcn ui divider separator line using shadcn-ui Separator component.
import { Separator } from "@/components/ui/separator"
export default function SeparatorDemo() {
return (
<div>
<p>separator line next 13 with shadcn ui 1</p>
<Separator />
<p> separator line next 13 with shadcn ui 2</p>
</div>
)
}
2. next js 13 with shadcn ui divider separator line with vertical and horizontal.
import { Separator } from "@/components/ui/separator"
export default function SeparatorDemo() {
return (
<div>
<div className="space-y-1">
<h4 className="text-sm font-medium leading-none">Radix Primitives</h4>
<p className="text-sm text-muted-foreground">
An open-source UI component library.
</p>
</div>
<Separator className="my-4" />
<div className="flex h-5 items-center space-x-4 text-sm">
<div>Blog</div>
<Separator orientation="vertical" />
<div>Docs</div>
<Separator orientation="vertical" />
<div>Source</div>
</div>
</div>
)
}
Related Posts
create a accordion in nextjs 13 with shadcn ui
create sidebar in next 13 with shadcn ui
create footer section in next 13 with shadcn ui
create file upload in nextjs 13 with shadcn ui
next 13 with shadcn ui input field example
next 13 with shadcn ui cards example
next 13 with shadcn ui search bar example
next 13 with shadcn ui login page example
next 13 with shadcn ui sign up form example
next 13 with shadcn ui radio group example
next 13 with shadcn ui buttons example
next 13 with shadcn ui pagination example
next 13 with shadcn ui table example
next 13 with shadcn ui checkbox example
next 13 with shadcn ui dropdown menu example
how to use skeleton loading next 13 with shadcn ui
how to use data table next 13 with shadcn ui
how to use modal dialog next 13 with shadcn ui
how to use tabs next 13 with shadcn ui
how to use toggle switch next 13 with shadcn ui