Sidebar

import { Sidebar, SidebarHeader, SidebarIconButton, SidebarNewChat, SidebarScroll, SidebarSection, SidebarItem, SidebarFolder, SidebarUser } from '@hanzo/ui/chat'

No examples yet.

Types

export interface SidebarProps extends Col {
children?: ReactNode
/** Column width in px. */
width?: number
}
export interface SidebarHeaderProps extends Row {
/** Product name. Not the workspace or account — those belong in SidebarUser. */
title: string
onOpenSwitcher?: () => void
onSearch?: () => void
onCollapse?: () => void
}
export interface SidebarIconButtonProps extends Row {
/**
* Required. Becomes the accessible name — an icon-only control without one is
* unreadable to a screen reader, and these controls are the whole navigation.
*/
label: string
onPress?: () => void
children?: ReactNode
}
export interface SidebarNewChatProps extends Row {
label?: string
onPress?: () => void
}
export interface SidebarScrollProps extends Scroll {
children?: ReactNode
}
export interface SidebarSectionProps extends Col {
label?: string
children?: ReactNode
}
export interface SidebarItemProps extends Row {
children?: ReactNode
active?: boolean
onPress?: () => void
icon?: ReactNode
}
export interface SidebarFolderProps extends Col {
name: string
children?: ReactNode
/** Uncontrolled initial state. Ignored when `open` is passed. */
defaultOpen?: boolean
open?: boolean
onOpenChange?: (open: boolean) => void
}
export interface SidebarUserProps extends Row {
name: string
secondary?: string
/** Avatar slot. Falls back to the first letter of `name`. */
avatar?: ReactNode
onPress?: () => void
onHelp?: () => void
}

Exports

SidebarSidebarHeaderSidebarIconButtonSidebarNewChatSidebarScrollSidebarSectionSidebarItemSidebarFolderSidebarUsertype SidebarPropstype SidebarHeaderPropstype SidebarIconButtonPropstype SidebarNewChatPropstype SidebarSectionPropstype SidebarItemPropstype SidebarFolderPropstype SidebarUserProps