API reference
components/popover
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/popover";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | PopoverProps | Props accepted by Popover. |
| type alias | PopoverOptionProps | Props accepted by PopoverOption. |
| constant | PopoverAnchor | The positioned box a Popover attaches to. |
| constant | Popover | A non-modal raised panel attached to its PopoverAnchor. It never takes focus, so the anchored control (for example a composer) keeps typing while the popover lists suggestions. |
| constant | PopoverOption | One option row inside a Popover list; pointer presses keep focus where it is. |
PopoverPropstype alias
Section titled “PopoverProps”type PopoverProps = HTMLAttributes<HTMLDivElement> & object;Props accepted by Popover.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
open |
boolean |
Whether the popover is shown. |
side? |
"top" | "bottom" |
Which edge of the anchor it opens from. |
PopoverOptionPropstype alias
Section titled “PopoverOptionProps”type PopoverOptionProps = HTMLAttributes<HTMLDivElement> & object;Props accepted by PopoverOption.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
active |
boolean |
Whether keyboard navigation currently highlights this option. |
PopoverAnchorconstant
Section titled “PopoverAnchor”const PopoverAnchor: ForwardRefExoticComponent< HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;The positioned box a Popover attaches to.
Popoverconstant
Section titled “Popover”const Popover: ForwardRefExoticComponent< HTMLAttributes<HTMLDivElement> & object & RefAttributes<HTMLDivElement>>;A non-modal raised panel attached to its PopoverAnchor. It never takes focus, so the anchored control (for example a composer) keeps typing while the popover lists suggestions.
PopoverOptionconstant
Section titled “PopoverOption”const PopoverOption: ForwardRefExoticComponent< HTMLAttributes<HTMLDivElement> & object & RefAttributes<HTMLDivElement>>;One option row inside a Popover list; pointer presses keep focus where it is.