# Component Structure ## Component Folders Give each complex component its own folder: ``` components/ └── analytics-chart/ ├── index.vue ├── analytics-chart-header.vue ├── analytics-chart-plot.vue ├── analytics-chart-data.ts └── use-analytics-chart.ts ``` Use the public component name in kebab case for the folder name. Use `index.vue` for the main component. This structure keeps imports short: ```ts import AnalyticsChart from '@/components/analytics-chart/index.vue' ``` You can import the folder if the local resolver supports directory indexes: ```ts import AnalyticsChart from '@/components/analytics-chart/' ``` Use the explicit `index.vue` import if TypeScript cannot resolve the directory import. ## Local Implementation Files Keep files for only one component in that component's folder: ``` analytics-chart/ ├── index.vue ├── analytics-chart-header.vue ├── analytics-chart-plot.vue ├── analytics-chart-tooltip.vue ├── chart-ranges.ts └── use-chart-hover-state.ts ``` Use local files for these items: - Small subcomponents that only the main component uses. - Local composables that only the component folder uses. - Helpers that divide a large `