defmodule Shino.UI.Progress do @moduledoc """ Provides progress related components. > Displays an indicator showing the completion progress of a task, typically > displayed as a progress bar. ## References * [shadcn/ui - Progress](https://ui.shadcn.com/docs/components/progress). * [@radix-ui/primitives - Progress](https://www.radix-ui.com/primitives/docs/components/progress) """ use Shino.UI, :component @doc """ Renders a progress bar. ## Examples ```heex <.progress value={0} /> <.progress value={100} /> ``` Customize the height of progress bar: ```heex <.progress value={22} class="h-2"/> ``` """ attr :value, :integer, default: 0 attr :class, :string, default: nil attr :rest, :global def progress(assigns) do assigns = assign(assigns, :value, validate_value!(assigns[:value])) ~H"""