A modal component that slides up from the bottom of the screen. It is used when providing additional information or action lists while maintaining the current context.
@seed-design/react@0.0.1, @seed-design/css@0.0.1
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetPreview = () => {
return (
< BottomSheetRoot >
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent title = "Title" description = "You can write a description" >
{ /* If you need to omit padding, pass px={0}. */ }
< BottomSheetBody >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >OK</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetPreview;
Learn how to use Stackflow and Bottom Sheet together.
npx @seed-design/cli@latest add ui:bottom-sheet pnpm dlx @seed-design/cli@latest add ui:bottom-sheet yarn dlx @seed-design/cli@latest add ui:bottom-sheet bun x @seed-design/cli@latest add ui:bottom-sheet
Install dependencies
npm install @karrotmarket/react-monochrome-icon @seed-design/react yarn add @karrotmarket/react-monochrome-icon @seed-design/react pnpm add @karrotmarket/react-monochrome-icon @seed-design/react bun add @karrotmarket/react-monochrome-icon @seed-design/react Copy the code below and paste it in /**
* @file ui:bottom-sheet
* @requires @seed-design/react@^2.0.0
* @requires @seed-design/css@^2.0.0
**/
"use client" ;
import IconXmarkLine from "@karrotmarket/react-monochrome-icon/IconXmarkLine" ;
import { Icon, BottomSheet as SeedBottomSheet, VisuallyHidden } from "@seed-design/react" ;
import type * as React from "react" ;
import { forwardRef } from "react" ;
export interface BottomSheetRootProps extends SeedBottomSheet . RootProps {}
/**
* @see https://crispy.carrot-soft.tech/react/components/action-sheet
*/
export const BottomSheetRoot = ( props : BottomSheetRootProps ) => {
const { children , ... otherProps } = props;
return < SeedBottomSheet.Root { ... otherProps}>{children}</ SeedBottomSheet.Root >;
};
export interface BottomSheetTriggerProps extends SeedBottomSheet . TriggerProps {}
export const BottomSheetTrigger = SeedBottomSheet.Trigger;
export interface BottomSheetContentProps extends Omit < SeedBottomSheet . ContentProps , "title" > {
title ?: React . ReactNode ;
description ?: React . ReactNode ;
layerIndex ?: number ;
/**
* @default true
*/
showCloseButton ?: boolean ;
/**
* @default false
*/
showHandle ?: boolean ;
}
export const BottomSheetContent = forwardRef < HTMLDivElement , BottomSheetContentProps >(
(
{
children,
title,
description,
layerIndex,
showCloseButton = true ,
showHandle = false ,
... otherProps
},
ref,
) => {
if (
! title &&
! otherProps[ "aria-labelledby" ] &&
! otherProps[ "aria-label" ] &&
process.env. NODE_ENV !== "production"
) {
console. warn (
"BottomSheetContent: aria-labelledby or aria-label should be provided if title is not provided." ,
);
}
const shouldRenderHeader = title || description;
return (
< SeedBottomSheet.Positioner style = {{ "--layer-index" : layerIndex } as React . CSSProperties }>
< SeedBottomSheet.Backdrop />
< SeedBottomSheet.Content ref = {ref} { ... otherProps}>
{showHandle && < SeedBottomSheet.Handle />}
{shouldRenderHeader && (
< SeedBottomSheet.Header >
{title ? (
< SeedBottomSheet.Title >{title}</ SeedBottomSheet.Title >
) : (
< VisuallyHidden asChild >
< SeedBottomSheet.Title >{otherProps[ "aria-label" ] || "" }</ SeedBottomSheet.Title >
</ VisuallyHidden >
)}
{description && (
< SeedBottomSheet.Description >{description}</ SeedBottomSheet.Description >
)}
</ SeedBottomSheet.Header >
)}
{children}
{showCloseButton && (
// You may implement your own i18n for dismiss label
< SeedBottomSheet.CloseButton aria-label = "닫기" >
< Icon svg = {< IconXmarkLine />} />
</ SeedBottomSheet.CloseButton >
)}
</ SeedBottomSheet.Content >
</ SeedBottomSheet.Positioner >
);
},
);
export interface BottomSheetBodyProps extends SeedBottomSheet . BodyProps {}
export const BottomSheetBody = SeedBottomSheet.Body;
export interface BottomSheetFooterProps extends SeedBottomSheet . FooterProps {}
export const BottomSheetFooter = SeedBottomSheet.Footer;
/**
* This file is a snippet from Crispy, helping you get started quickly with @seed-design/* packages.
* You can extend this snippet however you want.
*/
children?React.ReactNode
activeSnapPoint?string | number | null | undefined
setActiveSnapPoint?(( snapPoint : number | string | null ) => void ) | undefined
open?boolean | undefined
onOpenChange?(( open : boolean , details ?: DrawerChangeDetails ) => void ) | undefined
onDrag?(( event : React . PointerEvent < HTMLDivElement >, percentageDragged : number ) => void ) | undefined
onRelease?(( event : React . PointerEvent < HTMLDivElement >, open : boolean ) => void ) | undefined
nested?boolean | undefined
onClose?(() => void ) | undefined
container?HTMLElement | null | undefined
autoFocus?boolean | undefined
title?React.ReactNode
description?React.ReactNode
layerIndex?number | undefined
showHandle?boolean | undefined
asChild?boolean | undefined
asChild?boolean | undefined
paddingX?ResponsiveValue < 0 | (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" > | undefined
height?ResponsiveValue < (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "full" > | undefined
maxHeight?ResponsiveValue < (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "full" > | undefined
minHeight?ResponsiveValue < (string & {}) | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | "full" > | undefined
justifyContent?"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | undefined
alignItems?"flex-start" | "flex-end" | "center" | "stretch" | undefined
<BottomSheetTrigger> uses the asChild pattern to allow child elements to open the BottomSheet.
<BottomSheetTrigger> sets the aria-haspopup="dialog" attribute and automatically sets the aria-expanded attribute based on the open state of the BottomSheet. This attribute is useful for assistive technologies like screen readers.
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetTriggerExample = () => {
return (
< BottomSheetRoot >
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent title = "제목" >
< BottomSheetBody minHeight = "x16" >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >확인</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetTriggerExample;
You can open and close the BottomSheet in ways other than using the trigger. In this case, use the open prop to control the state of the BottomSheet.
import { useState } from "react" ;
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetControlled = () => {
const [ open , setOpen ] = useState ( false );
const scheduleOpen = () => {
setTimeout (() => {
setOpen ( true );
}, 1000 );
};
return (
<>
< ActionButton variant = "neutralSolid" onClick = {scheduleOpen}>
1초 후 열기
</ ActionButton >
< BottomSheetRoot open = {open} onOpenChange = {setOpen}>
< BottomSheetContent title = "제목" description = "설명을 작성할 수 있어요" >
{ /* If you need to omit padding, pass px={0}. */ }
< BottomSheetBody minHeight = "x16" >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >확인</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
</>
);
};
export default BottomSheetControlled;
The second argument of onOpenChange provides details.
When opening (open: true)
"trigger": Opened with BottomSheetTrigger (BottomSheet.Trigger)
When closing (open: false)
"closeButton": Closed with BottomSheet.CloseButton
"escapeKeyDown": Using the ESC key
"interactOutside": Clicking outside the area
"drag": Closed by dragging
"handleClickOnLastSnapPoint": Closed by clicking the handle at the last snap point
import { HStack, Text, VStack } from "@seed-design/react" ;
import { useState } from "react" ;
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const snapPoints = [ "200px" , "400px" , 1 ];
export default function BottomSheetOnOpenChangeReason () {
const [ open , setOpen ] = useState ( false );
const [ snap , setSnap ] = useState < number | string | null >(snapPoints[ 0 ]);
const [ openReason , setOpenReason ] = useState < string | null >( null );
const [ closeReason , setCloseReason ] = useState < string | null >( null );
return (
< VStack gap = "x4" align = "center" >
< BottomSheetRoot
open = {open}
onOpenChange = {( open , details ) => {
setOpen (open);
(open ? setOpenReason : setCloseReason)(details?.reason ?? null );
}}
snapPoints = {snapPoints}
activeSnapPoint = {snap}
setActiveSnapPoint = {setSnap}
>
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >열기</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent title = "알림" showHandle style = {{ height: "100%" , maxHeight: "97%" }}>
< BottomSheetBody minHeight = "x16" >
< Text textStyle = "t4Medium" color = "fg.neutralMuted" >
ESC 키를 누르거나, 외부 영역을 클릭하거나, 아래로 스와이프하거나, 핸들을 탭하여 snap
point를 순환해보세요.
</ Text >
</ BottomSheetBody >
</ BottomSheetContent >
</ BottomSheetRoot >
< HStack gap = "x4" >
< Text fontSize = "t3" color = "fg.neutralMuted" >
마지막 열림 이유: {openReason ?? "-" }
</ Text >
< Text fontSize = "t3" color = "fg.neutralMuted" >
마지막 닫힘 이유: {closeReason ?? "-" }
</ Text >
</ HStack >
</ VStack >
);
}
Set the headerAlign prop on <BottomSheetRoot> to control the alignment of the title and description.
import { HStack } from "@seed-design/react" ;
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetHeaderAlign = () => {
return (
< HStack gap = "x4" >
< BottomSheetRoot headerAlign = "left" >
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Left (기본값)</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent title = "제목" description = "설명을 작성할 수 있어요" >
< BottomSheetBody >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >확인</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
< BottomSheetRoot headerAlign = "center" >
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Center</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent title = "제목" description = "설명을 작성할 수 있어요" >
< BottomSheetBody >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >확인</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
</ HStack >
);
};
export default BottomSheetHeaderAlign;
Pass the maxHeight prop to <BottomSheetBody> to set the maximum height of the BottomSheet.
import { Box, VStack } from "@seed-design/react" ;
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetMaxHeight = () => {
return (
< BottomSheetRoot >
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent title = "제목" description = "설명을 작성할 수 있어요" >
{ /* If you need to omit padding, pass px={0}. */ }
< BottomSheetBody >
< VStack maxHeight = "300px" overflowY = "auto" >
< VStack justifyContent = "center" alignItems = "center" gap = "x4" height = "100%" >
< Box width = "100%" height = "100px" bg = "bg.layerBasement" />
< Box width = "100%" height = "100px" bg = "bg.layerBasement" />
< Box width = "100%" height = "100px" bg = "bg.layerBasement" />
< Box width = "100%" height = "100px" bg = "bg.layerBasement" />
</ VStack >
</ VStack >
</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >확인</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetMaxHeight;
Use the snapPoints prop to set custom snap points for the BottomSheet.
import { useState } from "react" ;
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const snapPoints = [ "300px" , "500px" , 1 ];
const BottomSheetSnapPoints = () => {
const [ snap , setSnap ] = useState < number | string | null >(snapPoints[ 0 ]);
return (
< BottomSheetRoot snapPoints = {snapPoints} activeSnapPoint = {snap} setActiveSnapPoint = {setSnap}>
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent
title = "제목"
description = "설명을 작성할 수 있어요"
/**
* snap points를 사용할 때는 handle을 표시해야 합니다.
*/
showHandle
/**
* 높이를 100%로 설정해야 snap points가 제대로 작동합니다.
*/
style = {{ height: "100%" , maxHeight: "97%" }}
>
< BottomSheetBody >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >확인</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetSnapPoints;
Pass the fadeFromIndex prop to <BottomSheetRoot> to set the starting index where the background darkens.
import { useState } from "react" ;
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const snapPoints = [ "300px" , "500px" , 1 ];
const BottomSheetFadeFromIndex = () => {
const [ snap , setSnap ] = useState < number | string | null >(snapPoints[ 0 ]);
return (
< BottomSheetRoot
fadeFromIndex = { 0 }
snapPoints = {snapPoints}
activeSnapPoint = {snap}
setActiveSnapPoint = {setSnap}
>
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent
title = "제목"
description = "설명을 작성할 수 있어요"
/**
* snap points를 사용할 때는 handle을 표시해야 합니다.
*/
showHandle
/**
* 높이를 100%로 설정해야 snap points가 제대로 작동합니다.
*/
style = {{ height: "100%" , maxHeight: "97%" }}
>
< BottomSheetBody >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >확인</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetFadeFromIndex;
Pass the showHandle prop to <BottomSheetContent> to display the handle.
The default value is false.
import { useState } from "react" ;
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetShowHandle = () => {
const [ isSheetOpen , setIsSheetOpen ] = useState ( false );
return (
< BottomSheetRoot open = {isSheetOpen} onOpenChange = {setIsSheetOpen}>
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent title = "제목" description = "설명을 작성할 수 있어요" showHandle >
{ /* If you need to omit padding, pass px={0}. */ }
< BottomSheetBody minHeight = "x16" >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" onClick = {() => setIsSheetOpen ( false )}>
닫기
</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetShowHandle;
Pass the showCloseButton prop to <BottomSheetContent> to display the close button.
The default value is true.
When showCloseButton is set to false, the close button is not displayed.
In this case, you must provide a way for users to close the BottomSheet.
import { useState } from "react" ;
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetShowCloseButton = () => {
const [ isSheetOpen , setIsSheetOpen ] = useState ( false );
return (
< BottomSheetRoot open = {isSheetOpen} onOpenChange = {setIsSheetOpen}>
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent
title = "제목"
description = "설명을 작성할 수 있어요"
showCloseButton = { false }
>
{ /* If you need to omit padding, pass px={0}. */ }
< BottomSheetBody minHeight = "x16" >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" onClick = {() => setIsSheetOpen ( false )}>
닫기
</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetShowCloseButton;
When the dismissible prop is set to false, the closeOnEscape, closeOnInteractOutside, and draggable features are disabled.
Use this when you intentionally want to prevent the BottomSheet from being closed. Otherwise, you must provide a way for users to close the BottomSheet.
import { useState } from "react" ;
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetDismissible = () => {
const [ open , setOpen ] = useState ( false );
return (
< BottomSheetRoot open = {open} onOpenChange = {setOpen} dismissible = { false }>
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent title = "제목" description = "설명을 작성할 수 있어요" >
{ /* If you need to omit padding, pass px={0}. */ }
< BottomSheetBody >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" onClick = {() => setOpen ( false )}>
닫기
</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetDismissible;
You can apply a scroll hint effect using Scroll Fog in <BottomSheetBody>.
ScrollFog always displays the effect, so sufficient padding must be provided.
The recommended padding is 80px at the bottom and 20px at the top.
import { Box, ScrollFog, VStack } from "@seed-design/react" ;
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetMaxHeight = () => {
return (
< BottomSheetRoot >
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent title = "제목" description = "설명을 작성할 수 있어요" >
{ /* If you need to omit padding, pass px={0}. */ }
< BottomSheetBody >
< VStack maxHeight = "300px" overflowY = "auto" >
< ScrollFog placement = {[ "top" , "bottom" ]}>
< VStack
justifyContent = "center"
alignItems = "center"
gap = "x4"
height = "100%"
pb = "80px"
pt = "20px"
>
< Box width = "100%" height = "100px" bg = "bg.layerBasement" />
< Box width = "100%" height = "100px" bg = "bg.layerBasement" />
< Box width = "100%" height = "100px" bg = "bg.layerBasement" />
< Box width = "100%" height = "100px" bg = "bg.layerBasement" />
</ VStack >
</ ScrollFog >
</ VStack >
</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >확인</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetMaxHeight;
When the handleOnly prop is provided to <BottomSheetRoot>, the area where the Bottom Sheet can be moved by swiping is limited to the handle.
This option only works when used with <BottomSheetContent showHandle={true}>.
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetHandleOnly = () => {
return (
< BottomSheetRoot handleOnly >
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent showHandle title = "제목" description = "설명을 작성할 수 있어요" >
< BottomSheetBody >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >확인</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetHandleOnly;
Use the skipAnimation prop to skip the enter/exit animation of the BottomSheet.
import { ActionButton } from "seed-design/ui/action-button" ;
import {
BottomSheetBody,
BottomSheetContent,
BottomSheetFooter,
BottomSheetRoot,
BottomSheetTrigger,
} from "seed-design/ui/bottom-sheet" ;
const BottomSheetSkipAnimation = () => {
return (
< BottomSheetRoot skipAnimation >
< BottomSheetTrigger asChild >
< ActionButton variant = "neutralSolid" >Open</ ActionButton >
</ BottomSheetTrigger >
< BottomSheetContent title = "제목" description = "설명을 작성할 수 있어요" >
< BottomSheetBody >Content</ BottomSheetBody >
< BottomSheetFooter >
< ActionButton variant = "neutralSolid" >확인</ ActionButton >
</ BottomSheetFooter >
</ BottomSheetContent >
</ BottomSheetRoot >
);
};
export default BottomSheetSkipAnimation;