This is BuckleScript bindings for React-Bootstrap
- With npm:
npm install --save bs-react-bootstrap
- With Yarn
yarn add bs-react-bootstrap
- Add
bs-react-bootstrap
tobs-dependencies
on yourbsconfig.json
- Include Bootstrap CSS into your
index.html
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous"
>
As you are using React Bootstrap it's not necessary to import any jQuery stuff.
Please refer to React Bootstrap Documentation for each component Spec.
Some specif patterns:
- enums β© polymorphic variants see on sample
π Binding
β Done
β Not implemented yet
β οΈ WIP
π β Alerts
π β Badge
π β Breadcrumb
π β Buttons
π β Button Group
π β Cards
π β Carousel
π β Dropdowns
π β Forms
π β Input Group
π β Images
π β Figures
π β Jumbotron
π β List Group
π β Modal
π
π β
Navbar
π β Overlays
π β Pagination
π β Popovers
π β Progress
π β Table
π β Tabs
π β Tooltips
Sample: Navbar
open ReactBootstrap;
let component = "App" |> ReasonReact.statelessComponent;
let make = _children => {
...component,
render: _self =>
<div className="App container">
<Navbar fixed=`top fluid=true collapseOnSelect=true>
<Navbar.Brand>
<a href="/">
{string("Scratch")}
</a>
</Navbar.Brand>
<Navbar.Toggle />
<Navbar.Collapse>
<Nav pullRight=true>
<Nav.Item href="signup">
{string("Sign Up")}
</Nav.Item>
<Nav.Item href="login">
{string("Log In")}
</Nav.Item>
</Nav>
</Navbar.Collapse>
</Navbar>
<Routes />
</div>,
};