Navigation
Header#
<Flex bg="indigo.800" color="#fff" p={3} alignItems="center"><FlexfontWeight="bold"color="#fff"m={0}fontSize="xl"mr={3}minWidth="initial"flex="0 0 auto">Minerva</Flex><FlexflexGrow={1}flex={1}width="auto"alignItems="stretch"minWidth="initial"overflowX="auto"><Linkdisplay="flex"minWidth="initial"href="#"color="indigo.200"_hover={{ color: '#fff' }}px={1}>About</Link><Linkdisplay="flex"minWidth="initial"href="#"color="indigo.200"_hover={{ color: '#fff' }}px={1}>Docs</Link><Linkdisplay="flex"minWidth="initial"href="#"color="indigo.200"_hover={{ color: '#fff' }}px={1}>Examples</Link><Linkdisplay="flex"minWidth="initial"href="#"color="indigo.200"_hover={{ color: '#fff' }}px={1}>Contact</Link></Flex></Flex>
Dashboard Header with Profile Dropdown#
Minerva UI
() => {return (<Flexbg="indigo.800"color="#fff"px={5}py={3}justifyContent="space-between"alignItems="center"><Text fontWeight="bold" color="#fff" m={0} fontSize="xl" mr={6}>Minerva UI</Text><Box><MenuContainer><MenuButtonp={2}backgroundColor="transparent"border={0}display="flex"alignItems="center"_hover={{ bg: 'indigo.900' }}><Text color="white">Dave</Text><Imagesrc="https://tailwindcss.com/img/jonathan.jpg"alt="profile-picture"maxWidth="30px"border="2px solid #fff"borderRadius="full"ml={2}/></MenuButton><MenuList menuPosition="right"><MenuItem onSelect={() => alert('Edit Profile')}>Edit Profile</MenuItem><MenuItem onSelect={() => alert('Settings')}>Settings</MenuItem><MenuDivider /><MenuLink href="https://minerva-ui-docs.vercel.app/">Log Out</MenuLink></MenuList></MenuContainer></Box></Flex>);};
Mobile Header with Drawer#
Minerva UI
() => {const { isOpen, onOpen, onClose } = useDisclosure();return (<Flexbg="indigo.800"color="#fff"p={6}justifyContent="space-between"alignItems="center"><Text fontWeight="bold" color="#fff" m={0} fontSize="xl" mr={6}>Minerva UI</Text><Box><ButtononClick={onOpen}padding={1}bg="transparent"type="button"border={0}_active={{bg: 'indigo.900',}}_hover={{bg: 'indigo.900',}}><Icon name="menu" size="26px" color="#fff" /></Button></Box><DrawerisOpen={isOpen}onClose={onClose}placement="right"overflow="hidden"><DrawerHeader onClose={onClose}>Minerva UI</DrawerHeader><DrawerBody><Flex justifyContent="flex-start" flexDirection="column" flexGrow={1}><Linkhref="#"color="indigo.700"_hover={{ color: 'indigo.800' }}mr={4}>Docs</Link><Linkhref="#"color="indigo.700"_hover={{ color: 'indigo.800' }}mr={4}>Examples</Link><Linkhref="#"color="indigo.700"_hover={{ color: 'indigo.800' }}mr={4}>Blog</Link></Flex></DrawerBody><DrawerFooter bg="gray.50"><Flexpx={6}py={3}flexDirection={['column', 'row-reverse']}bg="gray.50"radiusBottom="5px"><Button onClick={onClose} boxShadow="base" width={['100%', 'auto']}>Submit</Button></Flex></DrawerFooter></Drawer></Flex>);};