Skip to content

UI Components

Generic, reusable UI components located in src/components/common/.

ComponentDescriptionDocumentation
TruncateTextText truncation with tooltipView
HeaderViewPage header componentView
TitleHeaderSection title headerView
CustomToggleCustom toggle switchView
GitBranchGit branch displayView

Truncates long text with ellipsis and optional tooltip.

<template>
<TruncateText
:text="longText"
:max-length="50"
show-tooltip
/>
</template>
<script setup lang="ts">
import TruncateText from '@/components/common/TruncateText.vue';
const longText = 'This is a very long text that needs to be truncated...';
</script>
PropTypeDefaultDescription
textstringrequiredText to display
maxLengthnumber100Maximum characters
showTooltipbooleantrueShow full text on hover

Page header with title, description, and actions slot.

<template>
<HeaderView
title="Flows"
description="Manage your automation flows"
>
<template #actions>
<Button label="Create Flow" />
</template>
</HeaderView>
</template>
PropTypeDefaultDescription
titlestringrequiredPage title
descriptionstring''Page description
SlotPropsDescription
actions-Action buttons

Section title with optional icon and action.

<template>
<TitleHeader
title="Settings"
icon="pi pi-cog"
/>
</template>
PropTypeDefaultDescription
titlestringrequiredSection title
iconstring''PrimeIcons class

Custom styled toggle switch (wrapper around PrimeVue ToggleSwitch).

<template>
<CustomToggle
v-model="isEnabled"
label="Enable feature"
/>
</template>
<script setup lang="ts">
const isEnabled = ref(false);
</script>
PropTypeDefaultDescription
modelValuebooleanfalseToggle state
labelstring''Label text
disabledbooleanfalseDisabled state
EventPayloadDescription
update:modelValuebooleanState change

Displays git branch name with icon.

<template>
<GitBranch branch="feature/new-flow" />
</template>
PropTypeDefaultDescription
branchstringrequiredBranch name

Use the component template when creating new UI components.

  • Props are typed
  • Emits are typed
  • Unit tests are added
  • Documentation is updated
  • Follows naming conventions