# slack-blockify-types

> Type support for composing Slack Block Kit Messages

Latest version **1.0.1** (published 2020-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install slack-blockify-types
pnpm add slack-blockify-types
yarn add slack-blockify-types
bun add slack-blockify-types
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-04-09 |
| First published | 2020-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Amit Madgula |
| Maintainers | amitsharmamad |
| Keywords | slack-block-kit, slack-blockify, slack-interactive-messages, typescript |

## Links

- npm: https://www.npmjs.com/package/slack-blockify-types
- Repository: https://github.com/AmitSharmamad/slack-blockify-types
- Homepage: https://github.com/AmitSharmamad/slack-blockify-types#readme
- Issues: https://github.com/AmitSharmamad/slack-blockify-types/issues
- npm.io page: https://npm.io/package/slack-blockify-types

## Recent versions

- 1.0.1 (latest) — 2020-04-09
- 1.0.0 — 2020-04-06

## README

# slack-blockify-types

Type support to compose Slack Block Kit Messages.

## Description

`slack-blockify-types` offers strong type support to compose Slack Block Kit messages
and modals.

## Usage

The concrete type `Message` helps you compose a block kit message.

```typescript
import { Message } from "slack-blockify-types";

const slackBlockKitMessage: Message = {
    blocks: [
        {
            type: "section",
            text: {
                type: "mrkdwn",
                text: "Get to know about this package :wink:",
            },
        },
        {
            type: "section",
            fields: [
                {
                    type: "mrkdwn",
                    text: "Package: Slack Block Kit Types",
                },
                {
                    type: "plain_text",
                    text: " ",
                },
                {
                    type: "plain_text",
                    text: "Author: Amit Madgula",
                },
                {
                    type: "plain_text",
                    text: "",
                },
            ],
        },
        {
            type: "divider",
        },
        {
            type: "context",
            elements: [
                {
                    type: "plain_text",
                    text: "Author: Amit Madgula",
                },
            ],
        },
    ],
};
```

The concrete type `Modal` helps you compose a Modal or View Message
to open a dialog (Modal or View) in the Slack.

```typescript
import { Modal } from "slack-blockify-types";

const slackBlockKitModal: Modal = {
    // compose your Slack Block Kit Modal or View ...
};
```

## Atomic types

The atomic types of slack like `Section`, `Image`, `Divider` etc...
define the models of the respective constructs.

```typescript
import {
    Block,
    Section,
    Image,
    Divider,
    Context,
    // ...
} from "slack-blockify-types";
```

## Disclaimer

Missing one or more fields in one of the blocks, might throw errors
or highlight `type` field with red squigglies. Don't worry.

Just check each of the blocks carefully to find your answer :wink:

## Authors

-   Amit Madgula (amitsharmamad@gmail.com)

---
_Source: https://npm.io/package/slack-blockify-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
