# Blue Web
Blue Web is the base library for [Blue React](https://bruegmann.github.io/blue-react) and [Blue Blazor](https://bruegmann.github.io/blue-react). This library builds heavily on top of [Bootstrap](https://getbootstrap.com/docs/) and also provides additional solutions in CSS and JavaScript.
## Use Blue Web
Install with NPM:
```
npm i blue-web
```
[](https://www.npmjs.com/package/blue-web)
## Implementation
If you have a React or Blazor project, you should use the components of [Blue React](https://bruegmann.github.io/blue-react) or [Blue Blazor](https://bruegmann.github.io/blue-blazor). Otherwise you can also write the markup of those components directly in HTML. Check out the examples in the docs to find out how.
For the JavaScript solutions you have to import the associated file. When installed using NPM, you can do it like this:
```js
import "blue-web/dist/js/dialog.js"
import "blue-web/dist/js/progress.js"
// ...
```
**Important:** Since 1.14.0 JavaScript files are compiled as ES modules. When you embed them in HTML using the `
```
JavaScript files are compiled as ES modules. This allows you to use import functions like this:
```html
```
## Customization and theming
Since Blue Web is based on Bootstrap, you can customize many things by overriding Sass or CSS variables. For more information, see the [Bootstrap documentation](https://getbootstrap.com/docs/5.3/customize/overview/). Blue Web also provides some additional variables that you can use and override. Take a look at [dist/styles/\_variables.scss](https://github.com/bruegmann/blue-web/blob/main/dist/styles/_variables.scss) to see all of them.
Here is an example of how to override variables using Sass:
```scss
// Override Bootstrap Sass variable
$primary: tomato;
// Override Blue Web Sass variables
$theme: orange;
$theme-dark: darken(orange, 10%);
// Stylesheet for Blue Web. Already contains Bootstrap.
@import "~blue-web/dist/style";
```
An example of how to override CSS variables:
```css
:root {
/* Override Bootstrap CSS variable */
--bs-body-font-family: "Inter", sans-serif;
/* Override Blue Web CSS variable */
--blue-sidebar-bg: #333;
}
```
## Button with icon
Blue Web enhances [Bootstrap's icon link helper](https://getbootstrap.com/docs/5.3/helpers/icon-link/#example) with the `.blue-btn-icon-wrapper`
class, enabling icons to be wrapped in a `span` element.
This simplifies the integration for Blue React and Blue Blazor by allowing icons to be passed as props more easily.
```html
```
## Buttons
Blue Web added some button variants to Bootstrap's default button styles. These variants are designed to be used in conjunction with the default Bootstrap button classes.
### `.blue-btn-soft-*`
```html
```
### `.blue-btn-plain-*`
A plain variant of Bootstrap's buttons. Always use together with `.btn`!
```html
```
## Collapse
Animated collapse using HTML `details`.
```html
Show something
Show something
Show something