1. Elements
  2. Header

Elements

Header

A simple HTML header element

Configuration

The header element inherits all the attributes of the base Element

In addition, it has the following attributes:

Attribute Required Description Type Example
text Yes Text to render string Hello World
size No Size of text from 1 to 6 number 4
params No Additional HTML attributes HTMLElement {class: 'red'}

Example

Input:

SVELTE
<script lang="ts">
  import { Base, Form } from 'conjure';

  const form = Base.newForm([
    {
      type: 'header',
      text: 'Sample Header at default h1 size'
    },
    {
      type: 'header',
      text: 'Another header at h4 size',
      size: 4,
      params: {
        class: 'text-orange-500'
      }
    }
  ] as const);
</script>

<Form {form} />

Output:

Sample Header at default h1 size

Another header at h4 size