9 releases

0.3.1 Dec 27, 2025
0.3.0 Dec 27, 2025
0.3.0-alpha.0 Mar 2, 2025
0.2.4 Nov 2, 2025
0.1.1 Sep 21, 2024

#1665 in Command-line interface

Download history 17/week @ 2025-10-28 47/week @ 2025-11-04 77/week @ 2025-11-11 79/week @ 2025-11-18 76/week @ 2025-11-25 77/week @ 2025-12-02 339/week @ 2025-12-09 106/week @ 2025-12-16 196/week @ 2025-12-23 403/week @ 2025-12-30 899/week @ 2026-01-06 1144/week @ 2026-01-13

2,693 downloads per month
Used in tui-widgets

MIT/Apache

18KB
253 lines

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.

Dependencies

~11MB
~184K SLoC