Documentation
Templates
TypeScript
Vue
Component

Component

Vue 2

Options API

CSS Modules

<script lang="ts">
import Vue from 'vue'
 
export default Vue.extend({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div :class="$style.component">
    <p :class="$style.message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped module>
.component {
  display: flex;
  justify-content: center;
  align-items: center;
}
 
.message {
  color: #333;
}
</style>

Unstyled

<script lang="ts">
import Vue from 'vue'
 
export default Vue.extend({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div>
    <p>
      {{ message }}
    </p>
  </div>
</template>

CSS

<script lang="ts">
import Vue from 'vue'
 
export default Vue.extend({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div class="component">
    <p class="message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped>
.component {
  display: flex;
  justify-content: center;
  align-items: center;
}
 
.message {
  color: #333;
}
</style>

SCSS

<script lang="ts">
import Vue from 'vue'
 
export default Vue.extend({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div class="component">
    <p class="message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped lang="scss">
.component {
  display: flex;
  justify-content: center;
  align-items: center;
 
  .message {
    color: #333;
  }
}
</style>

Tailwind Inline

<script lang="ts">
import Vue from 'vue'
 
export default Vue.extend({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div class="flex justify-center items-center">
    <p class="text-slate-800">
      {{ message }}
    </p>
  </div>
</template>

Tailwind

<script lang="ts">
import Vue from 'vue'
 
export default Vue.extend({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div class="component">
    <p class="message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped>
.component {
  @apply flex justify-center items-center;
}
 
.message {
  @apply text-slate-800;
}
</style>

Vue 3

Options API

CSS Modules

<script lang="ts">
import { defineComponent } from 'vue'
 
export default defineComponent({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div :class="$style.component">
    <p :class="$style.message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped module>
.component {
  display: flex;
  justify-content: center;
  align-items: center;
}
 
.message {
  color: #333;
}
</style>

Unstyled

<script lang="ts">
import { defineComponent } from 'vue'
 
export default defineComponent({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div>
    <p>
      {{ message }}
    </p>
  </div>
</template>

CSS

<script lang="ts">
import { defineComponent } from 'vue'
 
export default defineComponent({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div class="component">
    <p class="message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped>
.component {
  display: flex;
  justify-content: center;
  align-items: center;
}
 
.message {
  color: #333;
}
</style>

SCSS

<script lang="ts">
import { defineComponent } from 'vue'
 
export default defineComponent({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div class="component">
    <p class="message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped lang="scss">
.component {
  display: flex;
  justify-content: center;
  align-items: center;
 
  .message {
    color: #333;
  }
}
</style>

Tailwind Inline

<script lang="ts">
import { defineComponent } from 'vue'
 
export default defineComponent({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div class="flex justify-center items-center">
    <p class="text-slate-800">
      {{ message }}
    </p>
  </div>
</template>

Tailwind

<script lang="ts">
import { defineComponent } from 'vue'
 
export default defineComponent({
  name: 'ResourceName',
  data() {
    return {
      message: "Hello, I'm a resource auto generated by Clingon CLI!"
    }
  }
})
</script>
 
<template>
  <div class="component">
    <p class="message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped>
.component {
  @apply flex justify-center items-center;
}
 
.message {
  @apply text-slate-800;
}
</style>

Composition API

Css Modules

<script setup lang="ts">
// * Data *
 
const message = "Hello, I'm a resource auto generated by Clingon CLI!"
</script>
 
<template>
  <div :class="$style.component">
    <p :class="$style.message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped module>
.component {
  display: flex;
  justify-content: center;
  align-items: center;
}
 
.message {
  color: #333;
}
</style>

Unstyled

<script setup lang="ts">
// * Data *
 
const message = "Hello, I'm a resource auto generated by Clingon CLI!"
</script>
 
<template>
  <div>
    <p>
      {{ message }}
    </p>
  </div>
</template>

CSS

<script setup lang="ts">
// * Data *
 
const message = "Hello, I'm a resource auto generated by Clingon CLI!"
</script>
 
<template>
  <div class="component">
    <p class="message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped>
.component {
  display: flex;
  justify-content: center;
  align-items: center;
}
 
.message {
  color: #333;
}
</style>

SCSS

<script setup lang="ts">
// * Data *
 
const message = "Hello, I'm a resource auto generated by Clingon CLI!"
</script>
 
<template>
  <div class="component">
    <p class="message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped lang="scss">
.component {
  display: flex;
  justify-content: center;
  align-items: center;
 
  .message {
    color: #333;
  }
}
</style>

Tailwind Inline

<script setup lang="ts">
// * Data *
 
const message = "Hello, I'm a resource auto generated by Clingon CLI!"
</script>
 
<template>
  <div class="flex justify-center items-center">
    <p class="text-slate-800">
      {{ message }}
    </p>
  </div>
</template>

Tailwind

<script setup lang="ts">
// * Data *
 
const message = "Hello, I'm a resource auto generated by Clingon CLI!"
</script>
 
<template>
  <div class="component">
    <p class="message">
      {{ message }}
    </p>
  </div>
</template>
 
<style scoped>
.component {
  @apply flex justify-center items-center;
}
 
.message {
  @apply text-slate-800;
}
</style>