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

@cerebroapp/cerebro-ui

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cerebroapp/cerebro-ui

Package with common UI components for Cerebro plugins

  • 2.0.0-alpha.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
decreased by-38.89%
Maintainers
3
Weekly downloads
 
Created
Source

cerebro-ui

It is UI components library for Cerebro app plugins

Components

This package contains main UI elements that you need to use in your plugin previews:

Keyboard navigation lists

This component used to build lists with keyboard navigation:

  • Arrows and ctrl+j/k used to select next or previous item;
  • enter or o used to select item;
  • and esc used to move selection back to main results list;
import { KeyboardNav, KeyboardNavItem } from 'cerebro-ui'

const Preview = ({ items, onSelect }) => (
  <KeyboardNav>
    <ul className={styles.list}>
    {
      items.map(s => (
        <KeyboardNavItem key={s} onSelect={() => onSelect(item)}>
          {item}
        </KeyboardNavItem>
      ))
    }
    </ul>
  </KeyboardNav>
)

Loading

For consistence, it is recommended to use one loading spinner component in all plugins:

import { Loading } from 'cerebro-ui'

const Preview = ({ isLoading }) => (
  isLoading ? <Loading /> : <MyPluginPreview />
)

Form elements

import { Button, Checkbox, Select, Text } from 'cerebro-ui/Form'
  • Cerebro – main repo for Cerebro app;

License

MIT © CerebroApp

Keywords

FAQs

Package last updated on 20 Feb 2023

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