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: {}
}
})