Socket
Socket
Sign inDemoInstall

@chakra-ui/button

Package Overview
Dependencies
Maintainers
4
Versions
456
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/button

A React component that is a base button.


Version published
Weekly downloads
570K
decreased by-4.69%
Maintainers
4
Weekly downloads
 
Created

What is @chakra-ui/button?

@chakra-ui/button is a component from the Chakra UI library that provides a set of accessible, customizable, and composable button components for React applications. It allows developers to create buttons with various styles, sizes, and behaviors easily.

What are @chakra-ui/button's main functionalities?

Basic Button

This code demonstrates how to create a basic button with a blue color scheme using the @chakra-ui/button package.

import { Button } from '@chakra-ui/react';

function App() {
  return <Button colorScheme='blue'>Button</Button>;
}

Button Sizes

This code demonstrates how to create buttons of different sizes (small, medium, and large) using the @chakra-ui/button package.

import { Button } from '@chakra-ui/react';

function App() {
  return (
    <>
      <Button size='sm'>Small</Button>
      <Button size='md'>Medium</Button>
      <Button size='lg'>Large</Button>
    </>
  );
}

Button Variants

This code demonstrates how to create buttons with different variants (solid, outline, and ghost) using the @chakra-ui/button package.

import { Button } from '@chakra-ui/react';

function App() {
  return (
    <>
      <Button variant='solid'>Solid</Button>
      <Button variant='outline'>Outline</Button>
      <Button variant='ghost'>Ghost</Button>
    </>
  );
}

Button with Icon

This code demonstrates how to create a button with an icon using the @chakra-ui/button package.

import { Button } from '@chakra-ui/react';
import { FaArrowRight } from 'react-icons/fa';

function App() {
  return <Button rightIcon={<FaArrowRight />} colorScheme='teal'>Button with Icon</Button>;
}

Other packages similar to @chakra-ui/button

Keywords

FAQs

Package last updated on 13 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc