Block kit builder containing re-usable blocks to be used on any slack app
npm install block-kit-builderThis is a simple package that can be used to create the blocks and views required to interact with users on any Slack surface. This is based on Slack's own Block Kit Builder.
``console`
npm install --save block-kit-builder
---
`javascript
const BlockKitBuilder = require("block-kit-builder");
const blocks = BlockKitBuilder.Blocks.markdown({
text: "Hello world!",
blockId: "hello_block",
...BlockKitBuilder.Accessory.button({
text: "Click me!",
style: "primary",
actionId: "click",
value: "something",
}),
});
// OR
const { Blocks, Accessory } = require("block-kit-builder");
const blocks = Blocks.markdown({
text: "Hello world!",
blockId: "hello_block",
...Accessory.button({
text: "Click me!",
style: "primary",
actionId: "click",
value: "something",
}),
});
``
---