본문으로 건너뛰기
cccskills
무료GitHub에 공개

frontend-component

Vue component structure, styling, derived state, modals, icons, DaisyUI/Tailwind frontend component conventions. Use when editing Vue components, SCSS, or frontend src TypeScript.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nerds-odd-e/doughnut스타 50(GitHub 50 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Frontend Component Rules

File Organization

  • Frontend code lives in frontend/src/.
  • Test code lives in frontend/tests/.
  • Generated backend API code is in frontend/src/generated/backend.

Core Technologies

  • Vue 3 with TypeScript.
  • DaisyUI + Tailwind for styling: unprefixed Tailwind utilities (flex, text-primary, …) and daisy--prefixed DaisyUI component classes (daisy-btn, daisy-card, …).
  • Vitest for testing with Playwright browser mode.
  • Biome for linting and formatting.

Icons

  • Prefer Lucide for normal UI icons via @lucide/vue (import { IconName } from "@lucide/vue"). Import only the icons each file needs; rely on currentColor so icons follow text/theme color.
  • @lucide/vue defaults to 24x24 via the size prop. Use :size="..." and/or Tailwind w-*, h-*, or size-* on icons.

Naming Conventions

  • Component files should use PascalCase, for example NoteShow.vue or GlobalBar.vue.
  • Test files should match component names with a .spec.ts suffix.
  • Use .vue for components and .ts for TypeScript files.

Component Structure

<script setup lang="ts">
import { computed, onMounted, ref } from "vue"

const props = defineProps<{
  value: string
}>()
const emit = defineEmits<{
  (e: "update:value", value: string): void
}>()

const loading = ref(false)
const displayValue = computed(() => props.value.toUpperCase())

const handleClick = () => {
  emit("update:value", "new value")
}

onMounted(() => {
  // ...
})
</script>

<template>
  <div class="daisy-component">
    <!-- template content -->
  </div>
</template>

<style scoped lang="scss">
// scoped styles
</style>

Modals And Dialogs

  • Use Modal from @/components/commons/Modal.vue for modal overlays. It wraps a native <dialog> teleported to body and centralizes stacking, ESC, backdrop click, and route-change close. The dim background is the native ::backdrop pseudo-element.
  • Put panel content in #body, optionally #header. Listen for @close_request to hide the modal, such as parent v-if or clearing model state. The overlay X is optional via showCloseButton on Modal.
  • Use v-if on Modal when the dialog opens, or keep Modal mounted and drive visibility from props; wire close_request and cancel buttons to the same close handler.
  • Layout variants: alignTop pins the panel to the top of the viewport, sidebar="left" | "right" renders a full-height side panel. Use isPopup for nested popups via usePopups so they do not participate in the ESC modal stack.
  • In tests, the dialog renders inside document.body. Query the DOM via document.querySelector("dialog"), .close-button, .modal-container, .modal-sidebar, or .modal-mask, not the dialog's internal layout wrapper.

Derived State

  • Avoid cache state in refs. Do not keep a separate ref or reactive field that mirrors props, other refs, or store data and that you update in watchers, onUpdated, or event handlers to stay in sync.
  • Prefer computed whenever a value is fully determined by reactive inputs. Computed values stay correct when dependencies change and avoid manual sync.
  • Use ref / reactive for real mutable state: user input, explicit UI toggles, or data you own and mutate.

CSS And Styling

  • Use DaisyUI classes with the daisy- prefix, for example daisy-btn or daisy-alert.
  • Avoid Bootstrap classes.
  • Choose theme-neutral colors.
  • Use scoped styles with SCSS.
  • Follow mobile-first responsive design.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

backend

무료

Backend Java — Spring Boot controllers/services, JUnit controller tests, MakeMe. Read this first for any backend work. Use when working on the Java Spring backend.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nerds-odd-e/doughnut502026년 10월 27일 업데이트

Backend Java production code, Spring Boot controllers/services/repositories, controller return values, imports, schema ERD pointer. Use when editing backend production Java.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nerds-odd-e/doughnut502026년 10월 27일 업데이트

Backend Java tests, controller-level stable-boundary tests, JUnit, @Nested, MakeMe builders, @Transactional, parameterized tests. Use when writing or changing backend JUnit tests.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nerds-odd-e/doughnut502026년 10월 27일 업데이트

cli

무료

related to donut CLI. Use when working on donut-cli.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nerds-odd-e/doughnut502026년 10월 27일 업데이트

Set up and run the Donut dev environment on Cursor Cloud VM (no Nix). Use when working on Cloud VM, running tests on Cloud VM, or encountering command errors related to missing nix. Triggers on: cloud VM, cloud agent, no nix available, /workspace path.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nerds-odd-e/doughnut502026년 10월 27일 업데이트

Regenerate docs/database-erd.md from MySQL information_schema (Mermaid ERD: foreign keys and key columns). Use after Flyway schema changes, new migrations, or when the diagram is stale. Triggers on: database ERD, database-erd.md, export_database_erd, schema diagram, ER diagram after migration.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

nerds-odd-e/doughnut502026년 10월 27일 업데이트

nerds-odd-e의 스킬 모두 보기

이 스킬의 문제 신고