Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
Displays alerts with different statuses using Chakra UI.
import React from 'react';
import { ChakraProvider, Alert, AlertIcon, VStack, extendTheme } from '@chakra-ui/react';
const theme = extendTheme({});
const AlertExample = () => (
<ChakraProvider theme={theme}>
<VStack spacing={4} mt={10} mx='auto' maxW='md'>
<Alert status='success'><AlertIcon />Success Alert</Alert>
<Alert status='error'><AlertIcon />Error Alert</Alert>
<Alert status='warning'><AlertIcon />Warning Alert</Alert>
<Alert status='info'><AlertIcon />Info Alert</Alert>
</VStack>
</ChakraProvider>
);
export default AlertExample;Chakra UI is a modular and accessible React component library that provides a set of composable, themeable, and responsive UI components.
Origin & Creator
Created by Segun Adebayo in 2019 as a modern, developer-friendly React UI library.
Industrial Note
Chakra UI is popular for React projects that need quick prototyping, accessible components, and highly customizable UI without enforcing a specific design system.