247 words, 2 min read
What is Cinder?
Cinder transforms complex data table requirements into simple, declarative markup. With automatic type inference and intelligent defaults, you can build feature-rich tables for Ash resources and queries, with minimal configuration.
<Cinder.Table.table resource={MyApp.User} actor={@current_user}><:col :let={user} field="name" filter sort>{user.name}</:col><:col :let={user} field="email" filter>{user.email}</:col><:col :let={user} field="department.name" filter sort>{user.department.name}</:col><:col :let={user} field="settings__country" filter>{user.settings.country}</:col></Cinder.Table.table>That's it! Cinder automatically provides:
- ✅ Intelligent filter types based on your Ash resource
- ✅ Interactive sorting with visual indicators
- ✅ Pagination with efficient queries
- ✅ Relationship support via dot notation
- ✅ Embedded resource support with automatic enum detection
- ✅ URL state management for bookmarkable views
Sort and filter by calculations, aggregates, attributes, or even relationship data!
Key Features
- 🧠 Intelligent Defaults: Automatic filter type detection from Ash resource attributes
- ⚡ Minimal Configuration: 70% fewer attributes required compared to traditional table components
- 🔗 Complete URL State Management: Filters, pagination, and sorting synchronized with browser URL
- 🌐 Relationship Support: Dot notation for related fields (e.g.,
user.department.name
)- 📦 Embedded Resource Support: Double underscore notation for embedded fields (e.g.,
user__profile__bio
) with automatic enum detection- 🖱️ Interactive Row Actions: Click handlers with Phoenix LiveView JS commands for navigation, modals, and custom actions
- 🎨 Advanced Theming: 8 built-in themes (modern, retro, futuristic, dark, daisy_ui, flowbite, compact, pastel) plus powerful DSL for custom themes
- 🔧 Developer Experience: Data attributes on every element make theme development and debugging effortless
- ⚡ Real-time Filtering: Six filter types with debounced updates
- 🔐 Ash Integration: Native support for Ash Framework resources and authorization
continue reading on hexdocs.pm
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.