AK Button
ak-ui/buttonFreeComponent
Arknights-inspired action button with composable variants and slots.
Install it
npx shadcn@latest add https://ak-ui.yunyoujun.cn/r/button.jsonSource
1<script setup lang="ts">2import type { AkButtonVariant } from './types'34import '@yunyoujun/ak-ui'56withDefaults(defineProps<{7 block?: boolean8 variant?: AkButtonVariant9}>(), {10 block: false,11 variant: 'default',12})13</script>1415<template>16 <button17 type="button"18 data-slot="ak-button"19 :data-variant="variant"20 :class="[21 'ak-button',22 variant !== 'default' && `ak-button--${variant}`,23 { 'ak-button--block': block },24 ]"25 >26 <span v-if="$slots.icon" class="ak-button__icon" data-icon="inline-start">27 <slot name="icon" />28 </span>29 <span class="ak-button__label">30 <slot />31 </span>32 </button>33</template>
What it pulls in
npm packages
Files it writes
More from ak-ui
All 7 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| AK Cardcard | ak-ui | Components | Free | 1 dep · 8 files | |
| AK Input Numberinput-number | ak-ui | Components | Free | 1 dep · 2 files | |
| AK Noticenotice | ak-ui | Components | Free | 1 dep · 3 files | |
| AK Progressprogress | ak-ui | Components | Free | 1 dep · 4 files | |
| AK Statusstatus | ak-ui | Components | Free | 1 dep · 4 files | |
| AK Tabstabs | ak-ui | Components | Free | 1 dep · 4 files |
