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

github.com/buttercup/ui

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/buttercup/ui

  • v6.4.2+incompatible
  • Source
  • Go
  • Socket score

Version published
Created
Source

Buttercup UI Components

Buttercup npm version Build Status

React UI Components used in Buttercup product series.

Preview Components

npm install
npm run storybook

Then head to http://localhost:6006/.

Use Components

yarn add @buttercup/ui
# or
npm install @buttercup/ui --save
import { Button } from '@buttercup/ui';

const MyComponent = () => (
  <Button danger>Delete</Button>
);

Available Components

Password generator

The password generator comes bundled in a popover, which can be used like so:

import { Generator } from "@buttercup/ui";

const Comp = () => (
  <Generator
    onGenerate={handleGenerated}
    isOpen={isOpen}
  >
    <div>
      <Button onClick={toggleGenerator}>
        Generate Password
      </Button>
    </div>
  </Generator>
);

If you just require the body of the generator, you can import GeneratorUserInterface instead.

Password Strength Indicator

The indicator can be used like so:

import { Meter } from "@buttercup/ui";

const Comp = () => (
  <Meter input={inputValue} />
);

Button

Available as Button.

TBA.

Input

Available as Input.

TBA.

Center

Available as Center.

TBA.

SmallType

Available as SmallType.

TBA.

Translations / i18n

Parts of this UI library are internationalised. You can find the translations at src/i18n/translations. When adding new translations, make sure to update the index at src/i18n/translations/index.js so that the language is made available.

To change the language, import changeLanguage and call it with a 2-character language code, such as en.

Testing

Run npm t to execute the tests.

To update component snapshots run npm run test:updateSnapshots.

FAQs

Package last updated on 30 Mar 2024

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