RUI::Slideout
The RUI::Slideout
component is a container that slides out from the right side of the screen. It is useful for displaying additional content without navigating away from the current page.
Example
Try me!
Components
BadgesButtonsCode BlocksHeadingsLinksListsMarkdownNavigationSlideoutsTextComing Soon
The RUI::Slideout
component is a container that slides out from the right side of the screen. It is useful for displaying additional content without navigating away from the current page.
Try me!
Follow these steps to create a slideout in your RelayUi application:
turbo_frame_tag "slideout"
npm install @relay_ui/slideout
# or...
./bin/importmap pin @relay_ui/slideout
import SlideoutController from "@relay_ui/slideout"
application.register("slideout", SlideoutController)
RUI::Slideout
component:render RUI::Slideout.new do
div(class: "flex flex-row justify-between items-center p-10") do
render RUI::Headings::H2.new { "Slideout" }
# Note the href and data...
render RUI::Links::Destructive.new(
href: "#",
icon: "x",
data: { action: "slideout#hide" }
)
end
end
render RUI::Buttons::Primary.new(
href: slideout_example_path,
data: { turbo_frame: 'slideout' }
) { "Open Slideout" }