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

ProseCallout

원문 보기 위키 갱신

ProseCallout (콜아웃)

ProseCallout 컴포넌트는 중요한 정보를 눈에 띄는 색상 박스와 아이콘으로 강조해서 보여주는 컴포넌트예요. 콘텐츠에 주의를 끌고 싶은 부분에 사용해요.

출처: Nuxt UI

본문

사용법 (Usage)

callout 컴포넌트의 기본 슬롯에 마크다운을 넣어 콘텐츠에 눈에 띄는 맥락을 추가하세요.

::callout
This is a `callout` with full **markdown** support.
::

아이콘 (Icon)

icon prop을 사용해 콘텐츠 옆에 아이콘을 표시할 수 있어요.

::callout{icon="i-lucide-square-play"}
This is a `callout` with an icon.
::

색상 (Color)

color prop을 사용해 콜아웃의 색상을 변경할 수 있어요.

::callout{icon="i-lucide-info" color="info"}
This is a `callout` with a custom color.
::

<NuxtLink> 컴포넌트의 to나 target 같은 속성을 전달해서 콜아웃을 링크로 만들 수 있어요.

::callout{icon="i-lucide-square-play" to="/docs/getting-started/installation/nuxt" color="neutral"}
Learn how to install `@nuxt/ui` in your project.
::

단축키 (Shortcuts)

미리 정의된 아이콘과 색상이 있는 note, tip, warning, caution 단축키도 사용할 수 있어요.

::note
Here's some additional information.
::

::tip
Here's a helpful suggestion.
::

::warning
Be careful with this action as it might have unexpected results.
::

::caution
This action cannot be undone.
::

API

Props (속성)

/**
 * Props for the ProseProseCallout component
 */
interface ProseProseCalloutProps {
  to?: string | it | et | undefined;
  target?: null | "_blank" | "_parent" | "_self" | "_top" | string & {} | undefined;
  icon?: any;
  /**
   * @default 'neutral'
   */
  color?: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" | undefined;
  ui?: { base?: SlotClass; icon?: SlotClass; externalIcon?: SlotClass; } | undefined;
}

Slots (슬롯)

/**
 * Slots for the ProseCallout component
 */
interface ProseCalloutSlots {
  default(): any;
}

테마 (Theme)

export default defineAppConfig({
  ui: {
    prose: {}
  }
})

변경 이력 (Changelog)

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

더 알아보기 (Learn more)