ModalConfig
Interface: ModalConfig
Extends
ExpandableConfig
Properties
expandable?
optionalexpandable:boolean
Whether the modal or sidecar can be expanded
Inherited from
ExpandableConfig.expandable
defaultExpanded?
optionaldefaultExpanded:boolean
Whether the modal or sidecar should be expanded by default.
Default
falseInherited from
ExpandableConfig.defaultExpanded
dimensions?
optionaldimensions:Dimensions
The dimensions for the modal or sidecar window.
Inherited from
ExpandableConfig.dimensions
defaultOpen?
optionaldefaultOpen:boolean
Whether to open the modal window by default.
title?
optionaltitle:string
The title displayed in the modal header.
Default
'Chat'position?
optionalposition:ModalTriggerPosition
The position of the modal trigger
Default
'bottom-right'icon()?
optionalicon: (state) =>ReactNode
The icon to use for the modal window. Receives the current state of the modal window.
Parameters
state
"open" | "closed" | undefined
Returns
ReactNode
Example
import { MessageCircleIcon } from 'lucide-react'
import { cn } from '@/lib/utils'
const config: ElementsConfig = {
modal: {
icon: (state) => {
return <div className={cn('size-6', state === 'open' ? 'rotate-90' : 'rotate-0')}>
<MessageCircleIcon className="size-6" />
</div>
},
},
}Last updated on