PHPackages                             ramiroestrella/slack-message-blocks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ramiroestrella/slack-message-blocks

ActiveLibrary[API Development](/categories/api)

ramiroestrella/slack-message-blocks
===================================

Slack Message Blocks is a PHP package designed to simplify the process of creating and sending rich, interactive messages to Slack. This package provides a fluent interface for building various Slack message elements, including buttons, select menus, date pickers, and more.

01.4kPHP

Since Jan 9Pushed 1y ago2 watchersCompare

[ Source](https://github.com/balance3840/slack-message-blocks)[ Packagist](https://packagist.org/packages/ramiroestrella/slack-message-blocks)[ RSS](/packages/ramiroestrella-slack-message-blocks/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Slack Message Blocks
====================

[](#slack-message-blocks)

Slack Message Blocks is a PHP package designed to simplify the process of creating and sending rich, interactive messages to Slack. This package provides a fluent interface for building various Slack message elements, including buttons, select menus, date pickers, and more.

Features
--------

[](#features)

- **Fluent Interface**: Easily chain methods to build complex Slack messages.
- **Rich Elements**: Support for buttons, select menus, checkboxes, radio buttons, date pickers, time pickers, and more.
- **Customizable**: Configure elements with placeholders, initial values, and additional options.
- **Webhook Integration**: Send messages directly to Slack using webhooks.

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require ramiroestrella/slack-message-blocks
```

Usage
-----

[](#usage)

### Creating a Message

[](#creating-a-message)

```
use SlackMessage\Message;
use SlackMessage\Enums\ButtonStyle;

$webhookUrl = 'https://hooks.slack.com/services/your/webhook/url';

$message = (new Message($webhookUrl))
    ->header('Daily Standup')
    ->text('Please provide your updates:')
    ->button('Submit', 'submit_value', 'submit_action', ButtonStyle::PRIMARY)
    ->send();

if ($message) {
    echo "Message sent successfully!";
} else {
    echo "Failed to send message.";
}
```

### Adding Elements

[](#adding-elements)

You can add various elements to your message:

```
$message = (new Message($webhookUrl))
    ->header('Daily Standup')
    ->text('Please provide your updates:')
    ->datePicker('Select a date', 'date_picker_action')
    ->timePicker('Select a time', 'time_picker_action')
    ->userSelect('Select a user', 'Select a user', 'user_select_action')
    ->checkboxes('Select options', 'checkboxes_action', function($checkboxOption) {
        $checkboxOption->option('Option 1', 'value1')
                       ->option('Option 2', 'value2');
    })
    ->send();
```

Documentation
-------------

[](#documentation)

For detailed documentation on all available methods and options, please refer to the source code and doc comments.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/978218e6d4498d4aca751165e2967e209c308b89a01aebf92ed66be67120a768?d=identicon)[ramiroestrella](/maintainers/ramiroestrella)

---

Top Contributors

[![balance3840](https://avatars.githubusercontent.com/u/14103530?v=4)](https://github.com/balance3840 "balance3840 (1 commits)")

### Embed Badge

![Health badge](/badges/ramiroestrella-slack-message-blocks/health.svg)

```
[![Health](https://phpackages.com/badges/ramiroestrella-slack-message-blocks/health.svg)](https://phpackages.com/packages/ramiroestrella-slack-message-blocks)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M95](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
