#

## :icon-code-square:&nbsp;&nbsp;info_tag

---

:::raised
<p id="text-only">Displaying items 201-220 of 1000 in total</p>
:::
<br>

:::content-center
[!button corners="pill" variant="info" icon="play-24" text="Check it out with `bundle exec pagy demo`"](/sandbox/playground/#demo)
:::

`info_tag` provides information about the content of the current pagination.

!!!warning It works with all paginators but `:keyset`
!!!

=== :icon-tools:&nbsp; Usage

```erb
<%== @pagy.info_tag(**options) %>
```

==- :icon-pin:&nbsp; Examples

```ruby Console
require 'pagy/console'
=> true

>> puts @pagy.info_tag # @pagy generated by countless/keynav doesn't have count
<span class="pagy info">Page 3 of 100</span>
=> nil

>> puts @pagy.info_tag
<span class="pagy info">Displaying items 41-60 of 1000 in total</span>
=> nil

>> puts @pagy.info_tag(id: 'the-info-tag', item_name: 'Products')
<span id="the-info-tag" class="pagy info">Displaying Products 41-60 of 1000 in total</span>
=> nil
```

==- :icon-sliders:&nbsp; Options

`id: 'my-info'`
: The `id` HTML attribute to the `span` tag wrapping the info.

`item_name: 'Products'`
: The already pluralized string that will be used in place of the default `item/items`

===
