Renders content selectively based on the viewport size.
Useful in situations where responsiveness can not be totally encapsulated in individual components.
Either the ‘from’ or the ‘upto’ attribute is required.
<.responsive from="md"> <.table id="users" rows={@users}> <!-- this will be rendered as a table component with rows --> </.table> <./responsive> <.responsive upto="md"> <.table id="users" rows={@users}> <!-- this will be rendered as a set of card components --> <./table> <./responsive>
Resize your screen to observe the responsive rendering logic.