Meta
Add a meta tag to the head element, or replace a meta tag with the same name and or property.
@solara.component
def Meta(name: Optional[str] = None, property: Optional[str] = None, content: Optional[str] = None):
...
This component should be used inside a Head component, e.g.:
import solara
@solara.component
def Page():
with solara.VBox() as main:
MyAwesomeComponent()
with solara.Head():
solara.Meta(name="description", property="og:description", content="My page description")
solara.Meta(property="og:title", content="My page title for social media")
solara.Meta(property="og:image", content="https://solara.dev/static/assets/images/logo.svg")
solara.Meta(property="og:type", content="website")
return main
If multiple Meta components are used with the same name+description, the 'deepest' child will take precedence.
Arguments
- name: The name of the meta tag, used in standard meta tags
- property: the property of the meta tag, used in Open Graph tags.
- content: The content of the meta tag.
Example
Nothing to see here, only in this page's source code, or by looking at the google search results for this page.