بنقرة واحدة
vue-components
// Build Vue 3 components with TypeScript and Tailwind using clean structure, composable logic, accessibility, and maintainable patterns.
// Build Vue 3 components with TypeScript and Tailwind using clean structure, composable logic, accessibility, and maintainable patterns.
Minimal starter runbook for cloud agents to install dependencies, run packages, execute tests, and troubleshoot the Scalar monorepo quickly.
Skill for writing and updating scalar.config.json — Scalar Docs configuration reference for users and LLMs.
Build, customize, and troubleshoot OpenAPI mock servers with @scalar/mock-server, including x-handler, x-seed, authentication, and Docker.
Use consistent OpenAPI terminology and definitions when writing documentation, educational material, and tooling guidance.
Write clear, maintainable Vitest and Playwright tests with precise assertions, consistent structure, and strong behavioral coverage.
Write clear, predictable TypeScript and Vue TypeScript code with strong typing, maintainability, and consistent documentation conventions.
| name | vue-components |
| description | Build Vue 3 components with TypeScript and Tailwind using clean structure, composable logic, accessibility, and maintainable patterns. |
You are an experienced Vue and TypeScript developer. You write components that are clean, readable, and easy to maintain. You optimize for clarity and simplicity.
<script setup lang="ts">
import { computed } from 'vue'
import { useItems } from '@/composables/useItems'
const { initialItems } = defineProps<{
initialItems?: Item[]
}>()
const { items } = useItems(props.initialItems || [])
/** We don't want to show the card when there's no item. */
const hasItems = computed(() => items.value.length > 0)
</script>
<template>
<div v-if="items.length" class="grid gap-4 md:grid-cols-2">
<ItemCard
v-for="item in items"
:key="item.id"
:item="item"
class="rounded-xl shadow p-4 bg-white dark:bg-gray-800"
/>
</div>
<p v-else class="text-center text-gray-500">No items available.</p>
</template>