Centered hero with three-part uppercase heading (middle word highlighted with primary gradient), supporting description, and optional primary/secondary CTA buttons. Uses design tokens for typography, color, and radius; no external dependencies.
Prop | Type | Default / Req. | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
headingParts | Array | required | An array of three strings used to assemble the heading. | ||||||||||||
| |||||||||||||||
description | String | required | The main descriptive text shown below the heading. | ||||||||||||
primaryCta | Object | — | Configuration for the primary call-to-action button. | ||||||||||||
secondaryCta | Object | — | Configuration for the secondary call-to-action button. |
You may use these UI components in your own personal or commercial projects. You may not resell, redistribute, sublicense, or package them as standalone assets or template/library packs.
Full terms: End-User License Agreement
Below you can expand the main implementation file and any supporting components. Use the “Copy” button to grab a snippet straight to your clipboard.
These are the raw components that are required to run this example. Copy-paste them into your project. Most likely you will not change anything in these files, but you can if you want to. These are the components that are used in the main implementation file.
<!-- components/Hero.vue -->
<script setup>
const props = defineProps({
headingParts: {
type: Array,
required: true,
validate: arr => arr.length === 3 && arr.every(p => typeof p === 'string'),
},
description: {
type: String,
required: true,
},
primaryCta: {
type: Object,
required: false,
validator: obj => obj.label && obj.link,
},
secondaryCta: {
type: Object,
required: false,
validator: obj => obj.label && obj.link,
},
})
</script>
<template>
<section class="flex-grow flex items-center justify-center text-center font-iq-paragraph leading-iq-paragraph tracking-iq-paragraph text-iq-paragraph-color">
<div class="max-w-4xl">
<h2 class="text-5xl md:text-7xl font-extrabold font-iq-header leading-iq-header tracking-iq-header text-iq-header-color uppercase flex flex-col items-center">
{{ headingParts[0] }}
<span
class="text-transparent bg-clip-text bg-iq-primary iq-gradient"
>
{{ headingParts[1] }}
</span>
{{ headingParts[2] }}
</h2>
<p class="mt-6 text-lg md:text-xl ">
{{ description }}
</p>
<div class="mt-10 flex flex-wrap justify-center gap-6">
<NuxtLink
v-if="primaryCta"
:to="primaryCta.link"
class="inline-flex items-center justify-center px-8 py-4 rounded-iq-roundness bg-iq-primary iq-gradient text-iq-paragraph-secondary-color font-semibold iq-cta "
>
{{ primaryCta.label }}
</NuxtLink>
<NuxtLink
v-if="secondaryCta"
:to="secondaryCta.link"
class="inline-flex items-center justify-center px-8 py-4 rounded-iq-roundness bg-iq-primary/10 ring-1 ring-iq-primary/20 text-iq-paragraph-color backdrop-blur-md hover:bg-iq-primary/20 hover:ring-iq-primary/40 iq-cta"
>
{{ secondaryCta.label }}
</NuxtLink>
</div>
</div>
</section>
</template>
This is the main Vue file that uses the component. Copy-paste this into your project. In this code feel free to change anything you like, such as the component name, props, or class. This is the place where you control the main component.
<!-- pages/hero.vue -->
<script setup>
const headingParts = [
'Revolutionize Your',
'UI Development',
'Workflow'
]
const description = `
Ever tried to use free UI components, only to find they don't match your site's
style? We understand—now meet the solution.
`.trim()
const primaryCta = {
label: 'Explore Features',
link: '/browse'
}
const secondaryCta = {
label: 'Get started',
link: '#'
}
</script>
<template>
<div class="iq-card-glass max-w-7xl mx-auto px-6 py-16">
<HeroCentral
:headingParts="headingParts"
:description="description"
:primaryCta="primaryCta"
:secondaryCta="secondaryCta"
/>
</div>
</template>
Decide whether you want a global design-system or a one-off inline snippet.
Complete @theme
block – import once and share across every component.
Copy the code below into main.css
file. It is most likely in assets/css/main.css
directory.
:style
binding – paste straight onto any of ours components.
Copy the code below and paste it into the :style
binding of the component.
I wish I could automate every little thing—but for now you’ll need to handle these final steps by hand. Apologies for the extra work!
iq-card-*
style Now that you’ve picked a card preset, copy its CSS into your @layer components
block in main.css
. This ensures every `iq-card
` wrapper will look just right.
iq-cta
iq-cta is the main call to action button class. It’s used in many places across the components. But for now it is only a single class that you can customize. You can copy the code below and paste it into your @layer components
block in main.css
. In future you will be able to fully customize it from our UI and choose from many presets.
I didn't have time to figure out consistency. Although there are no actions required, be mindful that the forms might not be entirely consistent with the design system. A quick once-over will keep everything looking sharp.