Pagefeature
Un composant pour présenter les caractéristiques clés de votre application.
Utilisation
Le composant PageFeature est utilisé par le composant PageSection pour afficher features.
titre
Utilisez le prop title pour définir le titre de la fonctionnalité.
Theme
<template>
<UPageFeature title="Theme" />
</template>Description
Utilisez le prop description pour définir la description de la fonctionnalité.
Theme
Customize Nuxt UI with your own colors, fonts, and more.
<template>
<UPageFeature
title="Theme"
description="Customize Nuxt UI with your own colors, fonts, and more."
/>
</template>icône
Utilisez le prop icon pour définir l'icône de la fonctionnalité.
Theme
Customize Nuxt UI with your own colors, fonts, and more.
<template>
<UPageFeature
title="Theme"
description="Customize Nuxt UI with your own colors, fonts, and more."
icon="i-lucide-swatch-book"
/>
</template>Lien
Vous pouvez passer n'importe quelle propriété du composant <NuxtLink> telle que to, target, rel, etc.
<template>
<UPageFeature
title="Theme"
description="Customize Nuxt UI with your own colors, fonts, and more."
icon="i-lucide-swatch-book"
to="/docs/getting-started/theme/design-system"
target="_blank"
/>
</template>Orientation
Utilisez la prop orientation pour modifier l'orientation de la fonctionnalité. Par défaut à horizontal.
Theme
Customize Nuxt UI with your own colors, fonts, and more.
<template>
<UPageFeature
orientation="vertical"
title="Theme"
description="Customize Nuxt UI with your own colors, fonts, and more."
icon="i-lucide-swatch-book"
/>
</template>API
Props
| Prop | Default | Type |
|---|---|---|
as | 'div' | anyThe element or component this component should render as. |
icon | anyThe icon displayed next to the title when | |
title | string | |
description | string | |
orientation | 'horizontal' | "horizontal" | "vertical"The orientation of the page feature. |
to | string | it | et | |
target | null | "_blank" | "_parent" | "_self" | "_top" | string | |
ui | { root?: SlotClass; wrapper?: SlotClass; leading?: SlotClass; leadingIcon?: SlotClass; title?: SlotClass; description?: SlotClass; } |
Slots
| Slot | Type |
|---|---|
leading | { ui: object; } |
title | {} |
description | {} |
default | {} |
Thème
app.config.ts
export default defineAppConfig({
ui: {
pageFeature: {
slots: {
root: 'relative rounded-sm',
wrapper: '',
leading: 'inline-flex items-center justify-center',
leadingIcon: 'size-5 shrink-0 text-primary',
title: 'text-base text-pretty font-semibold text-highlighted',
description: 'text-[15px] text-pretty text-muted'
},
variants: {
orientation: {
horizontal: {
root: 'flex items-start gap-2.5',
leading: 'p-0.5'
},
vertical: {
leading: 'mb-2.5'
}
},
to: {
true: {
root: [
'outline-primary/25 has-focus-visible:outline-3',
'transition'
]
}
},
title: {
true: {
description: 'mt-1'
}
}
}
}
}
})vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ui from '@nuxt/ui/vite'
export default defineConfig({
plugins: [
vue(),
ui({
ui: {
pageFeature: {
slots: {
root: 'relative rounded-sm',
wrapper: '',
leading: 'inline-flex items-center justify-center',
leadingIcon: 'size-5 shrink-0 text-primary',
title: 'text-base text-pretty font-semibold text-highlighted',
description: 'text-[15px] text-pretty text-muted'
},
variants: {
orientation: {
horizontal: {
root: 'flex items-start gap-2.5',
leading: 'p-0.5'
},
vertical: {
leading: 'mb-2.5'
}
},
to: {
true: {
root: [
'outline-primary/25 has-focus-visible:outline-3',
'transition'
]
}
},
title: {
true: {
description: 'mt-1'
}
}
}
}
}
})
]
})Changelog
No recent changes