@nkootstra/block-kit 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Niels Kootstra
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,51 @@
1
- # @nkootstra/block-kit
1
+ # Block Kit for React
2
2
 
3
- Placeholder release. Install 0.1.0 or later: https://block-kit.kootstra.io
3
+ `@nkootstra/block-kit` renders Slack [Block Kit](https://docs.slack.dev/block-kit/) JSON in React, pixel-for-pixel the way Slack does. Pass it the `blocks` your app sends to `chat.postMessage` or `views.open` and it draws the message, modal or Home tab, with working buttons, menus, date pickers and inputs.
4
+
5
+ Documentation: **<https://block-kit.kootstra.io>**
6
+
7
+ ## Install
8
+
9
+ The package needs React 19 or later.
10
+
11
+ ```sh
12
+ bun add @nkootstra/block-kit @fontsource/lato @fontsource/roboto-mono
13
+ ```
14
+
15
+ Import the stylesheet and fonts once, near the root of your app, then render a message:
16
+
17
+ ```tsx
18
+ import "@nkootstra/block-kit/styles.css";
19
+ import "@fontsource/lato/400.css";
20
+ import "@fontsource/lato/700.css";
21
+ import { BlockKitProvider, Message } from "@nkootstra/block-kit";
22
+
23
+ export function App() {
24
+ return (
25
+ <BlockKitProvider>
26
+ <Message
27
+ blocks={[
28
+ { type: "section", text: { type: "mrkdwn", text: "*Hello* from Block Kit :wave:" } },
29
+ ]}
30
+ />
31
+ </BlockKitProvider>
32
+ );
33
+ }
34
+ ```
35
+
36
+ The [installation guide](https://block-kit.kootstra.io/installation) lists the remaining font weights and the entry points, and the [quickstart](https://block-kit.kootstra.io/quickstart) wires up an interactive approval message.
37
+
38
+ ## Entry points
39
+
40
+ | Import | What it contains |
41
+ | --------------------------------- | ----------------------------------------------------------------- |
42
+ | `@nkootstra/block-kit` | Components, the provider, hooks and payload builders |
43
+ | `@nkootstra/block-kit/styles.css` | The stylesheet |
44
+ | `@nkootstra/block-kit/mrkdwn` | The mrkdwn parser, without React |
45
+ | `@nkootstra/block-kit/transport` | Sends interactions to your app's request URL from the browser |
46
+ | `@nkootstra/block-kit/server` | Signs and relays interactions to your app from your server |
47
+ | `@nkootstra/block-kit/web-api` | User, channel and usergroup resolvers backed by the Slack Web API |
48
+
49
+ ## License
50
+
51
+ [MIT](./LICENSE)