Composable React + Tailwind component library for building Vibing apps, agents and plugins. Includes fully-typed props, dark-mode tokens and a Storybook playground.
# Using npm
npm install @vibing-ai/block-kit
# Using yarn
yarn add @vibing-ai/block-kit
# Using pnpm
pnpm add @vibing-ai/block-kit
Wrap your application with the BlockKitProvider
and start using components:
import {
BlockKitProvider,
TextBlock,
ButtonBlock,
BlockContainer
} from '@vibing-ai/block-kit';
function App() {
return (
<BlockKitProvider theme="light">
<BlockContainer>
<TextBlock
id="welcome-text"
content="Welcome to Vibing Block Kit"
/>
<ButtonBlock
id="start-button"
label="Get Started"
onClick={() => console.log('Button clicked!')}
/>
</BlockContainer>
</BlockKitProvider>
);
}
export default App;
import {
BlockKitProvider,
AIChatBlock,
BlockContainer
} from '@vibing-ai/block-kit';
function AIChat() {
const handleSend = async (message) => {
// Call your AI service here
return "This is a response from the AI";
};
return (
<BlockKitProvider theme="dark">
<BlockContainer>
<AIChatBlock
id="chat-interface"
initialMessages={[
{ role: 'system', content: 'Welcome! How can I help you today?' }
]}
onSendMessage={handleSend}
/>
</BlockContainer>
</BlockKitProvider>
);
}
import {
BlockKitProvider,
TextBlock,
ChartBlock,
TableBlock,
BlockGroup,
WidgetGrid
} from '@vibing-ai/block-kit';
function Dashboard() {
const chartData = {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
datasets: [{
label: 'Sales',
data: [12, 19, 3, 5, 2]
}]
};
const tableData = {
headers: ['ID', 'Name', 'Value'],
rows: [
['1', 'Item A', '$100'],
['2', 'Item B', '$200'],
['3', 'Item C', '$300']
]
};
return (
<BlockKitProvider theme="light">
<TextBlock id="dashboard-title" content="Sales Dashboard" variant="heading" />
<WidgetGrid columns={2}>
<ChartBlock
id="sales-chart"
title="Monthly Sales"
data={chartData}
type="bar"
/>
<TableBlock
id="sales-table"
title="Top Products"
data={tableData}
/>
</WidgetGrid>
</BlockKitProvider>
);
}
Vibing Block Kit organizes components into intuitive categories:
TextBlock
: Display rich text contentMarkdownBlock
: Render markdown contentCodeBlock
: Display formatted code with syntax highlightingImageBlock
: Display images with optional captionsInputBlock
: Text input fields with validationFormBlock
: Complete form with multiple field typesSliderBlock
: Range selection controlCheckboxBlock
: Binary selection controlsTableBlock
: Display tabular dataChartBlock
: Visualize data with chartsDataGridBlock
: Advanced data grid with sorting and filteringAIChatBlock
: Interactive AI chat interfaceAICompletionBlock
: Text completion interfaceAIControlBlock
: Control panel for AI settingsBlockContainer
: Wrapper for blocks with consistent stylingBlockGroup
: Group related blocks togetherBoardView
: Kanban-style board layoutDocumentView
: Document-oriented layoutBlockModal
: Modal dialog for focused interactionsContextPanel
: Side panel for contextual informationToolPalette
: Floating toolbarWidget
: Self-contained component for dashboardsBlock Kit provides several ways to customize the appearance:
// Light theme
<BlockKitProvider theme="light" />
// Dark theme
<BlockKitProvider theme="dark" />
// Use system preference
<BlockKitProvider useSystemTheme />
import { createCustomTheme, BlockKitProvider } from '@vibing-ai/block-kit';
const customTheme = createCustomTheme({
base: 'light', // or 'dark'
colors: {
primary: '#3498db',
secondary: '#2ecc71',
accent: '#9b59b6',
success: '#2ecc71',
warning: '#f39c12',
error: '#e74c3c',
background: '#f5f5f5',
text: '#333333',
},
borderRadius: '8px',
fontFamily: '"Inter", sans-serif',
});
function App() {
return (
<BlockKitProvider theme={customTheme}>
<YourApp />
</BlockKitProvider>
);
}
import { useState } from 'react';
import { BlockKitProvider, ButtonBlock } from '@vibing-ai/block-kit';
function App() {
const [theme, setTheme] = useState('light');
return (
<BlockKitProvider theme={theme}>
<ButtonBlock
id="theme-toggle"
label={`Switch to ${theme === 'light' ? 'Dark' : 'Light'} Mode`}
onClick={() => setTheme(theme === 'light' ? 'dark' : 'light')}
/>
<YourApp />
</BlockKitProvider>
);
}
For complete documentation and interactive examples:
# Clone the repository
git clone https://github.com/vibing-ai/vibing-block-kit.git
cd vibing-block-kit
# Install dependencies
npm install
# Start Storybook development environment
npm run storybook
# Run tests
npm test
# Build the library
npm run build
We welcome contributions from the community! Whether it's bug fixes, feature enhancements, or documentation improvements, please check our CONTRIBUTING.md guide for:
Upcoming features and improvements:
Q: Does Vibing Block Kit work with Next.js?
A: Yes, Block Kit is fully compatible with Next.js projects, including both the Pages and App Router.
Q: Can I use Block Kit with other UI libraries like MUI or Chakra UI?
A: Yes, Block Kit components can be used alongside other UI libraries. We recommend wrapping Block Kit components within their own BlockKitProvider
to avoid style conflicts.
Q: How do I contribute a new component?
A: See our CONTRIBUTING.md guide, which includes detailed instructions for component development and submission.
Q: Is there a size limit concern for production apps?
A: Block Kit is fully tree-shakeable, meaning unused components won't be included in your final bundle, keeping the size optimized.
Vibing Block Kit is licensed under the MIT License - see the LICENSE file for details.