본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

PageFeature

원문 보기 위키 갱신

애플리케이션의 핵심 기능을 소개할 때 사용하는 컴포넌트예요.

출처: Nuxt UI

본문

사용법

PageFeature 컴포넌트는 PageSection 컴포넌트에서 features를 표시할 때 사용해요.

Title

title prop으로 기능의 제목을 설정해 주세요.

<template>
  <UPageFeature title="Theme" />
</template>

Description

description prop으로 기능의 설명을 설정해 주세요.

<template>
  <UPageFeature title="Theme" description="Customize Nuxt UI with your own colors, fonts, and more." />
</template>

Icon

icon prop으로 기능의 아이콘을 설정해 주세요.

<template>
  <UPageFeature title="Theme" description="Customize Nuxt UI with your own colors, fonts, and more." icon="i-lucide-swatch-book" />
</template>

<NuxtLink> 컴포넌트의 어떤 속성이든 to, target, rel 등으로 전달할 수 있어요.

<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

orientation prop으로 기능의 배치 방향을 바꿀 수 있어요. 기본값은 horizontal이에요.

<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

/**
 * Props for the PageFeature component
 */
interface PageFeatureProps {
  /**
   * The element or component this component should render as.
   * @default 'div'
   */
  as?: any;
  /**
   * The icon displayed next to the title when `orientation` is `horizontal` and above the title when `orientation` is `vertical`.
   */
  icon?: any;
  title?: string | undefined;
  description?: string | undefined;
  /**
   * The orientation of the page feature.
   * @default 'horizontal'
   */
  orientation?: "horizontal" | "vertical" | undefined;
  to?: string | it | et | undefined;
  target?: null | "_blank" | "_parent" | "_self" | "_top" | string & {} | undefined;
  onClick?: (event: MouseEvent): void | undefined;
  ui?: { root?: SlotClass; wrapper?: SlotClass; leading?: SlotClass; leadingIcon?: SlotClass; title?: SlotClass; description?: SlotClass; } | undefined;
}

Slots

/**
 * Slots for the PageFeature component
 */
interface PageFeatureSlots {
  leading(): any;
  title(): any;
  description(): any;
  default(): any;
}

테마

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'
          }
        }
      }
    }
  }
})

변경 기록

컴포넌트와 테마의 커밋 기록을 확인해 주세요.


사이트맵

전체 페이지 목록은 사이트맵에서 확인할 수 있어요.

더 알아보기 (Learn more)