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

base-elements

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base-elements

A selection of native DOM elements

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by1400%
Maintainers
1
Weekly downloads
 
Created
Source

base-elements stability

npm version build status downloads js-standard-style

A selection of configurable native DOM UI elements. Inspired by rebass and tachyons.

Usage

const Avatar = require('base-elements/avatar')
const css = require('sheetify')
const html = require('bel')

css('tachyons')

const tree = html`<main>${Avatar()}</main>`
document.body.appendChild(tree)

API

avatar(opts)

Create a circular avatar image. opts can contain:

  • src: (default: null) set the src tag of the element
  • size: (default: 3) set the size of the element. Enums: {1, 2, 3, 4, 5}
  • class: (default: '') set additional classes on the element
  • style: (default: '') set additional styles on the element

progress(opts)

Create a progress bar. opts can contain:

  • value: (default: 0) set the progress of the element (0 >= x <= 1)
  • color: (default: 'blue') set the color on the element
  • direction: (default: 'ltr') set the progress bar direction. Enums: { 'ltr', 'rtl' }
  • class: (default: '') set additional classes on the element
  • style: (default: '') set additional styles on the element

tooltip(text, opts, child)

Create a tooltip on a child element from a string. opts can contain:

  • position: (default: 'up') set the position of the tooltip. Enums: { 'up', 'down', 'left', 'right' }
  • class: (default: '') set additional classes on the element
  • style: (default: '') set additional styles on the element

See Also

Installation

$ npm install base-elements

License

MIT

Keywords

FAQs

Package last updated on 23 Oct 2016

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