workplacebuddy / adaptive-card
Classes and enums to generate Adaptive Card elements
Installs: 11 153
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 1
Open Issues: 2
pkg:composer/workplacebuddy/adaptive-card
Requires
- php: ~8.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- nette/php-generator: ^4.1
- phpunit/phpunit: ^10.5
- psalm/plugin-phpunit: ^0.19.0
- symfony/console: ^6.4
- symfony/error-handler: ^6.4
- symfony/event-dispatcher: ^6.4
- symfony/filesystem: ^6.4
- symfony/finder: ^6.4
- symfony/options-resolver: ^6.4
- symfony/process: ^6.4
- symfony/stopwatch: ^6.4
- symfony/string: ^6.4
- symfony/var-dumper: ^6.4
- vimeo/psalm: ^5.26
This package is auto-updated.
Last update: 2026-03-02 14:33:57 UTC
README
Classes and enums to generate Adaptive Card elements
Definitions are generated from the schema.
Usage
Most of the classes are available in the AdaptiveCard namespace:
AdaptiveCard/AdaptiveCardfor the main cardAdaptiveCard/Colorsto fiddle with some colors- Etc..
Some more specific elements are in their own namespaces, like the actions and the inputs:
AdaptiveCard\Action\OpenUrlto open an URL when clickedAdaptiveCard\Input\Textto ask for some text- Etc..
All elements can be found here: https://adaptivecards.io/explorer/, everything should be available -- the elements are generated directly from the manifest/schema.
All elements also have a constructor to quickly create a single element:
For example
$card = new AdaptiveCard\AdaptiveCard(); $card->body = [new AdaptiveCard\TextBlock(text: 'Hello world!')]; $card->actions = [ new AdaptiveCard\Action\OpenUrl( title: 'Website', url: 'https://www.workplacebuddy.com/', ), ];