Data-display components following shadcn/ui structure where feasible.
Included:
- Avatar family (
avatar/1,avatar_group/1,avatar_group_count/1) - Table family (
table/1,table_header/1,table_body/1,table_footer/1,table_row/1,table_head/1,table_cell/1,table_caption/1) accordion/1collapsible/1code_block/1
Summary
Functions
Accordion with multiple items.
Renders a circular avatar with optional image and fallback.
Groups avatars with overlap.
Counter item for avatar groups (e.g. +3).
Monospaced code block wrapper.
Generic collapsible section with trigger/content slots.
Table wrapper with overflow container.
Table body (tbody).
Table caption (caption).
Table data cell (td).
Table footer (tfoot).
Table heading cell (th).
Table header (thead).
Table row (tr).
Functions
Accordion with multiple items.
Uses <details> for no-JS progressive enhancement.
Examples
heex title="FAQ accordion" align="full" <.accordion> <:item title="What is CinderUI?" open={true}> A Phoenix-first component library modeled after shadcn/ui patterns. </:item> <:item title="Does it require JavaScript?"> Core interactions use semantic HTML first, with optional hooks for enhancement. </:item> </.accordion>
heex title="Release notes" align="full" <.accordion> <:item title="v0.4.0 · New components" open={true}> Added pagination, tabs, and command palette docs pages. </:item> <:item title="v0.3.2 · Docs quality"> Added generated attr and slot tables plus HEEx copy snippets. </:item> <:item title="v0.3.0 · Static site"> Introduced static docs export and theme controls. </:item> </.accordion>
Screenshot

View live examples and full component docs.
Attributes
class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
item(required) - Accepts attributes:title(:string) (required)open(:boolean)
Renders a circular avatar with optional image and fallback.
Examples
heex title="Image with fallback" <.avatar src="example.png" alt="Levi" fallback="LV" />
heex title="Fallback initials only" <.avatar alt="Mira Chen" />
heex title="Sizes" <div class="flex items-center gap-3"> <.avatar size={:sm} alt="Small User" /> <.avatar alt="Default User" /> <.avatar size={:lg} alt="Large User" /> </div>
heex title="Badge" <.avatar src="example.png" alt="Online User"> <:badge class="bg-green-600 dark:bg-green-800"><span class="sr-only">Online</span></:badge> </.avatar>
heex title="Badge with icon" <.avatar class="grayscale" src="example.png" alt="Add User"> <:badge><.icon name="plus" class="size-2" /></:badge> </.avatar>
heex title="Dropdown" <.dropdown_menu id="avatar-dropdown"> <:trigger> <.avatar src="example.png" alt="Levi" /> </:trigger> <:item>Profile</:item> <:item>Billing</:item> <:item>Settings</:item> <:item>Log out</:item> </.dropdown_menu>
Screenshot
![]()
View live examples and full component docs.
Attributes
src(:string) - Defaults tonil.alt(:string) - Defaults to"".fallback(:string) - Defaults tonil.size(:atom) - Defaults to:default. Must be one of:sm,:default, or:lg.class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
badge- Accepts attributes:class(:string)
Groups avatars with overlap.
Examples
heex title="Team avatars" <.avatar_group> <.avatar src="example.png" alt="Levi" /> <.avatar src="example.png" alt="Mira" /> <.avatar src="example.png" alt="Shadcn" /> <.avatar_group_count>+2</.avatar_group_count> </.avatar_group>
heex title="Fallback-only group" <.avatar_group> <.avatar alt="Levi Buzolic" /> <.avatar alt="Mira Jones" /> <.avatar alt="Sam Patel" /> </.avatar_group>
Screenshot
![]()
View live examples and full component docs.
Attributes
class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)
Counter item for avatar groups (e.g. +3).
Example
heex title="Avatar overflow count" <.avatar_group> <.avatar alt="Levi Buzolic" /> <.avatar alt="Mira Jones" /> <.avatar_group_count size={:sm}>+3</.avatar_group_count> </.avatar_group>
## Screenshot
![]()
View live examples and full component docs.
## Attributes
size (:atom) - Defaults to :default. Must be one of :sm, :default, or :lg.
class (:string) - Defaults to nil.
* Global attributes are accepted.
## Slots
* inner_block (required)
Monospaced code block wrapper.
Example
heex title="Code block" align="full" <.code_block> mix cinder_ui.docs.build </.code_block>
## Screenshot

View live examples and full component docs.
## Attributes
id (:string) - Defaults to nil.
class (:string) - Defaults to nil.
* Global attributes are accepted.
## Slots
* inner_block (required)
Generic collapsible section with trigger/content slots.
Uses <details> for accessibility and no-JS behavior.
Example
heex title="Collapsible details" align="full" <.collapsible open={true}> <:trigger> Release notes </:trigger> Added generated attr tables and improved examples. </.collapsible>
## Screenshot

View live examples and full component docs.
## Attributes
open (:boolean) - Defaults to false.
class (:string) - Defaults to nil.
* Global attributes are accepted.
## Slots
trigger (required)
inner_block (required)
Table wrapper with overflow container.
Examples
heex title="Service status table" align="full" <.table> <.table_caption>Active deployments across environments.</.table_caption> <.table_header> <.table_row> <.table_head>Service</.table_head> <.table_head>Status</.table_head> <.table_head class="text-right">Latency</.table_head> </.table_row> </.table_header> <.table_body> <.table_row> <.table_cell>API</.table_cell> <.table_cell>Healthy</.table_cell> <.table_cell class="text-right">82ms</.table_cell> </.table_row> <.table_row> <.table_cell>Worker</.table_cell> <.table_cell>Degraded</.table_cell> <.table_cell class="text-right">164ms</.table_cell> </.table_row> </.table_body> </.table>
heex title="Invoice summary table" align="full" vrt <.table> <.table_header> <.table_row> <.table_head>Invoice</.table_head> <.table_head>State</.table_head> <.table_head class="text-right">Amount</.table_head> </.table_row> </.table_header> <.table_body> <.table_row> <.table_cell>INV-001</.table_cell> <.table_cell>Paid</.table_cell> <.table_cell class="text-right">$120.00</.table_cell> </.table_row> <.table_row state="selected"> <.table_cell>INV-002</.table_cell> <.table_cell>Pending</.table_cell> <.table_cell class="text-right">$48.00</.table_cell> </.table_row> </.table_body> <.table_footer> <.table_row> <.table_cell class="font-medium" colspan="2">Total</.table_cell> <.table_cell class="text-right font-medium">$168.00</.table_cell> </.table_row> </.table_footer> </.table>
Minimal
heex title="Minimal table" <.table> <.table_header> <.table_row> <.table_head>Name</.table_head> </.table_row> </.table_header> </.table>
## Screenshot

View live examples and full component docs.
## Attributes
class (:string) - Defaults to nil.
Global attributes are accepted.
## Slots
* inner_block (required)
Table body (tbody).
Example
heex title="Table body" align="full" <.table> <.table_body> <.table_row> <.table_cell>API</.table_cell> <.table_cell>Healthy</.table_cell> </.table_row> </.table_body> </.table>
## Screenshot

View live examples and full component docs.
## Attributes
class (:string) - Defaults to nil.
Global attributes are accepted.
## Slots
* inner_block (required)
Table caption (caption).
Example
heex title="Table caption" align="full" <.table> <.table_caption>Recent invoices</.table_caption> </.table>
## Screenshot

View live examples and full component docs.
## Attributes
class (:string) - Defaults to nil.
Global attributes are accepted.
## Slots
* inner_block (required)
Table data cell (td).
Example
heex title="Data cell" align="full" <.table> <.table_body> <.table_row> <.table_cell>$48.00</.table_cell> </.table_row> </.table_body> </.table>
## Screenshot

View live examples and full component docs.
## Attributes
class (:string) - Defaults to nil.
Global attributes are accepted. Supports all globals plus: ["colspan", "rowspan"].
## Slots
* inner_block (required)
Table heading cell (th).
Example
heex title="Header cell" align="full" <.table> <.table_header> <.table_row> <.table_head class="text-right">Amount</.table_head> </.table_row> </.table_header> </.table>
## Screenshot

View live examples and full component docs.
## Attributes
class (:string) - Defaults to nil.
Global attributes are accepted.
## Slots
* inner_block (required)
Table header (thead).
Example
heex title="Table header" align="full" <.table> <.table_header> <.table_row> <.table_head>Name</.table_head> <.table_head>Status</.table_head> </.table_row> </.table_header> </.table>
## Screenshot

View live examples and full component docs.
## Attributes
class (:string) - Defaults to nil.
Global attributes are accepted.
## Slots
* inner_block (required)
Table row (tr).
Example
heex title="Selected row" align="full" <.table> <.table_body> <.table_row state="selected"> <.table_cell>INV-002</.table_cell> <.table_cell>Pending</.table_cell> </.table_row> </.table_body> </.table>
## Screenshot

View live examples and full component docs.
## Attributes
class (:string) - Defaults to nil.
state (:string) - Defaults to nil.
* Global attributes are accepted.
## Slots
* inner_block (required)
