Coder Social home page Coder Social logo

anubra266 / choc-ui Goto Github PK

View Code? Open in Web Editor NEW
1.2K 18.0 74.0 4.49 MB

Prebuilt ⭐⭐⭐⭐⭐ Chakra UI Higher Order Components

Home Page: https://choc-ui.com

License: MIT License

JavaScript 5.38% CSS 0.44% TypeScript 94.18%
chakra-ui chakra component-library react hacktoberfest

choc-ui's Introduction

License Author Made In


About Choc UI

CHOC is acronym for Chakra Higher Order Components. Choc UI is a collection of components, inspired by many sources of well used web components, which are rebuilt based on the Chakra UI library.

Official Documentation

See it in action on Choc-UI's Website.


Components

  • Elements
    • Headers
    • Cards
    • Alerts
    • Pagination
    • Badges
    • Gradient Icons
    • Carousels
    • Empty - Antd, https://readyui.co, razorui.com
    • Result - Antd
    • Extra Components
  • Page Sections
    • Heros
    • Feature Sections
    • CTA Sections
    • Pricing Sections
    • Client Sections - WickedBlocks
    • Content Sections
    • FAQs
    • Newsletter Sections
    • Stats - Kutty, TailwindUI
    • Testimonials
    • Blog Sections -
    • Contact Sections
    • Footers - Meraki UI
    • Logo Clouds
  • Navigation - TailwindUI, Meraki UI
    • Navbars
    • Vertical Navigation (Menus)
    • Sidebar Navigation
  • Headings - TailwindUI
    • Card Headings
    • Section Headings
    • Page Headings
  • Example Pages - Meraki UI, Kutty
    • Landing Pages
    • Contact Pages
    • Error Pages
    • Home Screens
    • Detail Screens
    • Settings Screens
  • Forms Tailwind
    • Form Layouts - Tailwind
    • Sign in and Registration - WickedBlocks
  • Lists Tailwind
    • Tables
    • Stacked Lists
    • Grid Lists
    • Feeds
  • Application Shells
    • Sidebar Layouts
    • Page Layouts - Antd
    • Stacked Layouts - TailwindUI
    • Multi Column Layouts - TailwindUI

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. See Contributing.md

License

Distributed under the MIT License. See LICENSE for more information.

Sponsors ✨

Thanks goes to these wonderful people

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Abraham
Abraham

💻 🎨 🚧
Akinyosoye Gabriel
Akinyosoye Gabriel

🚧
Michael Grigoryan
Michael Grigoryan

💻 🎨
Anu
Anu

💻
Julius Idowu
Julius Idowu

🚧
John McElreavey
John McElreavey

💻
Arnav Jindal
Arnav Jindal

💻
Dipesh Wagle
Dipesh Wagle

💻
Pawel
Pawel

💻
Sufian
Sufian

💻
Ismail D.
Ismail D.

💻
Sammy Fattah
Sammy Fattah

📖
Benson Pan
Benson Pan

💻
Abby
Abby

💻
Jackson Hardaker
Jackson Hardaker

💻
Geeth Gunnampalli
Geeth Gunnampalli

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

choc-ui's People

Contributors

abbyb97 avatar alexanderjmat avatar alimehasin avatar allcontributors[bot] avatar anishde12020 avatar anubra266 avatar buupu avatar daggy1234 avatar dependabot[bot] avatar dipeshwagle avatar geeth24 avatar htinz avatar ismaaa avatar jacksonhardaker avatar jwyce avatar panbenson avatar pszafer avatar sufianbabri avatar vhnam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

choc-ui's Issues

AutoComplete.InputGroup does not respect InputLeftElement

import {
	InputGroup,
	InputLeftElement,
	InputRightElement,
	Icon,
} from '@chakra-ui/react';
import {
	AutoComplete,
	AutoCompleteInput,
	AutoCompleteItem,
	AutoCompleteList,
	AutoCompleteGroup,
	AutoCompleteFixedItem,
  } from '@choc-ui/chakra-autocomplete';
  import { SearchIcon, ChevronRightIcon, ChevronDownIcon } from '@chakra-ui/icons';

const SearchBar = props => {
	const options = ['apple', 'appoint', 'zap', 'cap', 'japan'];
  
	return (
		<AutoComplete rollNavigation>
			{({ isOpen }) => (
				<>
					<InputGroup>
						<InputLeftElement
							pointerEvents="none"
							children={<SearchIcon />}
						/>
						<AutoCompleteInput
							variant="filled"
							placeholder="    Search..."
						/>
						<InputRightElement
							pointerEvents="none"
							children={
								<Icon as={isOpen ? ChevronRightIcon : ChevronDownIcon} />
							}
						/>
					</InputGroup>
					<AutoCompleteList>
						{options.map((option, oid) => (
							<AutoCompleteItem
								key={`optio-${oid}`}
								value={option}
								textTransform="capitalize"
								align="center"
							>
								{option}
							</AutoCompleteItem>
						))}
					</AutoCompleteList>
				</>
			)}
		</AutoComplete>
	);
};

export default SearchBar;

Result is
image

Switch Brand Colors

Is your feature request related to a problem? Please describe.

I just think everyone should see the components in their respective favorite colors

Describe the solution you'd like

A widget that allows changing the brand color

Add Keyboard Navigation to modal search

This code should do it when myself or anyone decides to open a pull request.

const [activeItem,setActiveItem] = useState(0)

const onKeyDown: React.KeyboardEventHandler<HTMLInputElement> = e => {
        //* When Enter is pressed
        if (e.keyCode === 13) {
            openPage(result[activeItem]);
            //* When Up arrow is pressed
        } else if (e.key === 'ArrowUp') {
            if (activeItem === 0) {
                e.preventDefault();
                return;
            }
            setActiveItem((a) => a - 1);
            e.preventDefault();
            //* When Down arrow is pressed
        } else if (e.key === 'ArrowDown') {
            if (activeItem === result.length - 1) {
                return;
            }
            setActiveItem((a) => a + 1);
        }
    };

const onChange = () => {
    ...whateverWasThereBefore
    setActiveItem(0)
}
<Input onKeyDown={onKeyDown} onChange={onChange} />

Warning: React has detected a change in the order of Hooks called by PaginationComp. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks

Hi

I'm using the pagination component with react table, the implementation looks something like this:

<Pagination
  defaultCurrent={initialPageIndex + 1}
  total={totalResults}
  paginationProps={{ display: "flex" }}
  baseStyles={{ bg: "white" }}
  hoverStyles={{ bg: "gray.50" }}
  activeStyles={{ bg: "gray.100" }}
  pageNeighbours={3}
  showTotal={(total) => `Mostrando ${page.length} de ${total} resultados`}
  onChange={(page) => {
    gotoPage(page - 1)
  }}
/>

I'm getting the following warning when I refresh the page:

Warning: React has detected a change in the order of Hooks called by PaginationComp. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks

Great work!

This ui framework is awesome, looking forward to more components :D

How to use the Alerts?

Hello folks,
First, thank you very much for the amazing UI template.
I just have a question about how to implement the Choc UI Alert in a Toast or alert component.
Because Choc UI Alert is wrapped with , so how can I use it as a pop-up alert?
Thanks!

Social Links preview

Is your feature request related to a problem? Please describe.

Sharing links on social media just shows site logo

Describe the solution you'd like
Have a picture for each section that is set with meta tags

Feature Request: An FAQ page section

An FAQ page section that is easy to add, simple, customizable and looks pretty out of the box.

If you want, I can make it myself.

Obviously not exactly like this one, but something inspired from it.

2022-05-20.17-30-04.mp4

.

Site crashes in Firefox with "Hydration failed because the initial UI does not match what was rendered on the server."

In Firefox the site often crashes with a blank page and the error message:

Application error: a client-side exception has occurred (see the browser console for more information).

Here's a screenshot:

Screenshot 2023-10-11 at 9 31 34 AM

When I open the console I see the following message:

Uncaught Error: Minified React error #418; visit https://reactjs.org/docs/error-decoder.html?invariant=418 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

which, if you follow the link, leads to this error message:

Hydration failed because the initial UI does not match what was rendered on the server.

I cleared cookies/site data and that fixed it temporarily. But then I was browsing the site and the error eventually popped up again. A hard refresh fixed it. Then when viewing the CTA page it happened again, but with a different error:

Uncaught TypeError: document.getElementById(...) is null
    getUrlVar https://cdn.carbonads.com/carbon.js?serve=CESDP23M&placement=choc-uitech:1
    init https://cdn.carbonads.com/carbon.js?serve=CESDP23M&placement=choc-uitech:1
    <anonymous> https://cdn.carbonads.com/carbon.js?serve=CESDP23M&placement=choc-uitech:1
[carbon.js:1:9445](https://cdn.carbonads.com/carbon.js?serve=CESDP23M&placement=choc-uitech)

Console logs are here: console-export-2023-10-11_9-38-8.txt

I'm don't have a lot of experience with NextJS so I'm not entirely sure how to best troubleshoot. I tried with a "clean" Firefox profile (no extensions or anything additional installed) and saw the same behavior.

Feature Request: replace react-icons with react-feather

Description

I can't tell, if it is causing my display issues, but 5 year old deprecation errors overloading logs could easily break in the next React v19, if not already.

Problem Statement/Justification

react-icons keeps throwing deprecation warnings.
Visiting issues on their github repo shows that this is a problem that's overwhelmed the new maintainer for years.
See navbar components for example of this problem.

Proposed Solution or API

I gave up on trying a few SVG libs for React.
Just dropping in https://github.com/feathericons/react-feather worked fast & easy.
Works with React v18, and MIT license.
Updates could be better, but are better than react-icons, with fewer open issues.
No tree shaking needed! Early performance check looks great.

Alternatives

  • css.gg
  • icomoon

Strange behavior on the carousels component

In order to see this 'bug', go to the Choc UI docs, to the carousel showcase. Then click the left arrow to see what happends (you go from the first element on the carousel to the last one). If you click again on the same arrow, it will go back to the first element on the carrousel instead of the penultimate one.

Feature Request - Footer

Hey @anubra266 , This looks like an awesome initiative I think the collection deserves an attractive footer I am thinking of adding something like this let me know if I should work on this I ll add some extra changes as well along with light and dark theming
footer

Adding a Snackbar

Hey I recently was able to create a toast that resembles android snackbar I think it can give a PWA made using chakra-ui a native like experience, should I create a PR for the same?

Pagination buttons focus ring

When using TAB to navigate the page, pagination buttons focus is not shown (the blue-ish ring around focused button).
That is a major accessibility issue and should be enabled (or maybe introduce a prop to define on demand)

Thank you in advance, great work!

Meta Tags

Is your feature request related to a problem? Please describe.

The SIte should be well presented when links are shared

Describe the solution you'd like
Add description and og:image meta tags for all components

[x] Elements

IconButton Badge

Is your feature request related to a problem? Please describe.

Please describe the problem you are trying to solve.
Badges in Buttons

Describe the solution you'd like

Please describe the desired behavior.
IconButton Badge
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.