PhoenixKitProjects.Web.Components.EmptyState (PhoenixKitProjects v0.2.2)

Copy Markdown View Source

Centered icon + heading + optional sub-text + optional CTA. Used in every list view ("No projects yet.", "No templates yet.", "No tasks assigned to you right now.").

Slots

  • :cta — optional call-to-action element (typically a <.link> or button) rendered below the description.

Example

<.empty_state icon="hero-clipboard-document-list" title="No projects yet.">
  <:cta>
    <.link navigate={Paths.new_project()} class="btn btn-primary btn-xs">
      <.icon name="hero-plus" class="w-3.5 h-3.5" /> New project
    </.link>
  </:cta>
</.empty_state>

Summary

Functions

empty_state(assigns)

Attributes

  • icon (:string) - Defaults to "hero-clipboard-document-list".
  • title (:string) (required)
  • description (:string) - Defaults to nil.
  • class (:string) - Defaults to "py-16".

Slots

  • cta