@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
- react-feather#CheckCircle
- react-feather#AlertCircle
- react-feather#Icon
- react-feather#HelpCircle
- @chakra-ui/react#Box
- @chakra-ui/react#Text
- @chakra-ui/react#BoxProps
- @chakra-ui/react#FlexProps
- @chakra-ui/react#ButtonProps
- @chakra-ui/react#IconButtonProps
- @chakra-ui/react#LinkProps
- @chakra-ui/react#StackProps
- @chakra-ui/react#SelectProps
- @chakra-ui/react#useMultiStyleConfig
- @chakra-ui/react#InputProps
- @chakra-ui/react#AccordionPanelProps
- @chakra-ui/react#ContainerProps
- @chakra-ui/react#AccordionItemProps
- @chakra-ui/react#IconProps
- @chakra-ui/react#HeadingProps
- @chakra-ui/react#ListProps
@chakra-ui/react#TextProps TypeScript Examples
The following examples show how to use
@chakra-ui/react#TextProps.
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: MessagesBlock.tsx From ke with MIT License | 5 votes |
MessagesBlock = ({
messages,
messageType,
messageProps,
messageTextProps,
}: {
messages: (string | JSX.Element)[] | undefined
messageType: string
messageProps?: BoxProps
messageTextProps?: TextProps
}): JSX.Element => {
if (typeof messages === 'undefined') return <></>
const messageColor = messageTypeMapping[messageType]
const messageIcon = messageIconMapping[messageType]
return (
<>
{messages
.filter((message: string | JSX.Element | null) => message !== null)
.map((message: string | JSX.Element, index) => {
const key = index
return (
<Box
bg={messageColor}
key={key}
display="flex"
borderRadius="4px"
justifyContent="center"
p={3}
mt={4}
sx={{
'& + &': {
mt: 2,
},
}}
{...messageProps}
>
<Box as={messageIcon} size="21px" mt="1px" flexShrink={0} />
<Text ml={2} {...messageTextProps}>
{message}
</Text>
</Box>
)
})}
</>
)
}
Example #2
Source File: Body.tsx From website with MIT License | 5 votes |
P: React.FC<JSX.IntrinsicElements['p'] & TextProps> = ({ children, ...rest }) => {
return (
<Text as="p" {...rest}>
{children}
</Text>
)
}