Skip to content

Usage ​

Default ​

Use the default slot to set the text of the component.

vue

Types ​

Use the type prop to customize the heading's visual appearance and size.

vue

Levels ​

Use the level prop to set the semantic heading level (h1-h6). By default, the level is automatically determined by the type prop.

vue

Colors ​

Use the color prop to customize the component's color.

vue

Alignment ​

Use the align prop to set the horizontal alignment of the heading.

vue

Bolder ​

Use the bolder prop to render text with a font-weight of 900.

vue
<script setup lang="ts">
import CLHeading from '@codeandfunction/callaloo/CLHeading';
</script>

<template>
  <CLHeading>Normal Weight</CLHeading>
  <CLHeading bolder>Bolder Weight</CLHeading>
</template>

Truncate ​

Use the truncate prop to truncate the text if it overflows its container.

vue
<script setup lang="ts">
import CLHeading from '@codeandfunction/callaloo/CLHeading';
</script>

<template>
  <div style="max-width: 300px;">
    <CLHeading truncate>This is a very long heading that will be truncated when it overflows the container width</CLHeading>
  </div>
</template>

Props ​

Slots ​

Released under the MIT License.