Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we use glyphicons in Bootstrap 4?

I have been using glyphicons with bootstrap 3 and now when I update the cdn to bootstrap 4, they don't work.

like image 799
deilkalb Avatar asked Aug 22 '18 16:08

deilkalb


People also ask

What can I use instead of Glyphicons?

Free Alternatives to Glyphicons You can use both Font Awesome and Github Octicons as a free alternative for Glyphicons.

How do I add Glyphicons in bootstrap 5?

In lines 15 and 17 the <span> and <a> element has the bootstrap glyphicon glyphicon-pencil classes, so to use any glyphicon in bootstrap: Use the <span> or <a> element. Set the class attribute of the <span> or <a> element as glyphicon then a space and then glyphicon-iconname.

How do I add Glyphicons in bootstrap 3?

Bootstrap 3 Glyphicons are actually fonts, so you can scale them and color them as you please. Bootstrap previously used image sprites for icons. To add a glyphicon, add a <span> tag with Bootstrap's . glyphicon class and also the class for the specific glyphicon that you require.

How do I use Glyphicons in Bootstrap?

Bootstrap includes 260 glyphs from the Glyphicon Halflings set. Glyphicons Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost. As a thank you, you should include a link back to Glyphicons whenever possible. Use glyphicons in text, buttons, toolbars, navigation, or forms:

Does Bootstrap 4 have an icon library?

Bootstrap 4 does not have its own icon library (Glyphicons from Bootstrap 3 are not supported in BS4). However, there are many free icon libraries to choose from, such as Font Awesome and Google Material Design Icons. The way to insert icons is also the same as for glyphicons with an <i> code.

How many glyphs are there in Bootstrap?

Bootstrap includes 260 glyphs from the Glyphicon Halflings set. Glyphicons Halflings are normally not available for free, but their creator has made them available for Bootstrap free of cost. As a thank you, you should include a link back to Glyphicons whenever possible.

Should I use SVG or bootstrap instead of glyphicon?

The only caveat here is that you'll have to use the font-based icons instead of the SVG alternative (see above), but if you're a Glyphicon user you won't suffer from that: there's a much higher chance that you won't like the "new" icons... If you feel like that, just implement the Bootstrap 4+3 alternative instead.


2 Answers

From what I have seen, Bootstrap dropped support of them. however, you can always add it to your website manually.

There are files or CDN's for it so you should not have any problems adding it to your website.

There are also loads of alternatives like Material Icons by Google or FA.

Download Glyphicons

like image 121
Liam Geary Avatar answered Oct 18 '22 03:10

Liam Geary


glyphicons have been dropped support from bootstrap 4 and they worked with bootstrap 3. You can use use font-awesome instead. Migrating to font-awesome is easier: you can include the cdn

<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">

or download it from https://fontawesome.com/v4.7.0/get-started/ and replace glyphicon glyphicon- with fa fa- using any text editor.

like image 35
deilkalb Avatar answered Oct 18 '22 03:10

deilkalb