# `Ltix.DeepLinking.ContentItem.HtmlFragment`
[🔗](https://github.com/DecoyLex/ltix/blob/main/lib/ltix/deep_linking/content_item/html_fragment.ex#L1)

An HTML fragment content item for Deep Linking responses.

Represents a chunk of HTML that the platform embeds directly.

## Options

* `:title` (`t:String.t/0`) - Title for the content item.

* `:text` (`t:String.t/0`) - Plain-text description.

* `:extensions` (`t:map/0`) - Required. Vendor-specific extension properties. The default value is `%{}`.

* `:html` (`t:String.t/0`) - Required. HTML markup to embed.

# `t`

```elixir
@type t() :: %Ltix.DeepLinking.ContentItem.HtmlFragment{
  extensions: %{optional(binary()) =&gt; any()},
  html: binary(),
  text: binary(),
  title: binary()
}
```

# `new`

```elixir
@spec new(keyword()) :: {:ok, t()} | {:error, Exception.t()}
```

Create a new HTML fragment content item.

## Examples

    iex> {:ok, fragment} = Ltix.DeepLinking.ContentItem.HtmlFragment.new(html: "<p>Hello</p>")
    iex> fragment.html
    "<p>Hello</p>"

    iex> {:error, %Ltix.Errors.Invalid{}} =
    ...>   Ltix.DeepLinking.ContentItem.HtmlFragment.new([])

---

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