Icon Button
Display an icon button.
Usage
Styled button component variants for single icons.
<template>
<CIconButton icon="i-heroicons-home" />
</template>
Variant
<template>
<CIconButton variant="flat" icon="i-heroicons-home" />
</template>
Size
If using the #default slot with CIcon, the icon will not inherit the child icon size styles. The size will need to be defined again on the CIcon component using size.
<template>
<CIconButton size="xl" icon="i-heroicons-home" />
</template>
Disabled
<template>
<CIconButton disabled icon="i-heroicons-home" />
</template>
Props
| Prop | Default | Type |
|---|---|---|
to | string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric
| |
disabled | false | boolean |
label | string | |
size | 'md' | "md" | "sm" | "lg" | "xl" | "2xl" | "xs" |
variant | 'default' | "default" | "flat" | "destructive" | "outlined" | "subtle" | "image" |
type | 'button' | "reset" | "submit" | "button" |
icon | string | |
custom | false | |
target | null | "_self" | "_blank" | "_parent" | "_top" | string & {} | |
trailingSlash | "append" | "remove" |