PhoenixPaper.GridItem (PhoenixPaper v0.1.0)

Copy Markdown View Source

A column-spanning child (pp_grid_item/1) of PhoenixPaper.Grid, in the spirit of MUI's Grid item.

span sets the column span (1-12) at all sizes; md optionally overrides it at the md: breakpoint and up (e.g. full-width on mobile, a third of the grid on desktop: span={12} md={4}). Only the md: breakpoint is supported for now — not the full sm/lg/xl breakpoint set MUI offers — since every value has to be a literal Tailwind class (see AGENTS.md, "Tailwind class safety"), and md: alone covers the common "stack-on-mobile, columns-on-desktop" case. Ask if you need more breakpoints; the pattern (col_span_lg/1 etc.) is mechanical to extend.

Summary

Functions

Renders a grid item. See the module doc.

Functions

pp_grid_item(assigns)

Renders a grid item. See the module doc.

Attributes

  • span (:integer) - Defaults to 12. Must be one of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12.
  • md (:integer) - Defaults to nil.Must be one of nil, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, or 12.
  • paperize (:boolean) - Defaults to true.
  • class (:any) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block (required)