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

FixedNav 고정 내비게이션

원문 보기 위키 갱신

FixedNav는 화면 가장자리에 떠 있는 빠른 내비게이션 컴포넌트예요. 목록을 접었다 폈다 하면서 쓰는 '스토우(stow) 경험' 인터랙션을 제공하죠.

출처: 문서

설치

@nutui/nutui에서 컴포넌트를 가져와 앱에 등록하면 바로 쓸 수 있어요.

import { createApp } from 'vue'
import { FixedNav } from '@nutui/nutui'

const app = createApp()
app.use(FixedNav)

사용 예시

기본 사용법

demo: fixednav basic

왼쪽 배치 효과

demo: fixednav left

마스크 없이

demo: fixednav overlay

drag로 드래그 지원

demo: fixednav drag

커스텀 사용

demo: fixednav custom

API

Props

Attribute Description Type Default
visible visible is boolean false
nav-list Suspended list content data Array []
active-color list active button color string #fa2c19 Inherit theme color
active-text Stow list button copy string Close Nav
un-active-text Expand list button copy string Open Nav
type Navigation direction, optional value left right string right
overlay Whether to display the mask when expanding boolean true
position fixed Vertical position object {top: 'auto',bottom: 'auto'}

Events

Event Description Arguments
selected Triggered after selection {item:item,$event:Event}

Slots

Name Description
btn slot custom button
list slot custom expanded list content

Theming

CSS Variables

스타일 커스텀에 쓸 수 있는 CSS 변수를 제공해요. 자세한 내용은 ConfigProvider 컴포넌트를 참고하세요.

Name Default Value
--nut-fixednav-bg-color var(--nut-white)
--nut-fixednav-font-color var(--nut-black)
--nut-fixednav-index 201
--nut-fixednav-btn-bg linear-gradient(135deg, var(--nut-primary-color) 0%, var(--nut-primary-color-end) 100%)
--nut-fixednav-item-active-color var(--nut-primary-color)

더 알아보기 (Learn more)