yew-bootstrap
is a collection of frontend components made to simplify the usage of Bootstrap within the Yew framework.
This project assumes that you have an existing web application that uses the Seed framework. If you do not, refer to the Yew Getting Started project to get started.
Add the dependency next to the regular yew dependency:
[dependencies]
yew = "0.18"
yew-bootstrap = "0.3"
Then in the beginning of your application, include the include_cdn()
or include_inline()
function to load the required CSS and JS, either from JSDeliver CDN or to inline the CSS:
fn view(&self) -> Html {
html! {
<>
{include_cdn()}
<Button style=Color::Primary>{"Primary"}</Button>
</>
}
}
Currently missing the following Core content:
- Container (
<Container>
) - Grid (
<Row>
,<Column>
) - Display headings
- Lead
- Blockquote
- Image/Figure
- Table
- Forms
Following Components has been implemented:
- Accordion
- Alert (
<Alert>
) - Badge
- Breadcrumb
- Button (
<Button>
) - Button group (
<ButtonGroup>
) - Card
- Carousel
- Close button
- Collapse
- Dropdown
- List group
- Modal
- Navs & tabs
- Offcanvas
- Pagination
- Placeholders
- Popovers
- Progress
- Scrollspy
- Spinner
- Toast
- Tooltips
The following Helpers has been implemented:
- Clearfix
- Colored links (
<Link>
) - Stacks
- Stretched (
<Link stretched=true>
) - Text truncation
- Vertical/Horizontal rule/line (
<Line>
)