@chakra-ui/core APIs
- Text
- Heading
- Box
- Button
- Flex
- Stack
- useDisclosure
- Link
- ThemeProvider
- Spinner
- Input
- CSSReset
- IconButton
- InputGroup
- Badge
- Modal
- ModalOverlay
- ModalContent
- ModalCloseButton
- ModalBody
- theme
- List
- ListItem
- FormControl
- Icon
- Avatar
- PseudoBox
- AccordionIcon
- AccordionItem
- AccordionPanel
- ModalHeader
- ChakraProvider
- FormLabel
- FormErrorMessage
- InputRightElement
- Image
- Select
- Tooltip
- Alert
- AlertDescription
- Textarea
- InputLeftElement
- Menu
- ModalFooter
- SimpleGrid
- AccordionHeader
- AspectRatioBox
- useToast
- useColorMode
- useColorModeValue
- Drawer
- DrawerOverlay
- DrawerContent
- DrawerBody
- Accordion
- FormHelperText
- Radio
- AlertDialog
- AlertDialogBody
- AlertDialogFooter
- AlertDialogHeader
- AlertDialogContent
- AlertDialogOverlay
- CheckboxGroup
- Checkbox
- RadioButtonGroup
- MenuButton
- MenuOptionGroup
- MenuItemOption
- MenuList
- MenuItem
- Progress
- extendTheme
- DarkMode
- DrawerCloseButton
- css
- Grid
- SlideIn
- Tabs
- TabList
- Tab
- Slider
- SliderTrack
- SliderFilledTrack
- SliderThumb
- Divider
- Popover
- PopoverTrigger
- PopoverContent
- PopoverBody
- VStack
- Breadcrumb
- BreadcrumbItem
- BreadcrumbLink
- AlertIcon
- AlertTitle
- Stat
- StatLabel
- StatNumber
- StatHelpText
- StatGroup
OtherRelated APIs
- @chakra-ui/core#Button
- @chakra-ui/core#Flex
- @chakra-ui/core#Stack
- @chakra-ui/core#Link
- @chakra-ui/core#useDisclosure
- @chakra-ui/core#IconButton
- @chakra-ui/core#DarkMode
- @chakra-ui/core#Drawer
- @chakra-ui/core#DrawerOverlay
- @chakra-ui/core#DrawerContent
- @chakra-ui/core#DrawerCloseButton
- @chakra-ui/core#DrawerBody
@chakra-ui/core#css JavaScript Examples
The following examples show how to use
@chakra-ui/core#css.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: header.js From covid-19-website with MIT License | 5 votes |
Header = () => {
const { isOpen, onOpen, onClose } = useDisclosure()
return (
<Flex
as="header"
backgroundColor="white"
paddingX={["1rem", "4.5rem"]}
paddingY={[1,6]}
justifyContent="space-between"
alignItems="center"
>
<GatsbyLink to="/">
<Code4Covid width={200}/>
</GatsbyLink>
<IconButton
display={["block", "block", "block", "block", "none"]} // Match this with the inverse of the buttons stack to use Chakra breakpoints
variant="ghost"
size="lg"
aria-label="Navigation Button"
icon="menu"
onClick={onOpen}
/>
<Drawer isOpen={isOpen} placement="right" onClose={onClose}>
<DrawerOverlay />
<DarkMode>
<DrawerContent backgroundColor="gray.700" color="white">
<DrawerCloseButton />
<DrawerBody>
<Stack as="nav" direction="column" marginTop={16} spacing={8}>
{PAGES.map(page => (
<NavLink
key={page.children + page.to}
fontSize={28}
color="white"
css={css`
[aria-current]& {
font-weight: 700;
}
`}
{...page}
/>
))}
<Link textAlign="center" href="https://twitter.com/code4covid" isExternal>
<TwitterIcon width="40px" style={{ display: "inline-block" }} />
</Link>
</Stack>
</DrawerBody>
</DrawerContent>
</DarkMode>
</Drawer>
</Flex>
)
}