Menu Button
The Menu Button component allows the user to create in-app menu-buttons that navigate through different sections of an application.
import React, { useState } from "react";
import { MenuButton } from "@nimbus-ds/patterns";
import { HomeIcon } from "@nimbus-ds/icons";
const Example: React.FC = () => {
const [active, setActive] = useState(false);
const handleActive = () => setActive(!active);
return (
<MenuButton
label="Menu button"
startIcon={HomeIcon}
onClick={handleActive}
active={active}
/>
);
};
export default Example;
Instalá el componente via terminal.
npm install @nimbus-ds/menubutton
Additional props are passed to the <MenuButton> element. See button docs for a list of props accepted by the <MenuButton> element.