user7656142 user7656142 - 1 year ago 143
React JSX Question

Why aren't my React Bootstrap Glyphicons showing?

I'm using React Bootstrap's

component but none of the glyphicons are showing up. Here is my code so far:


import React from 'react';
import ReactDOM from 'react-dom';
import Global from './components/Global';

<Global />,


import React, { Component } from 'react';
import { FormGroup, FormControl, InputGroup, Glyphicon } from 'react-bootstrap';

class Global extends Component {
render() {
<h2> Book Explorer!</h2>
placeholder="Search for a book"
<Glyphicon glyph="search"></Glyphicon>

export default Global;

Here's my

"name": "setup",
"version": "1.0.0",
"babel": {
"presets": [
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack",
"start": "webpack-dev-server"
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"babel-core": "^6.22.1",
"babel-loader": "^6.2.10",
"babel-polyfill": "^6.22.0",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.24.1",
"react": "^15.5.4",
"react-bootstrap": "^0.31.0",
"react-dom": "^15.5.4",
"webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2"

Answer Source

This is because Bootstrap uses the font Gylphicon Halflings to display its glyphicons. Bootstrap's CSS must be explicitly included, as it imports the glyphicons, or else the glyphicons will not show up. You could add the bootstrap.min.css file to your index.html which imports it for you:

<link href="" rel="stylesheet">

There was an issue raised on GitHub regarding this exact issue. It's not explicitly said that you need to include Bootstrap's CSS, and I ran into this issue before. You have to include the CSS file or else the glyphicons will not be imported and your components will display nothing.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download