# Widget Examples

This folder contains minimal examples for Ratatui widgets.
There are meant to provide code snippets that can be copy-pasted into your
application.

> [!TIP]
> There are also [application examples] in the top-level `examples` folder.

[application examples]: ../../examples

You can run these examples using:

```shell
cargo run -p ratatui-widgets --example example-name
```

> [!NOTE]
> This folder might use unreleased code. Consider viewing the examples in the `latest` branch instead
> of the `main` branch for code which is guaranteed to work with the released Ratatui version.

## Barchart (grouped)

![Barchart (grouped)][barchart-grouped.gif]

## Barchart

![Barchart][barchart.gif]

## Block

![Block][block.gif]

## Calendar

![Calendar][calendar.gif]

## Canvas

![Canvas][canvas.gif]

## Chart

![Chart][chart.gif]

## Collapsed Borders

![Collapsed Borders][collapsed-borders.gif]

## Gauge

![Gauge][gauge.gif]

## Line Gauge

![Line Gauge][line-gauge.gif]

## List

![List][list.gif]

## Logo

![Logo][logo.gif]

## Paragraph

![Paragraph][paragraph.gif]

## Scrollbar

![Scrollbar][scrollbar.gif]

## Sparkline

![Sparkline][sparkline.gif]

## Table

![Table][table.gif]

## Tabs

![Tabs][tabs.gif]

[barchart-grouped.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/barchart-grouped.gif?raw=true
[barchart.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/barchart.gif?raw=true
[block.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/block.gif?raw=true
[calendar.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/calendar.gif?raw=true
[canvas.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/canvas.gif?raw=true
[chart.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/chart.gif?raw=true
[collapsed-borders.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/collapsed-borders.gif?raw=true
[gauge.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/gauge.gif?raw=true
[line-gauge.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/line-gauge.gif?raw=true
[list.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/list.gif?raw=true
[logo.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/logo.gif?raw=true
[paragraph.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/paragraph.gif?raw=true
[scrollbar.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/scrollbar.gif?raw=true
[sparkline.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/sparkline.gif?raw=true
[table.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/table.gif?raw=true
[tabs.gif]: https://github.com/ratatui/ratatui/blob/images/widget-examples/tabs.gif?raw=true
