Fusion UI LogoFusion UI Logo
Fusion UI LogoFusion UI Logo
/
Getting Started
Concepts
Components
Example Apps
Getting Started
Concepts
Components
Example Apps
Fusion UI LogoFusion UI Logo
Getting Started
Concepts
Components
Example Apps
Overview
Actions
Button
Button Group
Segmented Button
Deprecated
Split Button
Toggle Button
Click To Copy
Toolbar
Navigation
Main Nav
Side Menu
Page Header
Tabs
Breadcrumbs
On-Page Menu
Link
Command Menu
Application Switcher
Context Switcher
Account Menu
Menu Bar
Deprecated
Inputs & Forms
Form
Form Actions
Deprecated
Form Divider
Form Field
Form Repeat
Form Spacing
Input
Prefix & Suffix
Rich Text Input
Autocomplete
Select
Date / Time Input
Calendar
Slider
Selection
Checkbox
Radio
Switch
Switch Select
Chip
Chip Choice
Chip Filter
Chip Input
Chip Sortable
Visual Select
Pricing Plan Select
Feedback & Loading
Banner
Inline Message
Snackbar
Inline Snackbar
Loading Spinner
Skeleton
Text Skeleton
Contextual Information
Badge
Status
Tag
Tooltip
Info
Hotkey
Icon
Icon Sizer
Containers & Overlays
Tile
Tile Content
Tile Footer
Tile Header
Annotated Section
Modal
Sheet
Popover
Context Menu
Data Display
Data Table
List
Timeline
Data Visualization
KPI Card
Ratio Card
Bar Chart
Line Chart
Pie Chart
Heatmap Calendar
Layout
Container
Stack Layout
Flow Layout
Internals
Blanket
Expansion Panel
Menu List Base
Menu Group
Search Bar
Components
...
Account Menu

Account Menu

Avatar menu with the signed in account, its settings and sign out.

Sections and footer

The AccountMenu is an avatar that opens a menu with the account and its actions, as a plain list or in sections with titles. AccountMenuFooter places custom components like a theme toggle at the bottom. With a mouse it opens as a popover, on touch screens as a bottom sheet, independent of the screen size.

"use client";
import {
AccountMenu,
AccountMenuFooter,
IconLogoutBoxR,
IconSettings,
IconUserSettings,
MainNavPlacementProvider,
} from "@brynlabs/fusion-ui";
import React from "react";
import {DarkModeToggle} from "@/components/dark-mode-toggle/dark-mode-toggle";
export const AccountMenuExample = () => (
<AccountMenu
accountImage="https://i.pravatar.cc/300"
name="John Doe"
email="john@example.com"
accountActions={[
{
title: "Account",
items: [
{
title: "Profil bearbeiten",
icon: <IconUserSettings />,
callback: () => alert("Profil bearbeiten"),
},
{
title: "Einstellungen",
icon: <IconSettings />,
callback: () => alert("Einstellungen"),
},
],
},
{
items: [
{
title: "Abmelden",
icon: <IconLogoutBoxR />,
callback: () => alert("Abmelden"),
},
],
},
]}>
<AccountMenuFooter>
<span className="small-font">Theme</span>
<DarkModeToggle />
</AccountMenuFooter>
</AccountMenu>
);
export const AccountMenuInitialsExample = () => (
<AccountMenu
name="Max Mustermann"
email="max.mustermann@muster.com"
accountActions={[{title: "Abmelden", icon: <IconLogoutBoxR />, href: "/"}]}
/>
);
export const AccountMenuExtendedExample = () => (
// Inside the side menu of a MainNavView the placement is provided automatically.
<MainNavPlacementProvider placement={"menu"}>
<div style={{maxWidth: 300}}>
<AccountMenu
accountImage="https://i.pravatar.cc/300"
name="John Doe"
email="john@example.com"
accountActions={[
{title: "Profil bearbeiten", icon: <IconUserSettings />, href: "/"},
{title: "Abmelden", icon: <IconLogoutBoxR />, href: "/"},
]}
/>
</div>
</MainNavPlacementProvider>
);

Initials

Without an image, the avatar shows the initials of the name.

"use client";
import {
AccountMenu,
AccountMenuFooter,
IconLogoutBoxR,
IconSettings,
IconUserSettings,
MainNavPlacementProvider,
} from "@brynlabs/fusion-ui";
import React from "react";
import {DarkModeToggle} from "@/components/dark-mode-toggle/dark-mode-toggle";
export const AccountMenuExample = () => (
<AccountMenu
accountImage="https://i.pravatar.cc/300"
name="John Doe"
email="john@example.com"
accountActions={[
{
title: "Account",
items: [
{
title: "Profil bearbeiten",
icon: <IconUserSettings />,
callback: () => alert("Profil bearbeiten"),
},
{
title: "Einstellungen",
icon: <IconSettings />,
callback: () => alert("Einstellungen"),
},
],
},
{
items: [
{
title: "Abmelden",
icon: <IconLogoutBoxR />,
callback: () => alert("Abmelden"),
},
],
},
]}>
<AccountMenuFooter>
<span className="small-font">Theme</span>
<DarkModeToggle />
</AccountMenuFooter>
</AccountMenu>
);
export const AccountMenuInitialsExample = () => (
<AccountMenu
name="Max Mustermann"
email="max.mustermann@muster.com"
accountActions={[{title: "Abmelden", icon: <IconLogoutBoxR />, href: "/"}]}
/>
);
export const AccountMenuExtendedExample = () => (
// Inside the side menu of a MainNavView the placement is provided automatically.
<MainNavPlacementProvider placement={"menu"}>
<div style={{maxWidth: 300}}>
<AccountMenu
accountImage="https://i.pravatar.cc/300"
name="John Doe"
email="john@example.com"
accountActions={[
{title: "Profil bearbeiten", icon: <IconUserSettings />, href: "/"},
{title: "Abmelden", icon: <IconLogoutBoxR />, href: "/"},
]}
/>
</div>
</MainNavPlacementProvider>
);

Extended trigger

In the side menu of a MainNavView, the account is a row with avatar, name and email. It opens the same popover or bottom sheet.

"use client";
import {
AccountMenu,
AccountMenuFooter,
IconLogoutBoxR,
IconSettings,
IconUserSettings,
MainNavPlacementProvider,
} from "@brynlabs/fusion-ui";
import React from "react";
import {DarkModeToggle} from "@/components/dark-mode-toggle/dark-mode-toggle";
export const AccountMenuExample = () => (
<AccountMenu
accountImage="https://i.pravatar.cc/300"
name="John Doe"
email="john@example.com"
accountActions={[
{
title: "Account",
items: [
{
title: "Profil bearbeiten",
icon: <IconUserSettings />,
callback: () => alert("Profil bearbeiten"),
},
{
title: "Einstellungen",
icon: <IconSettings />,
callback: () => alert("Einstellungen"),
},
],
},
{
items: [
{
title: "Abmelden",
icon: <IconLogoutBoxR />,
callback: () => alert("Abmelden"),
},
],
},
]}>
<AccountMenuFooter>
<span className="small-font">Theme</span>
<DarkModeToggle />
</AccountMenuFooter>
</AccountMenu>
);
export const AccountMenuInitialsExample = () => (
<AccountMenu
name="Max Mustermann"
email="max.mustermann@muster.com"
accountActions={[{title: "Abmelden", icon: <IconLogoutBoxR />, href: "/"}]}
/>
);
export const AccountMenuExtendedExample = () => (
// Inside the side menu of a MainNavView the placement is provided automatically.
<MainNavPlacementProvider placement={"menu"}>
<div style={{maxWidth: 300}}>
<AccountMenu
accountImage="https://i.pravatar.cc/300"
name="John Doe"
email="john@example.com"
accountActions={[
{title: "Profil bearbeiten", icon: <IconUserSettings />, href: "/"},
{title: "Abmelden", icon: <IconLogoutBoxR />, href: "/"},
]}
/>
</div>
</MainNavPlacementProvider>
);
On this page
  • Sections and footer
  • Initials
  • Extended trigger