Usage
Default
Use the default slot to set the text of the component.
vue
Colors
Use the color prop to customize the component's color.
vue
Variants
Use the variant prop to customize the component's appearance.
vue
Sizes
Use the size prop to customize the component's size.
vue
Rounded
Use the border-radius prop to customize the border radius.
vue
Icons
Use the icon-before to position an icon before it's default slot or icon-after to position it after it's text. If the default slot has no content, it will render as an icon button.
vue
<script setup lang="ts">
import CLButton from '@codeandfunction/callaloo/CLButton';
import { CLColors, CLColorVariants, CLIconNames } from '@codeandfunction/callaloo';
</script>
<template>
<CLButton :color="CLColors.Primary" :icon-before="CLIconNames.UserCircle" :variant="CLColorVariants.Soft">Before</CLButton>
<CLButton :color="CLColors.Primary" :icon-before="CLIconNames.MoodTongueWink" :variant="CLColorVariants.Soft" />
<CLButton :color="CLColors.Primary" :icon-after="CLIconNames.TrashCan" :variant="CLColorVariants.Soft">After</CLButton>
</template>States
A button can have various states, which can be set via the active, busy and disabled props.
vue
<script setup lang="ts">
import CLButton from '@codeandfunction/callaloo/CLButton';
import { CLColors } from '@codeandfunction/callaloo';
</script>
<template>
<CLButton :color="CLColors.Primary" busy>Waiting ...</CLButton>
<CLButton :color="CLColors.Primary" busy />
<CLButton :color="CLColors.Primary" active>Active</CLButton>
<CLButton :color="CLColors.Primary" disabled>Disabled</CLButton>
</template>