If you want scrollbars, simply surround the item you want to scroll with a <ScrollArea></ScrollArea>
component.
```rust
fn app() -> Html { html!{
The
The <ScrollArea></ScrollArea>
component is styled using yew-style-in-rs.In other words, you need to copy and place style.css from the build artifact.
Add vertical=true
if you want to use vertical scrollbars.
```rust
fn app() -> Html { html!{
Add horizontal=true
if you want to use horizontal scrollbars.
```rust
fn app() -> Html { html!{
Add vertical=true
and horizontal=true
if you want to use vertical and horizontal scrollbars.
```rust
fn app() -> Html { html!{
Add color={Color::rgba(128, 255, 0, 0.8)}
if you want to colorize scrollbars.
```rust
fn app() -> Html { html!{
Add attributes width, round, hidetime and smoothtime for styling scrollbars.
```rust
fn app() -> Html { html!{
dry-run
: No write css file to disk. Without this feature, this crate depends on yew-style-in-rs
, so create and write a CSS file to disk. This feature is useful for document build.If you would like to publish some components uses yew-scroll-area
to crates.io, you might need to write following contents to Cargo.toml because crates.io docs build environment can't write filesystem:
```toml [features] default = [] dry-run = ["yew-scroll-area/dry-run"]
[package.metadata.docs.rs] cargo-args = ["--features=dry-run"] ```
You might need to publish with dry-run
.
sh
$ cargo publish --features dry-run