Official open source SVG icon library for Bootstrap.
Перейти к файлу
XhmikosR d0ab650612
Generate font page with Hugo (#706)
* Generate font page with Hugo

* fix

* fix font path

* Fix up stylesheet URLs

* Add description

Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-08-28 09:56:36 -07:00
.github build(deps): bump github/codeql-action from 1 to 2 (#1301) 2022-05-05 08:36:14 +03:00
build Generate font page with Hugo (#706) 2022-08-28 09:56:36 -07:00
docs Generate font page with Hugo (#706) 2022-08-28 09:56:36 -07:00
font Generate font page with Hugo (#706) 2022-08-28 09:56:36 -07:00
icons Fixes for v1.9.1 (#1373) 2022-07-16 15:31:55 -07:00
.browserslistrc Update .browserslistrc from upstream (#1231) 2022-02-22 09:34:01 +02:00
.editorconfig Add .editorconfig file. 2019-10-05 16:27:57 +03:00
.eslintignore Add list.js to the repo (#186) 2020-03-25 21:42:59 +02:00
.eslintrc.json Update build scripts from upstream and minor lint tweaks (#1260) 2022-03-11 11:38:02 +02:00
.fantasticonrc.js Generate font page with Hugo (#706) 2022-08-28 09:56:36 -07:00
.gitattributes Enforce LF. 2019-08-10 14:23:11 +03:00
.gitignore chore: add .vscode to .gitignore (#1290) 2022-05-05 08:41:37 +03:00
.stylelintrc Update devDependencies 2021-12-01 14:19:03 +02:00
LICENSE.md Update LICENSE.md 2021-10-31 20:23:58 -07:00
README.md Add Icons for v1.9.0 (#1365) 2022-07-13 13:08:59 -07:00
bootstrap-icons.svg Fixes for v1.9.1 (#1373) 2022-07-16 15:31:55 -07:00
composer.json Composer support (#1038) 2021-10-12 10:18:59 -07:00
config.yml Fixes for v1.9.1 (#1373) 2022-07-16 15:31:55 -07:00
package-lock.json Update Bootstrap to stable release 2022-08-28 08:08:04 -07:00
package.json build(deps-dev): bump autoprefixer from 10.4.7 to 10.4.8 (#1395) 2022-08-01 23:24:57 +03:00
svg-sprite.json Update svg-sprite to v2.0.0-beta2 (#1259) 2022-04-05 18:49:09 +03:00
svgo.config.js Use a custom svgo plugin to optimize svg attributes (#1148) 2022-04-17 08:24:52 +03:00

README.md

Bootstrap logo

Bootstrap Icons

Official open source SVG icon library for Bootstrap with over 1,800 icons.
Explore Bootstrap Icons »

Bootstrap · Themes · Blog

Bootstrap Icons preview

Install

Bootstrap Icons are packaged up and published to npm. We only include the processed SVGs in this package—it's up to you and your team to implement. Read our docs for usage instructions.

npm i bootstrap-icons

For those using Packagist, you can also install Bootstrap Icons via Composer:

composer require twbs/bootstrap-icons

Also available in Figma.

Usage

Depending on your setup, you can include Bootstrap Icons in a handful of ways.

  • Copy-paste SVGs as embedded HTML
  • Reference via <img> element
  • Use the SVG sprite
  • Include via CSS

See the docs for more information.

Development

Build Status

Clone the repo, install dependencies, and start the Hugo server locally.

git clone https://github.com/twbs/icons/
cd icons
npm i
npm start

Then open http://localhost:4000 in your browser.

npm scripts

Here are some key scripts you'll use during development. Be sure to look to our package.json for a complete list of scripts.

Script Description
start Alias for running docs-serve
docs-serve Starts a local Hugo server
pages Generates permalink pages for each icon with template Markdown
icons Processes and optimizes SVGs in icons directory

Adding SVGs

Icons are typically only added by @mdo, but exceptions can be made. New glyphs are designed in Figma first on a 16x16px grid, then exported as flattened SVGs with fill (no stroke). Once a new SVG icon has been added to the icons directory, we use an npm script to:

  1. Optimize our SVGs with SVGO.
  2. Modify the SVGs source HTML, removing all attributes before setting new attributes and values in our preferred order.

Use npm run icons to run the script, run npm run pages to build permalink pages, complete those pages, and, finally, commit the results in a new branch for updating.

Publishing

Documentation is published automatically when a new Git tag is published. See our GitHub Actions and package.json for more information.

License

MIT

Author

@mdo