x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<article class="prose">
<h2>Full page preview</h2>
<p><a href="https://github.com/lookbook-hq/lookbook-demo/blob/main/app/views/pages/example.html.erb">The template for this page</a> relies on instance variables.</p>
<p>
You can use the `assign` option to set instance variable values when rendering templates in Lookbook previews:
</p>
<pre><code>class PageExamplePreview < Lookbook::Preview
def page_preview
render template: "pages/example", assigns: {
title: "Full page preview"
}
end
end</code></pre>
</article>
1
render template: "pages/example", assigns: {title: title}
Param Description Input

This is a custom panel! See the documentation for details on how to add custom panels to your Lookbook instance.

No assets to display.
Check out the button component preview to see an example with asset files.