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

@aybolit/bootstrap

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aybolit/bootstrap

Aybolit Bootstrap is a set of the web components inspired by [Bootstrap](https://getbootstrap.com) framework.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Aybolit Bootstrap

Aybolit Bootstrap is a set of the web components inspired by Bootstrap framework.

Overview

Bootstrap 4 is used as a base, but Aybolit does not preserve the original CSS, cuts some corners and makes adjustments here and there. The main idea behind these changes is flexible theming support, with reasonable bundle size.

The upcoming Bootstrap 5, expected to land this year, will likely introduce a lot of changes to be adapted by Aybolit. The first-class Web Components support for Bootstrap was requested, and is considered by maintainers as possible for v6.

Installation

Aybolit Bootstrap is available as npm package:

# with npm
npm i @aybolit/bootstrap --save

# with yarn
yarn add @aybolit/bootstrap

Import either all or individual components:

// all components
import '@aybolit/bootstrap';

// button only
import { AbsButton } from '@aybolit/bootstrap';

You can also use get Aybolit Bootstrap from the CDN:

<script src="https://unpkg.com/@aybolit/bootstrap@latest?module" type="module"></script>

Components

Examples

<!-- Button -->
<abs-button>Button</abs-button>
<abs-button theme="primary">Primary theme</abs-button>
<abs-button size="small">Small size</abs-button>
<abs-button link="https://example.com">Link</abs-button>

<!-- Checkbox -->
<abs-checkbox>Unchecked</abs-checkbox>
<abs-checkbox checked>Checked</abs-checkbox>
<abs-checkbox indeterminate>Indeterminate</abs-checkbox>

<!-- Progress -->
<abs-progress value="50" max="100"></abs-progress>

<!-- Range -->
<abs-range min="0" max="10" value="5"></abs-range>

<!-- Switch -->
<abs-switch>Unchecked</abs-switch>
<abs-switch checked>Checked</abs-switch>

Theme Variants

All the components can be themed using theme attribute with one of the following values:

  • primary
  • info
  • success
  • warning
  • danger

The colors for each theme variant can be adjusted using custom CSS properties listed below.

Custom CSS Properties

The following custom CSS properties are available for styling.

General Theme

Changing these properties affect all the components at the level of cascade where they are specified. Keep in mind that lightness level is used as base for automatic contrast adjustment, so changing it might affect e.g. buttons text color.

PropertyDescription Fallback
--abs-primary-hPrimary color hue211
--abs-primary-sPrimary color saturation100
--abs-primary-lPrimary color lightness48
--abs-info-hInfo color hue188
--abs-info-sInfo color saturation78
--abs-info-lInfo color lightness41
--abs-success-hSuccess color hue134
--abs-success-sSuccess color saturation61
--abs-success-lSuccess color lightness41
--abs-warning-hWarning color hue45
--abs-warning-sWarning color saturation100
--abs-warning-lWarning color lightness60
--abs-danger-hDanger color hue354
--abs-danger-sDanger color saturation70
--abs-danger-lDanger color lightness48

Individual Components

These properties expose certain colors not covered by general theme settings.

ComponentPropertyDescription Fallback
Button--abs-button-bg-colorUn-themed button background#fff
Button--abs-button-border-colorUn-themed button border colortransparent
Button--abs-button-colorUn-themed button color#212529
Checkbox--abs-checkbox-border-colorUnchecked state border color#adb5bd
Checkbox--abs-checkbox-disabled-bgDisabled unchecked state background#e9ecef
Checkbox--abs-checkbox-disabled-textDisabled state text color#6c757d
Progress--abs-progress-bar-colorProgress bar color#e9ecef
Range--abs-range-track-bgTrack background#dee2e6
Range--abs-range-disabled-bgDisabled state thumb background#adb5bd
Switch--abs-switch-disabled-bgDisabled off state background #e9ecef
Switch--abs-switch-disabled-textDisabled off state text color #6c757d
Switch--abs-switch-off-thumb-bgOff state thumb background #adb5bd
Switch--abs-switch-off-track-bgOff state track background #fff
Switch--abs-switch-off-track-borderOff state track border color #adb5bd
Switch--abs-switch-on-thumb-bgOn state thumb background #fff

FAQs

Package last updated on 12 Mar 2019

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