Expand description
Bootstrap grid system components.
The grid system uses containers, rows, and columns to layout content.
§Example
use ironhtml_bootstrap::grid::*;
use ironhtml::typed::Element;
use ironhtml_elements::Div;
let layout = container(|c| {
c.child::<Div, _>(|_| {
row(|r| {
r.child::<Div, _>(|_| col(4, |c| c.text("Column 1")))
.child::<Div, _>(|_| col(4, |c| c.text("Column 2")))
.child::<Div, _>(|_| col(4, |c| c.text("Column 3")))
})
})
});
let html = layout.render();
assert!(html.contains(r#"class="container"#));
assert!(html.contains(r#"class="row"#));
assert!(html.contains(r#"class="col-4"#));Functions§
- col
- Create a column with specific size (1-12).
- col_
auto - Create an auto-width column.
- col_bp
- Create a responsive column.
- container
- Create a Bootstrap container.
- container_
bp - Create a responsive container.
- container_
fluid - Create a fluid container (100% width).
- row
- Create a row.
- row_
gutter - Create a row with custom gutter.