Govspeak content example

Attachment link

Attachment link component rendered within Govspeak

How it looks (preview)

A reference to my Attachment (PDF, 1 KB, 2 pages) that is in my paragraph.

How to call this example

<%= render "govuk_publishing_components/components/govspeak", {
} do %>
  <p>
  A reference to my
  <%= render "govuk_publishing_components/components/attachment_link",
      attachment: { url: "https://example.com/file.pdf",
                    title: "Attachment",
                    file_size: 1024,
                    content_type: "application/pdf",
                    number_of_pages: 2 }
  %>
  that is in my paragraph.
</p>
<% end %>