Symbol

name

<FullpageSection />에 고유 name을 할당합니다. 페이지 접근시 URL의 hash(#)와 일치하는 name을 가진 <FullpageSection />으로 이동합니다.
  • component : <FullpageSection />
  • required : false
  • type : string
  • default: ''
'use client'; import { useState } from 'react'; import { FullpageContainer, FullpageSection } from '@shinyongjun/react-fullpage'; import '@shinyongjun/react-fullpage/css'; export default function App() { const [activeIndex, setActiveIndex] = useState<number>(0); return ( <FullpageContainer activeIndex={activeIndex} setActiveIndex={setActiveIndex} > <FullpageSection name="first"> // http://localhost:3000#first <div>Section 1</div> </FullpageSection> <FullpageSection name="second"> // http://localhost:3000#second <div>Section 2</div> </FullpageSection> <FullpageSection name="third"> // http://localhost:3000#third <div>Section 3</div> </FullpageSection> </FullpageContainer> ); }