Add blocks section with pre-built UI patterns#246
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
@copilot Creating an optimized production build ... |
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Fixed in b376898. The issue was that icon components were using the |
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive "Building Blocks" section to the ObjectUI documentation, providing pre-built, production-ready UI patterns that users can copy and paste into their applications. Inspired by shadcn/ui blocks, this implementation leverages ObjectUI's schema-driven architecture to deliver 20+ ready-to-use block examples across 5 categories.
Changes:
- Added complete blocks documentation section with interactive demos and copy-paste functionality
- Implemented 5 block categories: Authentication, Dashboard, Forms, Marketing, and E-commerce
- Fixed icon component property bug (changed from
icontonameto match ObjectUI spec)
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| content/docs/meta.json | Added "blocks" section to main documentation navigation |
| content/docs/blocks/meta.json | Configured blocks subsection with 5 categories |
| content/docs/blocks/index.mdx | Created comprehensive overview page explaining blocks concept, usage, and customization |
| content/docs/blocks/authentication.mdx | Added 4 authentication UI blocks: login, signup, password reset, and 2FA forms |
| content/docs/blocks/dashboard.mdx | Added 3 dashboard blocks: stats cards, recent activity, and overview layout |
| content/docs/blocks/forms.mdx | Added 4 form blocks: contact, settings, newsletter signup, and payment forms |
| content/docs/blocks/marketing.mdx | Added 4 marketing blocks: pricing table, feature grid, CTA section, and testimonials |
| content/docs/blocks/ecommerce.mdx | Added 4 e-commerce blocks: product card, product grid, shopping cart, and order summary |
Building Blocks Section - Complete Implementation
This PR adds a comprehensive "Building Blocks" section to the ObjectUI documentation, similar to shadcn/ui blocks. The blocks section provides pre-built, production-ready UI patterns that users can copy and paste into their applications.
✅ Completed Items
🐛 Bug Fix
Fixed prerender error on
/docs/blocks/dashboardpage by correcting icon component property fromicontoname. The icon component in ObjectUI uses thenameproperty, noticon.Changed in all block files:
{ type: "icon", - icon: "dollar-sign", + name: "dollar-sign", className: "h-4 w-4" }📸 Screenshots
Blocks Index Page:

Authentication Blocks (Preview):

Authentication Blocks (Code View):

🎯 Key Features
📝 Block Categories
Authentication Blocks (
/docs/blocks/authentication)Dashboard Blocks (
/docs/blocks/dashboard)Form Blocks (
/docs/blocks/forms)Marketing Blocks (
/docs/blocks/marketing)E-commerce Blocks (
/docs/blocks/ecommerce)🔧 Technical Implementation
InteractiveDemocomponent from apps/sitenameproperty)📖 Documentation Structure
🚀 Usage Example
Users can now browse blocks, preview them, copy the JSON schema, and integrate into their apps:
📚 Related Documentation
Note: This implementation follows the shadcn/ui blocks pattern while maintaining ObjectUI's schema-driven approach. All blocks are open source, free to use, and fully customizable.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.