Free Use Bible API
Guide
Reference
SDKs
Seed Bible
GitHub
Support
  • English
  • Afrikaans
  • አማርኛ
  • العربية
  • বাংলা
  • Deutsch
  • Español
  • Français
  • Hausa
  • हिन्दी
  • Bahasa Indonesia
  • Italiano
  • 日本語
  • Português
  • Русский
  • Kiswahili
  • اردو
  • 简体中文
  • isiZulu
Guide
Reference
SDKs
Seed Bible
GitHub
Support
  • English
  • Afrikaans
  • አማርኛ
  • العربية
  • বাংলা
  • Deutsch
  • Español
  • Français
  • Hausa
  • हिन्दी
  • Bahasa Indonesia
  • Italiano
  • 日本語
  • Português
  • Русский
  • Kiswahili
  • اردو
  • 简体中文
  • isiZulu
  • Seed Bible
  • Guides
    • Developer Guide
    • Extension API
    • Security Model
    • Integration Reference
  • API Reference (v1.19.0)
    • seed-bible/extensions
      • Classes

        • SandboxError
      • Interfaces

        • SandboxBook
        • SandboxChapter
        • SandboxChapterRef
        • SandboxChatMessage
        • SandboxChatRequest
        • SandboxCommentary
        • SandboxCommentaryBook
        • SandboxCommentaryChapter
        • SandboxCommentaryProfile
        • SandboxContext
        • SandboxDataset
        • SandboxDatasetBook
        • SandboxDatasetChapter
        • SandboxDatasetReference
        • SandboxDiscoverRequest
        • SandboxExtensionDefinition
        • SandboxFootnote
        • SandboxFriend
        • SandboxHighlight
        • SandboxI18nHook
        • SandboxNote
        • SandboxPaneHandle
        • SandboxPaneOptions
        • SandboxPermissionInfo
        • SandboxPlayback
        • SandboxPortalHandle
        • SandboxPortalOptions
        • SandboxProfile
        • SandboxReadingEvent
        • SandboxReadingPosition
        • SandboxReference
        • SandboxSave
        • SandboxSearchQuery
        • SandboxSearchResult
        • SandboxSearchResults
        • SandboxSelectedVerse
        • SandboxSessionParticipant
        • SandboxSharedSession
        • SandboxToolHandle
        • SandboxToolItemOptions
        • SandboxToolOptions
        • SandboxToolSelectContext
        • SandboxTranslation
        • SandboxTranslationChapterRef
        • SandboxVerseRef
        • SandboxViewProps
      • Type Aliases

        • SandboxCasualOSPattern
        • SandboxChapterContent
        • SandboxDiscoverResult
        • SandboxErrorCode
        • SandboxExtension
        • SandboxIcon
        • SandboxJsonValue
        • SandboxPanePlacement
        • SandboxPermission
        • SandboxTitle
      • Variables

        • SANDBOX_PERMISSION_INFO
        • SANDBOX_PERMISSIONS
        • useI18n
      • Functions

        • defineExtension
    • seed-bible/extensions/testing
      • Interfaces

        • SandboxCapture
        • SandboxMethods
        • SandboxState
        • SandboxToolDefinition
        • SandboxToolItem
        • TestCall
        • TestHost
        • TestHostOptions
        • TestPane
      • Type Aliases

        • SandboxMethod
        • SandboxToolPatch
        • SandboxToolSurface
        • TestAnswer
      • Functions

        • createTestHost
    • seed-bible/components
      • Interfaces

        • BottomSheetExpansion
        • BottomSheetProps
        • DialogProps
        • FilterPillOption
        • FilterPillsProps
        • MaterialIconProps
        • ModalLayerOptions
        • PortalComponentHandle
        • PortalComponentProps
        • Screenshot
        • ScreenshotViewerProps
        • SearchBarProps
        • SpinnerProps
        • TooltipTriggerProps
        • Translation
        • TranslationLanguageGroup
        • TranslationListProps
        • UseDragReorderOptions
        • UsePopoverOptions
      • Type Aliases

        • ButtonProps
        • ButtonShape
        • ButtonSize
        • ButtonTone
        • ButtonVariant
        • CasualOSPattern
        • CheckboxProps
        • CloseButtonLook
        • CloseButtonProps
        • CloseButtonSize
        • ContextMenuTriggerProps
        • ContextMenuWithButtonProps
        • EmptyStateProps
        • EmptyStateSize
        • IconButtonLook
        • IconButtonProps
        • IconButtonSize
        • LoadingStatusProps
        • LoadingStatusSize
        • MultilineTextInputProps
        • PopoverProps
        • SelectFieldProps
        • SelectProps
        • SettingRowProps
        • SingleLineTextInputProps
        • SkeletonShape
        • SvgIconProps
        • SwitchProps
        • TextFieldProps
        • TextInputProps
        • TextInputSize
        • TranslationViewMode
      • Variables

        • AddIcon
        • AddTab
        • AiChatIcon
        • AiIcon
        • ApologistIcon
        • AskIcon
        • BibleIcon
        • BookmarkIcon
        • BookOutlineIcon
        • BurgerMenuIcon
        • CalendarStarIcon
        • ChatParticipantsIcon
        • ClientLogo
        • ColorSelect
        • CommunityIcon
        • CopyIcon
        • DiscordIcon
        • DonateIcon
        • DualScreenIcon
        • EditIcon
        • Eraser
        • ExtensionsIcon
        • FiltersIcon
        • FOCUSABLE_SELECTOR
        • FolderIcon
        • FormatLine
        • GoPrivateIcon
        • HighlightIcon
        • InfoSettingsIcon
        • JoinSession
        • LoadSpace
        • MarginIcon
        • MarginXIcon
        • MarginYIcon
        • MaterialIcon
        • MenuDown
        • MenuIcon
        • MinusIcon
        • MoreIcon
        • OpenFolderIcon
        • Panal
        • Panel1
        • Panel2
        • Panel3
        • Panel3Row
        • Panel4
        • Panel4Row
        • Playlist
        • PortalComponent
        • QuadScreenIcon
        • SbTabsIcon
        • SelectedIcon
        • SelectionUIIcon
        • SettingsIcon
        • ShareIcon
        • SingleScreenIcon
        • Space
        • SpaceDefaultIcon
        • SplitScreenIcon
        • StarIcon
        • StartSessionIcon
        • SupportIcon
        • T
        • TabsIcon
        • ThemeIcon
        • ThreeScreenIcon
        • TickIcon
        • TodayIcon
        • ToolbarIcon
        • UserAvatar
      • Functions

        • BottomSheet
        • Button
        • Checkbox
        • CheckboxIndicator
        • CloseButton
        • ContextMenuItem
        • ContextMenuWithButton
        • Dialog
        • EmptyState
        • ExpandableText
        • FilterPills
        • IconButton
        • InstallAppsIcon
        • LoadingStatus
        • PlaylistLinkContent
        • Popover
        • SafariIcon
        • ScreenshotViewer
        • ScriptureLineHeightIcon
        • SearchBar
        • SeedBibleIcon
        • SeedBibleWordmark
        • Select
        • SelectField
        • SettingRow
        • Skeleton
        • SkeletonContainer
        • Spinner
        • StopIcon
        • Switch
        • SwitchIndicator
        • TextField
        • TextInput
        • TooltipTrigger
        • TranslationList
        • TranslationViewModeMenu
        • trapTabKey
        • useDragReorder
        • useModalFocus
        • useModalLayer
        • usePopover
      • Unexported types
        • Type Aliases

          • ElementRef
          • FieldTextProps
          • OwnProps
          • TextInputCommonProps

Seed Bible extension API (v1.19.0) / seed-bible/components / usePopover

Function: usePopover()

function usePopover(options: UsePopoverOptions): {
  style: CSSProperties | undefined;
};

Where a popover goes and how it goes away. It opens below the anchor, or above when there is more room there, lined up with the anchor's nearer edge of the screen, and follows the anchor on scroll and resize. Escape, a press outside, or Tab closes it; Escape and Tab also hand focus back to returnFocusRef. With several open (a menu from a popover), only the newest answers the keys.

Popover and ContextMenuWithButton are built on this. Spread style on a position: fixed element that is portaled to document.body.

Parameters

ParameterType
optionsUsePopoverOptions

Returns

{
  style: CSSProperties | undefined;
}

style

style: CSSProperties | undefined;
Prev
useModalLayer