

a Heading with as="h1" and size="3xl" with Text "Bamboozled" Render a Center with h="100vh" and a VStack with no props. We fetch true or false questions from the Open Trivia API, let the user answer and at the end we display the score of correctly answered questions.įirst: Let's render the index.tsx or the home page. GitHub Copilot and I created a minimal quiz app.
Chakra ui vstack code#
GitHub Let's Have a Look at the Generated Code Trained on billions of lines of public code, GitHub Copilot puts the knowledge you need at your fingertips, saving you time and helping you stay focused. It is important to note the difference between the auto-completion provided by your IDE and the one provided by Copilot: your IDE provides suggestions from locally indexed code while Copilot is capable of creating completely new output from the code it has learned from public repos. But what makes Copilot so unique is that it suggests auto-completions on the fly. It’s an AI-powered tool that can write code by itself, generating quite impressive programming functions, comments and more based on your directions. GitHub Copilot is " your AI pair programmer". Please note: Copilot is currently not available publicly, so if you want to test and review it, you have to join the waitlist. Check out our app Bamboozled, a minimal quiz ( find the repository here). I hope this article has convinced you to try out Chakra ) Btw, I am NOT sponsored by them in any way, I just feel it’s a really awesome tool so if you do like it, please do drop a star in their Github repo.I got my invitation to the technical preview of GitHub Copilot two days ago and have been pair programming a bit with my new AI buddy. And I know Tailwind UI exists, but again it doesn’t really focus on the functional aspect of things.Ī more detailed comparison for Tailwind and other libraries like Material UI and Ant Design can be found in their docs: Personally, I prefer using Chakra UI as it's easier to use with its in-built components rather than styling them all myself. Tailwind can be used with other frameworks like Angular, Vue, Svelte, etc., but Chakra only has support for React and other React-based libraries like Next, Redwood, Remix, etc. Writing responsive styles and styling, in general, is pretty similar to vanilla CSS, which I don't like, but many love the simplicity of Tailwind. But this means that you will obviously be losing out on customization when compared to Tailwind, but I am fine with that. Meanwhile, Chakra focuses more on being a UI library, with all the styling and other related functionality taken care of. Tailwind focuses on styling, which means you’ll have to handle a lot of stuff like accessibility, keyboard navigation, etc. In fact, I barely remember having to google anything while working with Chakra since everything was in the docs. It has editable examples which are really useful to do some quick tinkering. The documentation for Chakra UI is thorough and easy to understand, with everything you could possibly need during development.

The default color theme can be changed by extending the main theme object and you can also modify other Chakra components like the Button etc. I’m a complete TypeScript simp and Chakra comes with built-in type definitions so it has great autocomplete in VSCode and other such editors.Ĭhakra UI also comes with responsive styles out of the box, where you can use objects and array values to provide specific styles for different breakpoints, which in my opinion is way cleaner than using media queries.

There are also various shorthands you can use to style faster like mt for margin-top, w for width, h for height, etc. picks up a nested color value using dot notation // => `` sets margin `8px` on all viewports and `12px` from the first breakpoint and up Take a look at this bit of code: function Example( ) refers to the value of `theme.space` Easy Dark/Light ModeĬhakra offers a design system built for both light and dark modes and a seamless way of transitioning between them. The reason I started using Chakra UI was because of a few really fundamental features that Chakra offers: 1. In this article, I’m gonna go over its selling features and how it compares to one of its key alternatives- Tailwind CSS. It consists of a plethora of components that you can use as building blocks for a beautiful and responsive front end. Chakra UI is an absolutely amazing UI library built for React.
