View Source Inertia.HTML (Inertia v2.5.1)
HTML components for Inertia views.
Summary
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.js client-side 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.js client-side 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 your
<.inertia_title> can use it) AND via Inertia page props (so your client-side
<Head> use it):
def index(conn, _params)
page_title = "Your page title"
conn
|> assign(:page_title, page_title)
|> assign_prop(:page_title, page_title)
|> render_inertia("YourPage")
endAttributes
prefix(:string) - A prefix added before the content ofinner_block. Defaults tonil.suffix(:string) - A suffix added after the content ofinner_block. Defaults tonil.
Slots
inner_block(required) - Content rendered inside thetitletag.