This is a cool project that does cool things. It is cool to use, look at, and other stuff like that and things and stuff that we don't even know.
The Welcome component is designed to provide a centralized, eye-catching introduction or welcome message for your application or website. It allows for a large title and a description that can be a list of sentences or key points. The component is highly customizable through slots, allowing for additional content such as buttons or links to be seamlessly integrated below the welcome message.
This component does not use props for customization but instead relies on reactive variables defined within the <script setup>
block.
Default slot: Any content placed within the <HeroComponent>
component tags in the parent will be displayed at the bottom of the component. This is ideal for adding navigation buttons, links, or any call-to-action (CTA) elements.
<HeroComponent>
<Button label="Cool Button" />
<Button
label="Secondary Button"
secondary
/>
</HeroComponent>
To integrate this component into your Nuxt 3 application:
.vue
file within your project's components directory.<ButtonComponent />
) inside to make use of the slot
.<script setup lang="ts">
const title = 'WELCOME';
const description = [
"This is a cool project that does cool things. It is cool to use, look at, and other stuff like that and things and stuff that we don't even know.",
];
</script>
<template>
<div>
<div class="py-md lg:py-lg">
<div class="mx-auto max-w-xl">
<div class="mx-xs sm:mx-sm md:mx-md">
<div>
<div class="mx-auto flex flex-col items-center">
<h2
v-if="title"
class="text-center text-4xl font-bold lg:text-6xl"
>
{{ title }}
</h2>
<div v-if="description">
<div
v-for="item in description"
:key="item"
class="text-center md:text-2xl"
>
<p>{{ item }}</p>
</div>
</div>
<div class="mt-4 flex gap-4">
<slot />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>