# `ExIcon.Provider`
[🔗](https://github.com/woylie/ex_icon/blob/1.0.0/lib/ex_icon/provider.ex#L1)

Behaviour for icon providers.

# `release_url`

```elixir
@callback release_url(version) :: url when version: String.t(), url: String.t()
```

Returns the download URL for the release with the given version.

The URL must point to a zip file, and must use https unless it points at the
local machine. Only this URL is checked: the HTTP client follows redirects,
which may lead to another host or to plain http.

# `svg_folder`

```elixir
@callback svg_folder(version) :: String.t() when version: String.t()
```

Returns the folder that contains the SVG files in the unpacked release.

For a provider with variants, this is the folder of the variant to use when
the configuration does not select any.

# `variants`
*optional* 

```elixir
@callback variants(version) :: %{required(atom()) =&gt; Path.t()} when version: String.t()
```

Returns the folder of each variant of the icon library.

Some icon libraries ship the same icons in multiple styles, such as outlined
and filled. Providers for such libraries implement this callback, which allows
the `variants` configuration option to select them. Each variant is generated
into a module of its own.

This callback is optional. Without it, the library has a single variant, and
the `variants` option cannot be used.

## Example

    def variants(version) do
      %{
        outline: "heroicons-#{version}/optimized/24/outline",
        solid: "heroicons-#{version}/optimized/24/solid"
      }
    end

---

*Consult [api-reference.md](api-reference.md) for complete listing*
