@chakra-ui/react APIs
- Button
- Box
- ChakraProvider
- Text
- Flex
- Input
- Stack
- useDisclosure
- ModalOverlay
- ModalContent
- ModalBody
- Image
- Modal
- ModalCloseButton
- Heading
- IconButton
- ModalHeader
- extendTheme
- HStack
- Link
- Divider
- Tooltip
- SimpleGrid
- Spinner
- ModalFooter
- Center
- Table
- FormControl
- FormLabel
- useToast
- useColorMode
- InputGroup
- VStack
- Icon
- Select
- Menu
- MenuButton
- MenuList
- MenuItem
- Badge
- ListItem
- Thead
- Tr
- Th
- Tbody
- Td
- Container
- Alert
- useColorModeValue
- Spacer
- Tabs
- TabList
- Tab
- TabPanels
- TabPanel
- Skeleton
- Tag
- Avatar
- Textarea
- SkeletonText
- InputLeftElement
- Grid
- DrawerBody
- DrawerContent
- DrawerCloseButton
- DrawerHeader
- DrawerOverlay
- AspectRatio
- theme
- SkeletonCircle
- UnorderedList
- Code
- ButtonGroup
- PopoverTrigger
- Popover
- PopoverContent
- PopoverBody
- CSSReset
- Drawer
- DrawerFooter
- List
- FormHelperText
- InputRightElement
- Collapse
- AlertIcon
- Switch
- Stat
- StatLabel
- StatNumber
- ColorModeScript
- useClipboard
- Checkbox
- LinkBox
- LinkOverlay
- PopoverArrow
- PopoverHeader
- useTheme
- InputRightAddon
- keyframes
- useBreakpointValue
- StackDivider
- SliderTrack
- SliderFilledTrack
- SliderThumb
- Radio
- RadioGroup
- StatGroup
- OrderedList
- MenuDivider
- FormErrorMessage
- CloseButton
- useMediaQuery
- AlertTitle
- AlertDescription
- Accordion
- AccordionItem
- AccordionButton
- AccordionIcon
- AccordionPanel
- PopoverCloseButton
- GridItem
- ThemeProvider
- Progress
- useRadio
- useRadioGroup
- useBreakpoint
- Slider
- CircularProgress
- ColorModeProvider
- cookieStorageManager
- localStorageManager
- useBoolean
- AlertDialog
- AlertDialogBody
- AlertDialogCloseButton
- AlertDialogContent
- AlertDialogFooter
- AlertDialogHeader
- AlertDialogOverlay
- NumberInputField
- NumberInput
- useTab
- FormErrorIcon
- VisuallyHiddenInput
- Portal
- useToken
- useInterval
- VisuallyHidden
- Wrap
- WrapItem
- createIcon
- PopoverFooter
- AvatarBadge
- chakra
- forwardRef
- TableCaption
- Breadcrumb
- Kbd
- createStandaloneToast
OtherRelated APIs
@chakra-ui/react#StatGroup JavaScript Examples
The following examples show how to use
@chakra-ui/react#StatGroup.
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: StatBox.js From benjamincarlson.io with MIT License | 6 votes |
export default function StatBox({ title, desc, url }) {
const { colorMode } = useColorMode()
const borderColor = {
light: '#CBD5E0',
dark: '#4A5568',
}
const [opacity, setOpacity] = useState(0)
return (
<Link
href={url}
isExternal
_hover={{
textDecoration: 'none'
}}
onMouseOver={() => setOpacity(1)}
onMouseLeave={() => setOpacity(0)}
>
<Box p={2} pb={[2, 1, 1]}>
<StatGroup border={`1px solid ${borderColor[colorMode]}`} borderRadius={5} p={2} w="100%">
<Stat>
<Flex
align="center"
justifyContent="space-between"
>
<StatLabel>{desc}</StatLabel>
<ExternalLinkIcon opacity={opacity} />
</Flex>
<StatNumber>{title}</StatNumber>
</Stat>
</StatGroup>
</Box>
</Link>
)
}
Example #2
Source File: UsagePage.js From web-client with Apache License 2.0 | 6 votes |
SystemUsagePage = () => {
const [usage] = useFetch('/system/usage');
if (!usage) return <Loading />
return <div>
<div className='heading'>
<Breadcrumb />
</div>
<Title type="System" title="Usage" icon={<IconDownloadDocument />} />
<StatGroup>
<Stat>
<StatLabel>Attachments count</StatLabel>
<StatNumber>{usage.attachments.total_count} total</StatNumber>
</Stat>
<Stat>
<StatLabel>Attachments total disk usage</StatLabel>
<StatNumber><FileSizeSpan fileSize={usage.attachments.total_file_size} /></StatNumber>
</Stat>
</StatGroup>
</div>
}