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

lucid

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lucid

A UI component library from AppNexus.

  • 2.21.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
53
decreased by-14.52%
Maintainers
1
Weekly downloads
 
Created
Source

Lucid Build Status codecov Stories in Ready

A UI component library from AppNexus.

Install

Lucid can be installed with npm.

npm install --save lucid-ui

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import Button from 'lucid-ui/Button';
// `import { Button } from 'lucid-ui'` also works but will result in larger bundle sizes

ReactDOM.render(
  <Button>Hello World</Button>,
  mountNode
);

Lucid uses less for its stylesheets. If you use less, you can include the styles like so:

@import "node_modules/lucid-ui/src/index.less";

If you don't use less, you can use the precompiled css file node_modules/lucid-ui/dist/index.css.

Dependencies

lucid-ui has several React peer dependencies. This means your application is responsible for declaring dependencies on compatible versions. Currently we support React 15.

Example package.json:

{
  "dependencies": {
    "lucid-ui": "^2.0.0",
    "react": "^15.0.0",
    "react-dom": "^15.0.0",
    "react-addons-css-transition-group": "^15.0.0"
  }
}

To contribute to lucid, please see CONTRIBUTING.md.

Reducing bundle size

Path imports

If you're starting a new project it's best to simply import all your components by their paths. This will make sure that only the components you need will be included in your bundle:

import Button from 'lucid-ui/Button';
import DataTable from 'lucid-ui/DataTable';
Babel plugin

If you have an existing project using lucid you should consider using babel plugin import that can automatically transform your ES6 module imports into path imports. Under the hood it will transform import code like this:

import { Button } from 'lucid-ui';

into

import Button from 'lucid-ui/Button';

Here's a .babelrc plugin configuration that works with lucid:

"plugins": [
  [
    "import",
    {
      "libraryName": "lucid-ui",
      "libraryDirectory": "",
      "camel2DashComponentName": false
    }
  ]
]

Credits

  • BrowserStack for providing cross-browser testing infrastructure.
  • Travis CI for providing continuous integration infrastructure.
  • CodeCov for providing code coverage analysis infrastructure.

Keywords

FAQs

Package last updated on 10 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