A panel component that slides in from the left or right edge of the screen. Used to provide additional content or navigation in desktop environments.
Available since@seed-design/react@2.0.0, @seed-design/css@2.0.0
import { HStack } from "@seed-design/react";import { ActionButton } from "seed-design/ui/action-button";import { SidePanelBody, SidePanelContent, SidePanelFooter, SidePanelRoot, SidePanelTrigger,} from "seed-design/ui/side-panel";const SidePanelPreview = () => { return ( <SidePanelRoot> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">Open Side Panel</ActionButton> </SidePanelTrigger> <SidePanelContent title="Title" description="You can write a description"> <SidePanelBody paddingX="x6"> The panel body can hold content for users to review or an extra input form. </SidePanelBody> <SidePanelFooter> <HStack gap="x2" justify="flex-end"> <ActionButton variant="neutralSolid">OK</ActionButton> </HStack> </SidePanelFooter> </SidePanelContent> </SidePanelRoot> );};export default SidePanelPreview;
You can change the direction the Side Panel opens by setting the direction prop on <SidePanelRoot>.
Supports "left" or "right", with the default being "right".
import { Flex } from "@seed-design/react";import { ActionButton } from "seed-design/ui/action-button";import { SidePanelBody, SidePanelContent, SidePanelRoot, SidePanelTrigger,} from "seed-design/ui/side-panel";const SidePanelDirection = () => { return ( <Flex gap="x3" wrap="wrap"> <SidePanelRoot direction="right"> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">Right</ActionButton> </SidePanelTrigger> <SidePanelContent title="Right Side Panel"> <SidePanelBody paddingX="x6"> 오른쪽 가장자리에서 슬라이드되어 보조 콘텐츠를 표시합니다. </SidePanelBody> </SidePanelContent> </SidePanelRoot> <SidePanelRoot direction="left"> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">Left</ActionButton> </SidePanelTrigger> <SidePanelContent title="Left Side Panel"> <SidePanelBody paddingX="x6"> 왼쪽 가장자리에서 슬라이드되어 탐색이나 설정 영역을 표시합니다. </SidePanelBody> </SidePanelContent> </SidePanelRoot> </Flex> );};export default SidePanelDirection;
You can change the Side Panel's width by setting the size prop on <SidePanelRoot>.
Supports "small" (480px), "medium" (720px, default), and "large" (960px).
import { Flex } from "@seed-design/react";import { ActionButton } from "seed-design/ui/action-button";import { SidePanelBody, SidePanelContent, SidePanelRoot, SidePanelTrigger,} from "seed-design/ui/side-panel";const SidePanelSize = () => { return ( <Flex gap="x3" wrap="wrap"> <SidePanelRoot direction="right" size="small"> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">Small (480px)</ActionButton> </SidePanelTrigger> <SidePanelContent title="Small Side Panel"> <SidePanelBody paddingX="x6"> 좁은 패널에 적합한 간결한 콘텐츠를 배치합니다. </SidePanelBody> </SidePanelContent> </SidePanelRoot> <SidePanelRoot direction="right" size="medium"> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">Medium (720px)</ActionButton> </SidePanelTrigger> <SidePanelContent title="Medium Side Panel"> <SidePanelBody paddingX="x6"> 기본 너비로 상세 정보와 주요 액션을 함께 제공합니다. </SidePanelBody> </SidePanelContent> </SidePanelRoot> <SidePanelRoot direction="right" size="large"> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">Large (960px)</ActionButton> </SidePanelTrigger> <SidePanelContent title="Large Side Panel"> <SidePanelBody paddingX="x6"> 넓은 패널에서 더 많은 폼 필드나 상세 콘텐츠를 다룹니다. </SidePanelBody> </SidePanelContent> </SidePanelRoot> </Flex> );};export default SidePanelSize;
SidePanelFooter provides only flex layout, and button arrangement is directly composed with VStack, HStack, etc.
In narrow panels, you can stack vertically with VStack, and in wide panels, align horizontally with HStack.
import { Box, Flex, HStack, VStack } from "@seed-design/react";import { ActionButton } from "seed-design/ui/action-button";import { SidePanelBody, SidePanelContent, SidePanelFooter, SidePanelRoot, SidePanelTrigger,} from "seed-design/ui/side-panel";const SidePanelFooterLayout = () => { return ( <Flex gap="x3" wrap="wrap"> <SidePanelRoot size="small"> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">Small</ActionButton> </SidePanelTrigger> <SidePanelContent title="Small Side Panel" description="좁은 패널에서는 주요 액션이 위에 오도록 세로로 배치합니다." > <SidePanelBody paddingX="x6"> <VStack gap="x3"> <Box>확인이 필요한 정보를 간결하게 보여줍니다.</Box> <Box>버튼은 패널 너비를 채우며 위에서 아래로 쌓입니다.</Box> </VStack> </SidePanelBody> <SidePanelFooter> <VStack gap="x2"> <ActionButton variant="neutralSolid">확인</ActionButton> <ActionButton variant="neutralWeak">취소</ActionButton> </VStack> </SidePanelFooter> </SidePanelContent> </SidePanelRoot> <SidePanelRoot size="medium"> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">Medium</ActionButton> </SidePanelTrigger> <SidePanelContent title="Medium Side Panel" description="넓은 패널에서는 주요 액션을 가로로 배치합니다." > <SidePanelBody paddingX="x6"> <VStack gap="x3"> <Box>상세 정보와 확인 액션을 함께 제공할 수 있습니다.</Box> <Box>버튼은 우측 영역에 가로로 정렬됩니다.</Box> </VStack> </SidePanelBody> <SidePanelFooter> <HStack gap="x2" justify="flex-end"> <ActionButton variant="neutralWeak">취소</ActionButton> <ActionButton variant="neutralSolid">확인</ActionButton> </HStack> </SidePanelFooter> </SidePanelContent> </SidePanelRoot> </Flex> );};export default SidePanelFooterLayout;
You can directly control the width by passing width and maxWidth props to <SidePanelContent>.
Use this when you need flexible viewport-based width instead of preset sizes.
import { Flex } from "@seed-design/react";import { ActionButton } from "seed-design/ui/action-button";import { SidePanelBody, SidePanelContent, SidePanelRoot, SidePanelTrigger,} from "seed-design/ui/side-panel";const SidePanelCustomSize = () => { return ( <Flex gap="x3" wrap="wrap"> <SidePanelRoot direction="right"> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">width 80vw, max 640px</ActionButton> </SidePanelTrigger> <SidePanelContent title="Fluid Width" width="80vw" maxWidth="640px"> <SidePanelBody paddingX="x6"> 뷰포트 너비에 따라 커지되 최대 640px까지만 확장됩니다. </SidePanelBody> </SidePanelContent> </SidePanelRoot> <SidePanelRoot direction="left"> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">width 400px</ActionButton> </SidePanelTrigger> <SidePanelContent title="Fixed Width" width="400px"> <SidePanelBody paddingX="x6"> 고정 너비가 필요한 작업 패널에 사용할 수 있습니다. </SidePanelBody> </SidePanelContent> </SidePanelRoot> </Flex> );};export default SidePanelCustomSize;
Setting the dismissible prop to false prevents closing with the Escape key or outside clicks.
Use this when you intentionally want to prevent the Side Panel from being closed.
import { HStack } from "@seed-design/react";import { useState } from "react";import { ActionButton } from "seed-design/ui/action-button";import { SidePanelBody, SidePanelContent, SidePanelFooter, SidePanelRoot, SidePanelTrigger,} from "seed-design/ui/side-panel";const SidePanelDismissible = () => { const [open, setOpen] = useState(false); return ( <SidePanelRoot open={open} onOpenChange={setOpen} dismissible={false}> <SidePanelTrigger asChild> <ActionButton variant="neutralSolid">닫기 불가 Side Panel</ActionButton> </SidePanelTrigger> <SidePanelContent title="닫기 불가" showCloseButton={false}> <SidePanelBody paddingX="x6"> Escape 키, 외부 클릭으로 닫을 수 없습니다. 프로그래밍 방식으로만 닫을 수 있습니다. </SidePanelBody> <SidePanelFooter> <HStack gap="x2" justify="flex-end"> <ActionButton variant="neutralSolid" onClick={() => setOpen(false)}> 닫기 </ActionButton> </HStack> </SidePanelFooter> </SidePanelContent> </SidePanelRoot> );};export default SidePanelDismissible;
Setting the modal prop to false allows interaction with the background. The Backdrop is not displayed, and the focus trap is disabled.
If you need to close it by pressing the Trigger again, control the state directly with the open prop.
Using ResponsiveSidePanel automatically switches to Side Panel for md and above and to Bottom Sheet for sm and below. Try reducing the viewport to see the switch in action.
onOpenChange passes only the open state, and Root options that apply only to Side Panel or Bottom Sheet are passed via sidePanelRootProps and bottomSheetRootProps.
import { Box, HStack, VStack } from "@seed-design/react";import { ActionButton } from "seed-design/ui/action-button";import { ResponsiveSidePanelBody, ResponsiveSidePanelContent, ResponsiveSidePanelFooter, ResponsiveSidePanelRoot, ResponsiveSidePanelTrigger,} from "seed-design/ui/responsive-side-panel";const SidePanelResponsive = () => { return ( <ResponsiveSidePanelRoot sidePanelRootProps={{ size: "medium" }}> <ResponsiveSidePanelTrigger asChild> <ActionButton variant="neutralSolid">Open</ActionButton> </ResponsiveSidePanelTrigger> <ResponsiveSidePanelContent title="반응형 패널" description="화면 크기에 따라 적합한 컴포넌트로 자동 전환됩니다." > <ResponsiveSidePanelBody> <VStack gap="x3"> <Box>본문 영역은 Header/Body/Footer 구조로 동일합니다.</Box> <Box>md 이상에서는 화면 우측에서 슬라이드되는 Side Panel로,</Box> <Box>sm 이하에서는 화면 하단에서 슬라이드되는 Bottom Sheet로 표시됩니다.</Box> </VStack> </ResponsiveSidePanelBody> <ResponsiveSidePanelFooter> <HStack gap="x2" justify="flex-end"> <ActionButton variant="neutralSolid">확인</ActionButton> </HStack> </ResponsiveSidePanelFooter> </ResponsiveSidePanelContent> </ResponsiveSidePanelRoot> );};export default SidePanelResponsive;