New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lightspeed/cirrus-button

Package Overview
Dependencies
Maintainers
3
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightspeed/cirrus-button

Cirrus Button Component

  • 2.0.7
  • npm
  • Socket score

Version published
Weekly downloads
96
decreased by-10.28%
Maintainers
3
Weekly downloads
 
Created
Source

Button

The most essential element of a user interface.

Installation

First, make sure you have been through the Getting Started steps of adding Cirrus in your application.

If using Yarn:

yarn add @lightspeed/cirrus-button

Or using npm:

npm i -S @lightspeed/cirrus-button

Usage

Import required styles in your .scss:

@import '@lightspeed/cirrus-button/Button.css';

React Component

Props
PropTypeDescription
childrenReact.ReactNodeThe content to display inside the button
primarybooleanDisplays as success button
secondarybooleanDisplays as secondary button
dangerbooleanDisplays as danger button
fillbooleanDisplays as fill button
sizeenum['small', 'large', 'xlarge']Sets the size of the button
blockbooleanDisplays the button in full width
disabledbooleanDisables the button
onClickfunctionCallback when button is clicked
onFocusfunctionCallback when button is focused
onBlurfunctionCallback when button is blurred
Example
import React from 'react';
import Button from '@lightspeed/cirrus-button';

const MyComponent = () =>
  <div>
    <Button>My Button</Button>
  </div>;

export default MyComponent;

CSS Component

Classes

Besides the base class .cr-button you can use one of these classes:

TypeClass
primary.cr-button--primary
secondary.cr-button--secondary
danger.cr-button--danger
fill.cr-button--fill
block.cr-button--block
small.cr-button--small
large.cr-button--large
xlarge.cr-button--xlarge
disabled.disabled
Example
<button type="button" class="cr-button">My Button</button>

FAQs

Package last updated on 25 Oct 2017

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