Sheet

A Sheet component presents content in a sliding bottom panel. Built on top of heroui-native Sheet.

Demo

Demo Coming Soon

Sheet examples will be available soon.

Usage

import { useState } from 'react';
import { NSheet, NButton, Size } from '@nayan-ui/react';
const SheetExample = () => {
const [isOpen, setIsOpen] = useState(false);
return (
<div>
<NButton onClick={() => setIsOpen(true)}>Show Sheet</NButton>
<NSheet isOpen={isOpen} size={Size.SM} title="Edit Profile" onCloseSheet={() => setIsOpen(false)}>
<div className="w-full h-full p-3">
Your payment has been successfully submitted. We’ve sent you an email with all of the details of your order.
</div>
</NSheet>
</div>
);
};
export default Sheet;

Attributes

NameTypeDefaultDetails
childrenReact.ReactNodeRequiredContent for the sheet.
triggerReact.ReactNodeOptionalTrigger element to open the sheet.
titlestringOptionalTitle shown at the top of the sheet.
descriptionstringOptionalDescription text below the title.
isOpenbooleanOptionalControlled open state.
isDefaultOpenbooleanOptionalDefault open state for uncontrolled usage.
onOpenChange(isOpen: boolean) => voidOptionalCallback when open state changes.
classNamestring' 'You can customise content by passing tailwind classes.
titleClassNamestring' 'You can customise title by passing tailwind classes.
descriptionClassNamestring' 'You can customise description by passing tailwind classes.