Official open source SVG icon library for Bootstrap.
Перейти к файлу
XhmikosR b281685091 Load list.js locally so that we can modify it 2023-03-26 18:37:05 +03:00
.github Load list.js locally so that we can modify it 2023-03-26 18:37:05 +03:00
build Fix sass quoted string interpolation for hugo 0.110.0 (#1566) 2023-03-25 11:49:56 -05:00
docs Load list.js locally so that we can modify it 2023-03-26 18:37:05 +03:00
font Remove non-existent icons from font (#1521) 2023-03-25 11:12:47 +02:00
icons Fixes three icon font rendering issues (#1645) 2023-03-25 22:33:53 +02: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 ESLint config 2023-03-25 19:32:19 +02:00
.fantasticonrc.js Clean up .fantasticonrc.js 2023-03-25 10:36:40 +02:00
.gitattributes
.gitignore .gitignore: ignore release zip files 2023-03-25 19:54:33 +02:00
.stylelintrc.json Update .stylelintrc.json (#1631) 2023-03-23 09:48:55 +02:00
LICENSE.md font: add license header 2023-03-25 09:39:57 -07:00
README.md Tweak README.md (#1649) 2023-03-26 11:57:59 +03:00
bootstrap-icons.svg Bump to v1.10.2 2022-11-13 09:44:34 -08:00
composer.json Composer support (#1038) 2021-10-12 10:18:59 -07:00
config.yml Load list.js locally so that we can modify it 2023-03-26 18:37:05 +03:00
package-lock.json Load list.js locally so that we can modify it 2023-03-26 18:37:05 +03:00
package.json Load list.js locally so that we can modify it 2023-03-26 18:37:05 +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 Assorted JS tweaks (#1617) 2023-03-14 15:41:45 +02:00

README.md

Bootstrap logo

Bootstrap Icons

Official open source SVG icon library for Bootstrap with over 1,900 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 npm version

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 or npm run output 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, generates fonts and sprite

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 code, 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.

Warning: Please exclude any auto-generated files, like font/** and bootstrap-icons.svg from your branch because they cause conflicts, and we generally update the dist files before a release.

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