Skip to content

Callout ​

vue
<script setup lang="ts">
import { Callout } from '@/components/kuro/callout';
</script>

<template>
  <Callout>
    <template #icon>ℹ️</template>
    <template #title>Note</template>
    This is a helpful tip or message.
  </Callout>
</template>

Installation ​

bash
npx kuro-ui add callout
bash
npx github:Bartek-Nowak/Kuro add callout

Variants ​

Use the variant prop to change the color and mood of the callout box.

VariantDescription
infoBlue tone for neutral information
successGreen tone for success messages
warningYellow tone for warnings or cautions
dangerRed tone for critical/danger messages

Slots ​

SlotDescription
icon(optional) Icon or symbol shown on the left
title(optional) Heading text
defaultMain message content

Usage Example ​

vue
<template>
  <div class="space-y-4">
    <Callout variant="info">
      <template #icon>ℹ️</template>
      <template #title>Info</template>
      This is an informative message.
    </Callout>

    <Callout variant="success">
      <template #icon>✅</template>
      <template #title>Success</template>
      Everything went well!
    </Callout>

    <Callout variant="warning">
      <template #icon>⚠️</template>
      <template #title>Warning</template>
      Be cautious with this step.
    </Callout>

    <Callout variant="danger">
      <template #icon>🛑</template>
      <template #title>Danger</template>
      Something went wrong.
    </Callout>
  </div>
</template>