secondsky/claude-skills / plugins/nuxt-ui-v4/skills/nuxt-ui-v4
nuxt-ui-v4
VerifiedNuxt UI v4 component library for building Nuxt v4 applications. 125+ accessible components with Tailwind v4, Reka UI, dark mode, theming. Use for dashboards, forms, overlays, editors, page layouts, pricing pages, or encountering component, theming, or TypeScript errors.
templates/components/ui-chat-full.vue
View on GitHub<template>
<div class="flex flex-col h-full">
<UChatMessages
:messages="chat.messages"
:status="chat.status"
:should-auto-scroll="true"
:user="{ variant: 'soft', side: 'right' }"
:assistant="{ variant: 'naked', side: 'left', avatar: { src: '/ai-avatar.png', alt: 'AI' } }"
>
<template #content="{ message }">
<template v-for="(part, index) in message.parts" :key="`${message.id}-${part.type}-${index}`">
<UChatReasoning
v-if="isReasoningUIPart(part)"
:text="part.text"
:streaming="isReasoningStreaming(message, index, chat)"
icon="i-lucide-brain"
>
<MDC
:value="part.text"
:cache-key="`reasoning-${message.id}-${index}`"
class="*:first:mt-0 *:last:mb-0"
/>
</UChatReasoning>
<UChatTool
v-else-if="isToolUIPart(part)"
:text="getToolName(part)"
:streaming="isToolStreaming(part)"
variant="card"
/>
<template v-else-if="isTextUIPart(part)">
<MDC
v-if="message.role === 'assistant'"
:value="part.text"
:cache-key="`${message.id}-${index}`"
class="*:first:mt-0 *:last:mb-0 max-w-none"
/>
<p v-else-if="message.role === 'user'" class="whitespace-pre-wrap">
{{ part.text }}
</p>
</template>
</template>
</template>
<template #actions="{ message }">
<div v-if="message.role === 'assistant'" class="flex gap-1 mt-2">
<UButton
icon="i-lucide-clipboard"
variant="ghost"
size="xs"
@click="copyMessage(message)"
/>
<UButton
icon="i-lucide-refresh-cw"
variant="ghost"
size="xs"
@click="chat.regenerate()"
/>
</div>
</template>
<template #indicator>
<div class="flex items-center gap-2 text-muted">
<UChatShimmer text="Thinking..." />
</div>
</template>
</UChatMessages>
<div class="border-t border-default p-4">
<UChatPrompt
v-model="input"
placeholder="Type your message..."
:error="chat.error"
@submit="onSubmit"
>
<UChatPromptSubmit
:status="chat.status"
@stop="chat.stop()"
@reload="chat.regenerate()"
/>
</UChatPrompt>
</div>
</div>
</template>
<script setup lang="ts">
import { isReasoningUIPart, isTextUIPart, isToolUIPart, getToolName } from 'ai'
import { Chat } from '@ai-sdk/vue'
import { isReasoningStreaming, isToolStreaming } from '@nuxt/ui/utils/ai'
const input = ref('')
const { add: addToast } = useToast()
const chat = new Chat({
onError(error) {
console.error('Chat error:', error)
}
})
function onSubmit() {
if (!input.value.trim()) return
chat.sendMessage({ text: input.value })
input.value = ''
}
async function copyMessage(message: any) {
try {
const textParts = message.parts
?.filter((p: any) => isTextUIPart(p))
.map((p: any) => p.text)
.join('\n') || ''
await navigator.clipboard.writeText(textParts)
addToast({ title: 'Copied to clipboard', color: 'success' })
} catch {
addToast({ title: 'Copy failed', color: 'error' })
}
}
</script>
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |