adaptive-card-rs

Crates.ioadaptive-card-rs
lib.rsadaptive-card-rs
version0.4.0
created_at2025-05-29 17:03:24.782668+00
updated_at2025-12-18 23:12:41.39889+00
descriptionA Rust crate for working with Adaptive Cards, a format for rendering card-like user interfaces.
homepagehttps://github.com/cobbinma/adaptive-card-rs
repositoryhttps://github.com/cobbinma/adaptive-card-rs
max_upload_size
id1694038
size108,773
Matthew Cobbing (cobbinma)

documentation

https://docs.rs/adaptive-card-rs

README

adaptive-card-rs

Crates.io Docs.rs

This crate provides the structures for building Adaptive Cards, which are designed to be rendered in the Adaptive Card ecosystem. Adaptive Cards are used to create rich interactive content in a structured way.

https://adaptivecards.io/

Installation

Add this crate to your Cargo.toml to use it in your Rust project:

cargo add adaptive-card-rs

Overview

Adaptive Cards consist of:

  • A schema defining the version and structure.
  • A collection of card elements (e.g., TextBlock, Image, FactSet).
  • Optional actions that users can trigger.
use adaptive_card_rs::card::{AdaptiveCard, Version, CardElement, TextBlock, TextSize, TextWeight};

let card = AdaptiveCard {
    version: Version::V1_3,
    body: vec![
        CardElement::TextBlock(TextBlock {
            size: Some(TextSize::Large),
            weight: Some(TextWeight::Bolder),
            text: "Hello, Adaptive Card!".to_string(),
            wrap: Some(true),
            is_subtle: Some(false),
        })
    ],
    ..Default::default()
};
Commit count: 11

cargo fmt