Skip to content

bjoluc/next-chakra-ui

Repository files navigation

next-chakra-ui

npm (tag) GitHub Workflow Status codecov XO code style semantic-release

Chakra UI React components for Next.js (currently only link components)

Motivation

In order for Chakra UI links to work in Next.js projects, they need to be wrapped in the next/link component. This package exports Chakra UI Link components that works as next/links (so I don't ever copy-paste link components between projects again). If you have ideas for other helpful (non-opinionated) components, feel free to contribute them!

Installation

npm install next-chakra-ui

Components

  • Link: A Chakra UI Link component wrapped in a next/link
  • LinkButton: A Chakra UI Button component wrapped in a next/link. It renders an HTML anchor element without composing Chakra UI's Link, so the button styling remains untouched.
  • LinkIconButton: A Chakra UI IconButton component wrapped in a next/link. It renders an HTML anchor element without composing Chakra UI's Link, so the button styling remains untouched.