View as Markdown

API reference: @salmonui/navigation/sidebar-layout

SidebarTriggerPropsinterface

import type { SidebarTriggerProps } from '@salmonui/navigation/sidebar-layout';
interface SidebarTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
    children?: ReactNode;
    action?: 'open' | 'collapse' | undefined;
    icon?: ReactNode;
    ref?: Ref<HTMLButtonElement> | undefined;
    render?: ((props: SidebarRenderProps) => ReactElement) | undefined;
}
SidebarTriggerProps members (5)
NameSignatureDescription
childrenoptionalchildren?: ReactNode;
actionoptionalaction?: 'open' | 'collapse' | undefined;

'open' (default) toggles the panel; 'collapse' toggles the icon rail.

iconoptionalicon?: ReactNode;

Replaces the built-in icon (decorative).

refoptionalref?: Ref<HTMLButtonElement> | undefined;
renderoptionalrender?: ((props: SidebarRenderProps) => ReactElement) | undefined;

Renders another element with the computed props (ARIA and handlers included).