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

ProseCollapsible

원문 보기 위키 갱신

ProseCollapsible (본문 콜랩서블)

ProseCollapsible은 콘텐츠를 접었다 펼 수 있게 해주는 컴포넌트예요. 부드러운 펼침·접힘 애니메이션으로 내용의 가시성을 제어할 수 있어요.

출처: Nuxt UI

본문

부드러운 확장·축소 애니메이션으로 콘텐츠 가시성을 전환해요.

사용법 (Usage)

collapsible 컴포넌트로 콘텐츠를 감싸면 콘텐츠 안에 Collapsible을 표시할 수 있어요.

::collapsible

| Prop    | Default   | Type                     |
|---------|-----------|--------------------------|
| `name`  |           | `string`{lang="ts-type"} |
| `size`  | `md`      | `string`{lang="ts-type"} |
| `color` | `neutral` | `string`{lang="ts-type"} |

::

API

Props

/**
 * Props for the ProseProseCollapsible component
 */
interface ProseProseCollapsibleProps {
  /**
   * The icon displayed to toggle the collapsible.
   * @default appConfig.ui.icons.chevronDown
   */
  icon?: any;
  /**
   * The name displayed in the trigger label.
   * @default t('prose.collapsible.name')
   */
  name?: string | undefined;
  /**
   * The text displayed when the collapsible is open.
   * @default t('prose.collapsible.openText')
   */
  openText?: string | undefined;
  /**
   * The text displayed when the collapsible is closed.
   * @default t('prose.collapsible.closeText')
   */
  closeText?: string | undefined;
  ui?: { root?: SlotClass; trigger?: SlotClass; triggerIcon?: SlotClass; triggerLabel?: SlotClass; content?: SlotClass; } & { root?: SlotClass; content?: SlotClass; } | undefined;
}

Slots

/**
 * Slots for the ProseCollapsible component
 */
interface ProseCollapsibleSlots {
  default(): any;
}

테마 (Theme)

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

변경 기록 (Changelog)

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

더 알아보기 (Learn more)