The HTML components and helpers for building Inertia views.
Summary
Functions
Renders a <title> tag that includes the inertia attribute needed for the
Inertia client-side library to subsequently manage the page title.
Functions
Attributes
content(:list) (required) - The list of tags to inject into theheadtag.
Renders a <title> tag that includes the inertia attribute needed for the
Inertia client-side library to subsequently manage the page title.
The content you provide to this component will only apply to the initial
server-rendered response. You will also need to use the client-side <Head>
component in your Inertia page
components to be sure the the page title is updated when internal navigation
occurs.
If you are planning to manage page titles from the server-side, you may find
it useful to expose the page_title:
via regular assigns, so server-side
<.inertia_title>can use it.via Inertia page props, so client-side
<Head>can use it.def index(conn, _params) page_title = "My page title"
conn |> assign(:page_title, page_title) |> inertia_put_prop(:page_title, page_title) |> inertia_render("MyPage") end
Slots
inner_block(required) - Content rendered inside thetitletag.