• Complain

Maria Antonietta Perna - 8 Practical Bootstrap Projects

Here you can read online Maria Antonietta Perna - 8 Practical Bootstrap Projects full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2018, publisher: SitePoint, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Maria Antonietta Perna 8 Practical Bootstrap Projects

8 Practical Bootstrap Projects: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "8 Practical Bootstrap Projects" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Bootstrap stands as one of the most popular, open-source, front-end frameworks on the Web. Since its official release in 2011, it has undergone several changes, and its now one of the most stable and responsive frameworks available. Its loved by web developers of all levels, as it gives them the capability to build a functional, attractive website design within minutes. A novice developer with just some basic knowledge of HTML and little CSS can easily get started with Bootstrap.

In this book, well share a selection of nine different practical projects that you can follow along with. It contains:

  • Spicing Up the Bootstrap Carousel with CSS3 Animations by Maria Antonietta Perna
  • A Full-screen Bootstrap Carousel with Random Initial Image by George Martsoukos
  • Animating Bootstrap Carousels with GSAPs Animation Library by George Martsoukos
  • Build a Simple Tumblr Theme with Bootstrap by Ashraff Hathibelagal
  • How to Build a Responsive Bootstrap Website by Syed Fazle Rahman
  • Bootstrap and WordPress Theme Integration in 8 Easy Steps by Ahmed Bouchefra
  • Integrating Bootstrap with React: a Guide for Developers by Manjunath M
  • Integrating Bootstrap with Vue.js using Bootstrap-Vue by Zeeshan Chawdhary
  • This book is for all frontend developers who want to build responsive, mobile-first websites. Youll need to be familiar with HTML and CSS and have a reasonable level of understanding of JavaScript in order to follow the discussion.

    Maria Antonietta Perna: author's other books


    Who wrote 8 Practical Bootstrap Projects? Find out the surname, the name of the author of the book and a list of all author's works by series.

    8 Practical Bootstrap Projects — read online for free the complete book (whole text) full work

    Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "8 Practical Bootstrap Projects" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

    Light

    Font size:

    Reset

    Interval:

    Bookmark:

    Make
    Chapter 7: Integrating Bootstrap with React: a Guide for Developers
    by Manjunath M

    Integrating Bootstrap with React allows React developers to use Bootstraps state-of-the-art grid system and its various other components.

    In this tutorial, were going to:

    • explore tools and techniques for building a user interface with Bootstraps look and feel for a React-powered web application
    • use reactstrap to build a React contact list application.

    React is one of the most popular JavaScript technologies for interactive web applications. Its popularity derives from its component-based modular approach, composability and fast re-rendering algorithm.

    However, being a view library, React doesnt have any built-in mechanism that can help us create designs that are responsive, sleek and intuitive. Thats where a front-end design framework like Bootstrap steps in.

    Why You Cant Just Include Bootstrap Components with React

    Combining Bootstrap with React isnt as easy as adding

    to an index.html file. This is because Bootstrap depends on jQuery for powering certain UI components. jQuery uses a direct DOM manipulation approach thats contradictory to Reacts declarative approach.

    If we need Bootstrap just for the responsive 12 column grid, or the components that dont use jQuery, we can simply resort to the vanilla Bootstrap stylesheet. Otherwise, there are many libraries that take care of bridging the gap between React and Bootstrap. Well compare both methods so that well be in a better position to choose the approach that works for our specific case.

    Lets get started!

    Setting up a Bootstrap Stylesheet with React

    Lets use the Create React App CLI to create a React project, which requires zero configuration to get started.

    We install Create React App and run the following command to start a new project and serve the development build:

    $ create-react-app react-and-bootstrap$ cd react-and-bootstrap$ npm start

    Heres the directory structure created by Create React App:

    . package.json public favicon.ico index.html manifest.json README.md src App.css App.js App.test.js index.css index.js logo.svg registerServiceWorker.js yarn.lock

    Next, lets download the latest version of the Bootstrap library from Bootstraps official site. The package includes both the compiled and minified versions of the CSS and JavaScript. Well just copy the CSS and place it inside the public/ directory. For projects that just need the grid, there is a grid-specific stylesheet included too.

    Next, we create a new directory for CSS inside public/, paste bootstrap.min.css in our newly created css directory, and link it from public/index.html:

    Alternatively, we can use a CDN to fetch the minified CSS:

    Lets have a look at what works and what doesnt with this setup.

    Using Vanilla Bootstrap with React

    Once we add the Bootstrap stylesheet to a React project, we can use the regular Bootstrap classes inside JSX code. Lets head over to the Bootstrap demo site and copy over some random example code, just to check everything is working as it should:

    Live Code

    Check out the sample site here As we can see the form looks good but the - photo 1

    Check out the sample site here.

    As we can see, the form looks good, but the NavBar doesnt. Thats because the NavBar depends on the Collapse jQuery plugin, which we havent imported. Apart from being unable to toggle navigation links, we cant use features like dropdown menus, closable alerts and modal windows, to name a few.

    Wouldnt it be awesome if we could import Bootstrap as React components to make the most out of React? For instance, imagine if we could use a combination of Grid, Row and Column components to organize the page instead of the pesky HTML classes:

    One of three columns
    One of three columns
    One of three columns
    One of three columns One of three columns One of three columns

    Fortunately, we dont have to implement our own library to serve this purpose, as there are some popular solutions already available. Lets take a look at some of them.

    An Overview of Third-party Libraries for React and Bootstrap

    There are a few libraries that try to create a React-specific implementation of Bootstrap so that we can use JSX components while working with Bootstrap styles. Ive compiled a list of a few popular Bootstrap modules that we can use with our React projects.

    React-Bootstrap is by far one of the most popular libraries for adding Bootstrap components into React. However, at the time of writing this tutorial, it targets Bootstrap v3 and not the latest version of Bootstrap. Its in active development and the API might break when a newer version is released.

    reactstrap is another library that gives us the ability to use Bootstrap components in React. Unlike React-Bootstrap, reactstrap is built for the latest version of Bootstrap. The module includes components for typography, icons, forms, buttons, tables, layout grids, and navigation. Its also in active development and its a nice alternative for building React-powered Bootstrap apps.

    There are a few other libraries like React-UI, and domain-specific modules like React-bootstrap-table and CoreUI-React Admin Panel on GitHub, which provide extended support for creating awesome UIs using React.

    The rest of this tutorial will focus on reactstrap, because its the only popular module that uses the latest version of Bootstrap.

    Setting up the reactstrap Library

    We start by installing the reactstrap library using npm:

    npm install --save reactstrap@next

    Now we can import the relevant components from the module as follows:

    import { Container, Row, Col} from 'reactstrap';

    However, the library wont work as we might expect it to yet. As explained on the reactstrap website, the reason for this is that reactstrap doesnt include Bootstrap CSS, so we need to add it ourselves:

    npm install --save bootstrap

    Next, we import Bootstrap CSS in the src/index.js file:

    import 'bootstrap/dist/css/bootstrap.css';
    Bootstrap Grid Basics

    Bootstrap has a responsive, mobile first and fluid grid system that allows up to 12 columns per page. To use the grid, well need to import the Container, Row and Col components.

    The Container accepts a fluid property that converts a fixed-width layout into a full-width layout. Essentially, it adds the corresponding .container-fluid Bootstrap class to the grid.

    As for

    s, we can configure them to accept props such as xs, md, smand lgthat are equivalent to Bootstraps col-*classes for exmple,

    Alternatively, we can pass an object to the props with optional properties like size, order and offset. The size property describes the number of columns, whereas order lets us order the columns and accepts a value from 1 to 12. The offset property moves the columns to the right.

    The code below demonstrates some of the Grid features in reactstrap:

    Live Code

    Grid features in Reactstrap.

    Bootstrap Style Components in React

    Now that we have reactstrap at our fingertips, there are tons of Bootstrap 4 components that we can use with React. Covering them all is beyond the scope of this tutorial, but lets try a few important components and use them in an actual project say, a contact list app.

    Next page
    Light

    Font size:

    Reset

    Interval:

    Bookmark:

    Make

    Similar books «8 Practical Bootstrap Projects»

    Look at similar books to 8 Practical Bootstrap Projects. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


    Reviews about «8 Practical Bootstrap Projects»

    Discussion, reviews of the book 8 Practical Bootstrap Projects and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.