Menu
A menu displays a list of actions or options that a user can choose.
Installation
Install via VScode or copy and paste the code below into a new file, preferably in a folder at components/base.
BaseLayer
Examples
Default
bl-menu
import { Button } from "@/components/base/button";
import {
MenuConent,
MenuHeader,
MenuItem,
MenuSeperator,
MenuTrigger,
Section,
} from "@/components/base/menu";
import {
CreditCard,
HelpCircle,
LogOut,
Plus,
Settings,
User,
} from "lucide-react";
export const Menu = () => {
return (
<MenuTrigger>
<Button
intent="secondary"
className="h-full rounded-full p-4 text-xl"
state="outline"
>
Me
</Button>
<MenuConent>
<Section>
<MenuHeader className="text-fg-4">me@hello.com</MenuHeader>
</Section>
<MenuSeperator className="mt-0" />
<MenuItem>
Account Settings
<Settings />
</MenuItem>
<MenuItem>
Billing
<CreditCard />
</MenuItem>
<MenuItem>
Create a Team
<Plus />
</MenuItem>
<MenuItem>
Invite Member
<User />
</MenuItem>
<MenuSeperator />
<MenuItem>
Support
<HelpCircle />
</MenuItem>
<MenuItem>
Logout
<LogOut />
</MenuItem>
</MenuConent>
</MenuTrigger>
);
};
Simple
bl-menu-simple
import { Button } from "@/components/base/button";
import { MenuConent, MenuItem, MenuTrigger } from "@/components/base/menu";
export const MenuSimple = () => {
return (
<MenuTrigger>
<Button intent="secondary">Edit</Button>
<MenuConent>
<MenuItem>Cut</MenuItem>
<MenuItem>Copy</MenuItem>
<MenuItem>Paste</MenuItem>
</MenuConent>
</MenuTrigger>
);
};