Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vtex-components/button

Package Overview
Dependencies
Maintainers
5
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vtex-components/button

Elementary accessible button component that can be reused by all VTEX Styleguides. You can use reakit full features (except the 'as' prop) and theme-ui's sx. It renders a button element by default.

  • 1.3.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
5
Weekly downloads
 
Created
Source

VTEX Components Button

Elementary accessible button component that can be reused by all VTEX Styleguides. You can use reakit full features (except the 'as' prop) and theme-ui's sx. It renders a button element by default.

This is a styled base component, so any Styleguide can theme it. You may configure your components.button property of the theme object (check the theming section).

Install

yarn add @vtex-components/button

or

npm install @vtex-components/button

Usage

import Button from '@vtex-components/button'

function UseCase() {
  return <Button>VTEX Components Button</Button>
}

🎨 Theming

ModifierDescription
stylesbase styles
variantbutton variants
sizemeasures in general

Example

You can define the theme with:

const theme = {
  components: {
    button: {
      styles: {
        ':focus': {
          outline: 'none',
          boxShadow: '0px 0px 1px 0px solid #cecece'
        }
      },
      variant: {
        primary: {
          bg: 'primary',
          color: 'white',
        },
        secondary: {
          bg: 'secondary',
          color: 'black',
        },
      },
      size: {
        small: {
          paddingY: 1
          paddingX: 2
        },
        regular: {
          paddingY: 2
          paddingX: 3
        },
      },
    },
  },
}

Then use the Button:

<Button variant="primary" size="small">
  Small Primary Button
</Button>

FAQs

Package last updated on 27 Aug 2021

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