Navbar Default
<script>
import { Navbar } from "flowbite-svelte";
let siteName = "Flowbite Svelte";
let logo = "/images/flowbite-svelte-logo-30.png";
let alt = "flowbite-svelte";
let textsize = "text-lg";
let menus = [
{
name: "Home",
href: "/",
},
{
name: "GitHub",
href: "https://github.com/shinokada/flowbite-svelte"
},
{
name: "Design",
href: "https://flowbite-svelte.vercel.app",
},
];
</script>
<Navbar {menus} {siteName} {alt} {logo} {textsize} />
text-xs
<Navbar textsize="text-xs" {siteName} {menus}/>
text-sm
<Navbar textsize="text-sm" {siteName} {menus} />
text-base
<Navbar textsize="text-base" {siteName} {menus} />
text-lg
<Navbar textsize="text-lg" {siteName} {menus}/>
text-xl
<Navbar textsize="text-xl" {menus}/>
Props
The component has the following props, type, and default values. See types page for type information.
Name | Type | Default |
---|---|---|
user = ' | user | '' |
siteName | string | 'Svelte Flow' |
logo | string | '/images/flowbite-svelte-logo-30.png' |
alt | string | 'Svelte Flow' |
textsize | string | 'text-sm' |
menus | LinkType[] | - |
navClass | string | |
spanClass | string | |
buttonClass | string | |
liLinkClass | string | `block py-2 pr-4 pl-3 text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white dark:border-gray-700 dark:hover:bg-gray-700 md:dark:hover:bg-transparent ${textsize}` |