import Layout from '../../components/Layout' import { ComponentsSidebar } from '../../sidebars' import { Playground } from '../../components/Playground'; import { Code, Heading, Paragraph } from '@knkui/typography'; export default function Sheet() { return ( When not to use a side sheet Sheets are a great way to cheat creating a new page. As a general rule of thumb, a Sheet should not be used as a replacement of a new page when the page needs to be accessible by a URL. Avoid showing a Sheet based on a URL. Implementation details The Sheet component does not have any opinion about the contents of the Sheet. In the examples below are some recipes to make sure usage of the Sheet is consistent. It is recommended to compose more opinionated Sheets in the consuming application. Focus management When opening the Sheet, focus will be brought inside the Sheet by looking for elements with [autofocus] first, [tabindex] second and button last. When closing the Sheet, focus will be brought back to the element that was focused before opening the Sheet. This is normally the button that triggered the Sheet. Basic example setIsOpen(false)} > ) } ` } /> Change Position The Sheet component can appearn on all side of the screens. setIsOpen(false)} position={position} > Hello! ) } ` } /> ) }