Skip to content

feat: add ContentOnlyLayout and defaultOpen prop to SidebarLayout#227

Open
IzumiSy wants to merge 2 commits intomainfrom
feat/content-only-layout
Open

feat: add ContentOnlyLayout and defaultOpen prop to SidebarLayout#227
IzumiSy wants to merge 2 commits intomainfrom
feat/content-only-layout

Conversation

@IzumiSy
Copy link
Copy Markdown
Contributor

@IzumiSy IzumiSy commented Apr 30, 2026

Summary

Add options to control sidebar layout behavior:

  1. ContentOnlyLayout — A new layout component for screens that don't need a sidebar (e.g., kiosk mode, embedded views). Renders only the route outlet with minimal wrapper styling.

  2. SidebarLayout defaultOpen prop — Controls whether the sidebar is initially expanded or collapsed.

Usage

import { SidebarLayout, ContentOnlyLayout } from "@tailor-platform/app-shell";

// Sidebar-less layout for kiosk or embedded screens
<ContentOnlyLayout />

// With custom content wrapper
<ContentOnlyLayout>
  {({ Outlet }) => (
    <>
      <CustomHeader />
      <Outlet />
    </>
  )}
</ContentOnlyLayout>

// Sidebar collapsed by default
<SidebarLayout defaultOpen={false} />

Changes

  • packages/core/src/components/content-only-layout.tsx — New ContentOnlyLayout component
  • packages/core/src/components/sidebar/sidebar-layout.tsx — Add defaultOpen prop to SidebarLayoutProps, pass it to SidebarProvider
  • packages/core/src/index.ts — Export ContentOnlyLayout and ContentOnlyLayoutProps

@IzumiSy IzumiSy self-assigned this Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant