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

페이지 로고

원문 보기 위키 갱신

페이지 로고 (PageLogos)

페이지 로고(PageLogos)는 페이지에 로고나 이미지 목록을 유연하게 표시해주는 컴포넌트예요. "신뢰받는 기업" 섹션처럼 로고를 나란히 보여줄 때 유용하며, 마퀴(effects)로 흐르는 효과도 지원해요.

출처: Nuxt UI

본문

페이지에 표시할 로고나 이미지 목록을 담는 컴포넌트예요.

사용법 (Usage)

PageLogos 컴포넌트는 페이지에 로고나 이미지 목록을 유연하게 보여줄 수 있게 해줘요.

<template>
  <UPageLogos :items="[
  'i-simple-icons-github',
  'i-simple-icons-discord',
  'i-simple-icons-x',
  'i-simple-icons-instagram',
  'i-simple-icons-linkedin',
  'i-simple-icons-facebook'
]" />
</template>

Title (제목)

title prop으로 로고 위에 표시할 제목을 지정할 수 있어요.

<template>
  <UPageLogos title="Trusted by the best front-end teams" :items="[
  'i-simple-icons-github',
  'i-simple-icons-discord',
  'i-simple-icons-x',
  'i-simple-icons-instagram',
  'i-simple-icons-linkedin',
  'i-simple-icons-facebook'
]" />
</template>

Items (항목들)

로고는 두 가지 방법으로 표시할 수 있어요:

  1. items prop으로 로고 목록을 제공. 각 항목은 다음 중 하나가 될 수 있어요:
  • 아이콘 이름 (예: i-simple-icons-github)
  • 이미지의 src와 alt 속성을 포함하는 객체 — UAvatar 컴포넌트에서 사용돼요
  1. 콘텐츠를 완전히 제어하려면 기본 슬롯 사용
<script setup lang="ts">
const items = [
  'i-simple-icons-github',
  'i-simple-icons-discord',
  'i-simple-icons-x',
  'i-simple-icons-instagram',
  'i-simple-icons-linkedin',
  'i-simple-icons-facebook'
]
</script>

<template>
  <UPageLogos title="Trusted by the best front-end teams" :items="items" />
</template>
<template>
  <UPageLogos title="Trusted by the best front-end teams">
    <UIcon name="i-simple-icons-github" class="size-10 shrink-0" />
    <UIcon name="i-simple-icons-discord" class="size-10 shrink-0" />
    <UIcon name="i-simple-icons-x" class="size-10 shrink-0" />
    <UIcon name="i-simple-icons-instagram" class="size-10 shrink-0" />
    <UIcon name="i-simple-icons-linkedin" class="size-10 shrink-0" />
    <UIcon name="i-simple-icons-facebook" class="size-10 shrink-0" />
  </UPageLogos>
</template>

Marquee (흐르는 효과)

marquee prop으로 로고에 흐르는 마퀴 효과를 켤 수 있어요.

<template>
  <UPageLogos title="Trusted by the best front-end teams" marquee :items="[
  'i-simple-icons-github',
  'i-simple-icons-discord',
  'i-simple-icons-x',
  'i-simple-icons-instagram',
  'i-simple-icons-linkedin',
  'i-simple-icons-facebook'
]" />
</template>

[!NOTE] See: /docs/components/marquee

marquee 모드를 사용할 때는 prop을 전달해 동작을 바꿀 수 있어요. 자세한 내용은 Marquee 컴포넌트를 확인해 보세요.

API

Props

/**
 * Props for the PageLogos component
 */
interface PageLogosProps {
  /**
   * The element or component this component should render as.
   * @default 'div'
   */
  as?: any;
  title?: string | undefined;
  items?: PageLogosItem[] | undefined;
  /**
   * @default false
   */
  marquee?: boolean | MarqueeProps | undefined;
  ui?: { root?: SlotClass; title?: SlotClass; logos?: SlotClass; logo?: SlotClass; } | undefined;
}

Slots

/**
 * Slots for the PageLogos component
 */
interface PageLogosSlots {
  default(): any;
}

테마 (Theme)

export default defineAppConfig({
  ui: {
    pageLogos: {
      slots: {
        root: 'relative overflow-hidden',
        title: 'text-lg text-center font-semibold text-highlighted',
        logos: 'mt-10',
        logo: 'size-10 shrink-0'
      },
      variants: {
        marquee: {
          false: {
            logos: 'flex items-center shrink-0 justify-around gap-(--gap) [--gap:--spacing(16)]'
          }
        }
      }
    }
  }
})

변경 기록 (Changelog)

컴포넌트와 테마의 커밋 히스토리를 확인해 보세요.

더 알아보기 (Learn more)