Registration
Sprig does not use a global component registry. Import a .sprig component in another .sprig file and use its component tag; the Vite compiler recognizes the imported component. JavaScript components can be passed to the component() helper or called by application code.
html
<script setup>
import CounterCard from './CounterCard.sprig';
</script>
<template><main><CounterCard /></main></template>Keep file-based route pages under the route directory and ordinary reusable components outside it. See Creating an Application and Routing.