Markdown docs
Heading
This is Twig implementation of the Heading component.
Basic example usage:
<Heading>Heading</Heading>
Advanced example usage:
<Heading size="large" elementType="h2">Text content</Heading>
Without lexer:
{% embed "@spirit/heading.twig" with { props: {
size: 'medium'
}} %}
{% block content %}
Text content
{% endblock %}
{% endembed %}
API
Name | Type | Default | Required | Description |
---|---|---|---|---|
size | Size Extended dictionary | medium | ✕ | Size of the text |
elementType | string | div | ✕ | HTML tag to render |
translate | [yes | no | ''] | null | ✕ | Set to no to disable machine translation of the text content |
On top of the API options, the components accept additional attributes. If you need more control over the styling of a component, you can use style props and escape hatches.