--- title: useSlideover description: 'A composable to programmatically control a Slideover component.' --- ## Usage Use the auto-imported `useSlideover` composable to programmatically control a [Slideover](/components/slideover) component. ```vue ``` - The `useSlideover` composable is created using `createSharedComposable`, ensuring that the same slideover state is shared across your entire application. ::tip{to="/components/slideover"} Learn how to customize the appearance and behavior of slideovers in the **Slideover** component documentation. :: ## API ### `open(component: Component, props?: SlideoverProps & ComponentProps)` Opens a slideover with the specified component and props. - Parameters: - `component`: The Vue component to render inside the slideover. - `props`: An optional object of props to pass to both the Slideover and the rendered component. ````vue ```` ### `close(): Promise` Closes the currently open slideover. ````vue ```` ### `reset()` Resets the slideover state to its default values. ````vue ```` ### `patch(props: Partial>)` Updates the props of the currently open slideover. ````vue ```` ## Example Here's a complete example of how to use the `useSlideover` composable: ````vue ```` In this example, we're using the `useSlideover` composable to control a slideover. We can open it with a specific component and props, close it, and update its props.