tui-cards

Crates.iotui-cards
lib.rstui-cards
version0.3.1
created_at2024-09-21 16:04:51.552326+00
updated_at2025-12-27 07:17:52.434883+00
descriptionA playing card widget for Ratatui
homepage
repositoryhttps://github.com/joshka/tui-widgets
max_upload_size
id1382317
size65,422
Josh McKinney (joshka)

documentation

https://docs.rs/tui-cards

README

Tui-cards

A [Ratatui] widget to render charming playing cards in the terminal. Part of the tui-widgets suite by Joshka.

demo

Crate badge Docs Badge Deps Badge License Badge Coverage Badge Discord Badge

GitHub Repository · API Docs · Examples · Changelog · Contributing

Usage

Create a Card and render it directly in a frame.

use tui_cards::{Card, Rank, Suit};

let card = Card::new(Rank::Ace, Suit::Spades);
frame.render_widget(&card, frame.area());

Demo

cargo run --example card

More widgets

For the full suite of widgets, see tui-widgets.

TODO

  • work out bug with background of cell after the suit character
  • more configuration options

License

Copyright (c) Josh McKinney

This project is licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

See CONTRIBUTING.md.

Commit count: 383

cargo fmt