Installation
Get started with Kookie BlocksKookie Blocks is built on top of Kookie UI and provides higher-level components like Hero sections, CodeBlocks with syntax highlighting, and documentation layouts.
Kookie Blocks is in beta. Components and APIs are still evolving, and breaking changes may happen. Check changelogs carefully before upgrading.
Install
Add Kookie Blocks to your project using your preferred package manager:
shellshellshellRequirements
Kookie Blocks requires Kookie UI as a peer dependency. Make sure you have both installed:
jsonCSS
Import both Kookie UI and Kookie Blocks stylesheets in your application entry point. The CSS imports must come before any component imports.
tsxTheme Provider
Kookie Blocks uses Kookie UI's theming system. Wrap your application with the Theme component:
tsxFramework Setup
Next.js App Router
For Next.js 13+ with the App Router, import the CSS in your root layout:
tsxVite + React
For Vite projects, import the CSS in your main entry file:
tsxUsage
Import components and start building:
tsxAvailable Blocks
Kookie Blocks includes the following components:
Content Blocks
Hero- Hero section for landing pagesCodeBlock- Syntax-highlighted code displayStreamingMarkdown- Markdown renderer with streaming support
Documentation Blocks
DocsShell- Complete documentation layout shellDocsSidebar- Navigation sidebar for docsDocsPage- Page layout wrapperTableOfContents- Auto-generated table of contents
Troubleshooting
CSS Not Loading
Ensure both Kookie UI and Kookie Blocks CSS imports come before any component imports:
tsxMissing Kookie UI
Kookie Blocks requires Kookie UI as a peer dependency. Install it if missing:
shell