@chakra-ui/react APIs
- ChakraProvider
- Flex
- Box
- Button
- Text
- Heading
- Input
- Link
- Stack
- IconButton
- HStack
- Center
- FormLabel
- BoxProps
- useDisclosure
- FormControl
- Image
- extendTheme
- VStack
- PopoverContent
- PopoverTrigger
- Icon
- InputGroup
- ListItem
- Popover
- PopoverBody
- Select
- Grid
- Alert
- Modal
- ModalOverlay
- ModalContent
- ButtonGroup
- PopoverArrow
- Checkbox
- Tag
- Badge
- Tooltip
- SimpleGrid
- Textarea
- ModalBody
- useToast
- Avatar
- PopoverCloseButton
- useColorModeValue
- Menu
- MenuButton
- MenuItem
- MenuList
- Divider
- AlertIcon
- ButtonProps
- ModalHeader
- Spinner
- PopoverHeader
- FormErrorMessage
- Table
- Thead
- Tbody
- Tr
- Th
- Td
- useColorMode
- InputLeftElement
- ColorModeScript
- ModalFooter
- TabList
- Tab
- Drawer
- DrawerContent
- FlexProps
- DrawerOverlay
- DrawerBody
- Switch
- Accordion
- AccordionItem
- AccordionButton
- AccordionPanel
- AccordionIcon
- Slider
- SliderTrack
- SliderFilledTrack
- SliderThumb
- LinkProps
- ModalCloseButton
- Tabs
- TabPanels
- TabPanel
- List
- Container
- UnorderedList
- FormHelperText
- Code
- TagLabel
- Spacer
- GridItem
- DrawerHeader
- theme
- IconButtonProps
- DrawerCloseButton
- Portal
- Skeleton
- NumberInput
- NumberInputField
- NumberInputStepper
- NumberIncrementStepper
- NumberDecrementStepper
- Progress
- Radio
- AlertTitle
- InputLeftAddon
- MenuDivider
- Wrap
- chakra
- StackProps
- useClipboard
- RadioGroup
- Collapse
- AlertDescription
- InputProps
- ListIcon
- PopoverFooter
- InputRightElement
- AlertDialog
- AlertDialogOverlay
- AlertDialogBody
- AlertDialogContent
- AlertDialogFooter
- AlertDialogHeader
- TagCloseButton
- CloseButton
- CircularProgress
- WrapItem
- SlideFade
- createStandaloneToast
- localStorageManager
- Fade
- useMediaQuery
- AspectRatio
- AvatarGroup
- SelectProps
- Breadcrumb
- BreadcrumbItem
- TextProps
- useTheme
- OrderedList
- HeadingProps
- useBoolean
- TableCaption
- ColorModeProvider
- Theme
- BreadcrumbLink
- InputRightAddon
- Tfoot
- TagLeftIcon
- useBreakpointValue
- AccordionPanelProps
- UseToastOptions
- cookieStorageManager
- ContainerProps
- IconProps
- ListProps
- keyframes
- SkeletonText
- LinkBox
- LinkOverlay
- SliderMark
- useOutsideClick
- AlertDialogCloseButton
- CSSReset
- ThemeConfig
- Circle
- forwardRef
- useInterval
- useMultiStyleConfig
- StylesProvider
- CheckboxGroup
- usePrevious
- styled
- useStyles
- IToast
- ComponentStyleConfig
- BackgroundProps
- toast
- PinInput
- PinInputField
- Slide
- useUpdateEffect
- DarkMode
- LightMode
- AvatarBadge
- MenuButtonProps
- AccordionItemProps
- ListItemProps
- Img
- createIcon
- ColorMode
- ComponentWithAs
- VisuallyHidden
- Editable
- EditableInput
- EditablePreview
- DrawerFooter
- useMergeRefs
Other Related APIs
@chakra-ui/react#Circle TypeScript Examples
The following examples show how to use
@chakra-ui/react#Circle.
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: Timeline.tsx From portfolio with MIT License | 6 votes |
TimelineItem: React.FC<TimelineItemProps> = ({
icon = FiCheckCircle,
boxProps = {},
skipTrail = false,
children,
...props
}) => {
const color = useColorModeValue("gray.700", "gray.500");
return (
<Flex minH={20} {...props}>
<Flex flexDir="column" alignItems="center" mr={4} pos="relative">
<Circle
size={12}
bg={useColorModeValue("gray.600", "gray.500")}
opacity={useColorModeValue(0.07, 0.15)}
sx={{}}
/>
<Box
as={icon}
size="1.25rem"
color={color}
pos="absolute"
left="0.875rem"
top="0.875rem"
/>
{!skipTrail && <Box w="1px" flex={1} bg={color} my={1} />}
</Flex>
<Box pt={3} {...boxProps}>
{children}
</Box>
</Flex>
);
}
Example #2
Source File: story-timeline.tsx From portfolio with MIT License | 5 votes |
StoryTimeline: React.FC<StoryTimelineProps> = ({
icon = FiCheckCircle,
boxProps = {},
index,
year,
skipTrail = false,
children,
...props
}) => {
const [isOpen, setIsOpen] = React.useState(true);
const open = () => setIsOpen(!isOpen);
const close = () => setIsOpen(false);
const color = useColorModeValue("gray.700", "gray.200");
let place = index % 2 === 0 ? "right" : "left";
return (
<Flex minH={20} {...props}>
<Flex flexDir="column" alignItems={"center"} minHeight={"8rem"} mr={4}>
<Popover
returnFocusOnClose={false}
isOpen={isOpen}
onClose={close}
placement={place}
closeOnBlur={false}
// variant="responsive"
width={["9.3rem", "13rem", "15rem", "100%"]}
>
<PopoverTrigger>
<Box onClick={open} position="relative">
<Circle
size={12}
bg={useColorModeValue("gray.600", "gray.500")}
opacity={useColorModeValue(0.07, 0.15)}
sx={{}}
/>
{year ? (
<Box
fontSize={15}
fontWeight={"bold"}
color={color}
pos="absolute"
left="0.5rem"
top="0.875rem"
>
{year}
</Box>
) : (
<Box
as={icon}
size="1.25rem"
color={color}
pos="absolute"
left="0.875rem"
top="0.875rem"
/>
)}
</Box>
</PopoverTrigger>
<Box fontSize={15}>
{!year && (
<PopoverContent padding={["0.2rem", "0.2rem", "0.7rem"]}>
<PopoverArrow />
{/* <PopoverCloseButton /> */}
<PopoverBody>
<Box overflow="scroll">{children}</Box>
</PopoverBody>
</PopoverContent>
)}
</Box>
</Popover>
{!skipTrail && <Box w="1px" flex={1} bg={color} />}
</Flex>
</Flex>
);
}