react-instantsearch

  • Version 7.7.2
  • Published
  • 4.24 MB
  • 4 dependencies
  • MIT license

Install

npm i react-instantsearch
yarn add react-instantsearch
pnpm add react-instantsearch

Overview

⚡ Lightning-fast search for React, by Algolia

Index

Functions

Breadcrumb: ({
attributes,
rootPath,
separator,
transformItems,
translations,
...props
}: BreadcrumbProps) => JSX.Element;

    function ClearRefinements

    ClearRefinements: ({
    includedAttributes,
    excludedAttributes,
    transformItems,
    translations,
    ...props
    }: ClearRefinementsProps) => JSX.Element;

      function CurrentRefinements

      CurrentRefinements: ({
      includedAttributes,
      excludedAttributes,
      transformItems,
      ...props
      }: CurrentRefinementsProps) => JSX.Element;

        function HierarchicalMenu

        HierarchicalMenu: ({
        attributes,
        limit,
        rootPath,
        separator,
        showMore,
        showMoreLimit,
        showParentLevel,
        sortBy,
        transformItems,
        translations,
        ...props
        }: HierarchicalMenuProps) => JSX.Element;

          function Highlight

          Highlight: <THit extends Hit<BaseHit>>({
          hit,
          attribute,
          highlightedTagName,
          nonHighlightedTagName,
          separator,
          ...props
          }: HighlightProps<THit>) => JSX.Element;

            function Hits

            Hits: <THit extends BaseHit = BaseHit>({
            escapeHTML,
            transformItems,
            hitComponent: HitComponent,
            ...props
            }: HitsProps<THit>) => JSX.Element;

              function HitsPerPage

              HitsPerPage: ({
              items: userItems,
              transformItems,
              ...props
              }: HitsPerPageProps) => JSX.Element;

                function InfiniteHits

                InfiniteHits: <THit extends BaseHit = BaseHit>({
                showPrevious: shouldShowPrevious,
                cache,
                escapeHTML,
                showPrevious: userShowPrevious,
                transformItems,
                translations,
                ...props
                }: InfiniteHitsProps<THit>) => JSX.Element;
                  Menu: ({
                  attribute,
                  limit,
                  showMore,
                  showMoreLimit,
                  sortBy,
                  transformItems,
                  translations,
                  ...props
                  }: MenuProps) => JSX.Element;

                    function Pagination

                    Pagination: ({
                    showFirst,
                    showPrevious,
                    showNext,
                    showLast,
                    padding,
                    totalPages,
                    translations,
                    ...props
                    }: PaginationProps) => JSX.Element;

                      function PoweredBy

                      PoweredBy: (props: PoweredByProps) => JSX.Element;

                        function RangeInput

                        RangeInput: ({
                        attribute,
                        min,
                        max,
                        precision,
                        translations,
                        ...props
                        }: RangeInputProps) => JSX.Element;

                          function RefinementList

                          RefinementList: ({
                          searchable,
                          searchablePlaceholder,
                          attribute,
                          operator,
                          limit,
                          showMore,
                          showMoreLimit,
                          sortBy,
                          escapeFacetValues,
                          transformItems,
                          translations,
                          ...props
                          }: RefinementListProps) => JSX.Element;
                            SearchBox: ({
                            queryHook,
                            searchAsYouType,
                            ignoreCompositionEvents,
                            translations,
                            ...props
                            }: SearchBoxProps) => JSX.Element;

                              function Snippet

                              Snippet: <THit extends Hit<BaseHit>>({
                              hit,
                              attribute,
                              highlightedTagName,
                              nonHighlightedTagName,
                              separator,
                              ...props
                              }: SnippetProps<THit>) => JSX.Element;

                                function SortBy

                                SortBy: ({ items, transformItems, ...props }: SortByProps) => JSX.Element;

                                  function Stats

                                  Stats: ({ translations, ...props }: StatsProps) => JSX.Element;

                                    function ToggleRefinement

                                    ToggleRefinement: ({
                                    attribute,
                                    on,
                                    off,
                                    ...props
                                    }: ToggleRefinementProps) => JSX.Element;

                                      Type Aliases

                                      type BreadcrumbProps = Omit<BreadcrumbUiProps, keyof UiProps> &
                                      Omit<UseBreadcrumbProps, 'separator'> & {
                                      translations?: Partial<UiProps['translations']>;
                                      };

                                        type ClearRefinementsProps

                                        type ClearRefinementsProps = Omit<ClearRefinementsUiComponentProps, keyof UiProps> &
                                        UseClearRefinementsProps & {
                                        translations?: Partial<UiProps['translations']>;
                                        };

                                          type CurrentRefinementsProps

                                          type CurrentRefinementsProps = Omit<
                                          CurrentRefinementsUiComponentProps,
                                          keyof UiProps
                                          > &
                                          UseCurrentRefinementsProps;

                                            type HierarchicalMenuProps

                                            type HierarchicalMenuProps = Omit<HierarchicalMenuUiComponentProps, keyof UiProps> &
                                            UseHierarchicalMenuProps & {
                                            translations?: Partial<UiProps['translations']>;
                                            };

                                              type HighlightProps

                                              type HighlightProps<THit extends Hit<BaseHit>> = {
                                              hit: THit;
                                              attribute: keyof THit | string[];
                                              } & PartialKeys<
                                              Omit<HighlightUiComponentProps, 'parts'>,
                                              'highlightedTagName' | 'nonHighlightedTagName' | 'separator'
                                              >;

                                                type HitsPerPageProps

                                                type HitsPerPageProps = Omit<HitsPerPageUiComponentProps, keyof UiProps> &
                                                UseHitsPerPageProps;

                                                  type HitsProps

                                                  type HitsProps<THit extends BaseHit> = Omit<
                                                  HitsUiComponentProps<Hit<THit>>,
                                                  keyof UiProps<THit>
                                                  > & {
                                                  hitComponent?: React.JSXElementConstructor<{
                                                  hit: Hit<THit>;
                                                  sendEvent: SendEventForHits;
                                                  }>;
                                                  } & UseHitsProps<THit>;

                                                    type InfiniteHitsProps

                                                    type InfiniteHitsProps<THit extends BaseHit = BaseHit> = Omit<
                                                    InfiniteHitsUiComponentProps<Hit<THit>>,
                                                    keyof UiProps<THit>
                                                    > &
                                                    UseInfiniteHitsProps<THit> & {
                                                    /**
                                                    * Displays the "Show Previous" button when the UI is loaded from a page
                                                    * beyond the first one.
                                                    * @default true
                                                    */
                                                    showPrevious?: boolean;
                                                    translations?: Partial<UiProps<THit>['translations']>;
                                                    };
                                                      type MenuProps = Omit<MenuUiComponentProps, keyof UiProps> &
                                                      UseMenuProps & {
                                                      translations?: Partial<UiProps['translations']>;
                                                      };

                                                        type PaginationProps

                                                        type PaginationProps = Omit<PaginationUiComponentProps, keyof UiProps> &
                                                        UsePaginationProps & {
                                                        translations?: Partial<UiProps['translations']>;
                                                        };

                                                          type PoweredByProps

                                                          type PoweredByProps = Omit<PoweredByUiComponentProps, keyof UiProps>;

                                                            type RangeInputProps

                                                            type RangeInputProps = Omit<RangeInputUiProps, keyof UiProps> &
                                                            UseRangeProps & {
                                                            translations?: Partial<UiProps['translations']>;
                                                            };

                                                              type RefinementListProps

                                                              type RefinementListProps = Omit<RefinementListUiComponentProps, keyof UiProps> &
                                                              UseRefinementListProps &
                                                              Pick<RefinementListWidgetParams, 'searchable' | 'searchablePlaceholder'> & {
                                                              translations?: Partial<
                                                              UiProps['translations'] &
                                                              SearchBoxTranslations & {
                                                              /**
                                                              * What to display when there are no results.
                                                              */
                                                              noResultsText: string;
                                                              }
                                                              >;
                                                              };

                                                                type SearchBoxProps

                                                                type SearchBoxProps = Omit<
                                                                SearchBoxUiComponentProps,
                                                                Exclude<keyof UiProps, 'onSubmit' | 'autoFocus'>
                                                                > &
                                                                UseSearchBoxProps & {
                                                                /**
                                                                * Whether to trigger the search only on submit.
                                                                * @default true
                                                                */
                                                                searchAsYouType?: boolean;
                                                                /**
                                                                * Whether to update the search state in the middle of a
                                                                * composition session.
                                                                * @default false
                                                                */
                                                                ignoreCompositionEvents?: boolean;
                                                                translations?: Partial<UiProps['translations']>;
                                                                };

                                                                  type SnippetProps

                                                                  type SnippetProps<THit extends Hit<BaseHit>> = {
                                                                  hit: THit;
                                                                  attribute: keyof THit | string[];
                                                                  } & PartialKeys<
                                                                  Omit<SnippetUiComponentProps, 'parts'>,
                                                                  'highlightedTagName' | 'nonHighlightedTagName' | 'separator'
                                                                  >;

                                                                    type SortByProps

                                                                    type SortByProps = Omit<SortByUiComponentProps, keyof UiProps> & UseSortByProps;

                                                                      type StatsProps

                                                                      type StatsProps = Omit<StatsUiComponentProps, keyof UiProps> &
                                                                      UseStatsProps & {
                                                                      translations?: Partial<UiProps['translations']>;
                                                                      };

                                                                        type ToggleRefinementProps

                                                                        type ToggleRefinementProps = PartialKeys<
                                                                        Omit<ToggleRefinementUiComponentProps, keyof UiProps>,
                                                                        'label'
                                                                        > &
                                                                        UseToggleRefinementProps;

                                                                          Package Files (19)

                                                                          Dependencies (4)

                                                                          Dev Dependencies (0)

                                                                          No dev dependencies.

                                                                          Peer Dependencies (3)

                                                                          Badge

                                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-instantsearch.

                                                                          • Markdown
                                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-instantsearch)
                                                                          • HTML
                                                                            <a href="https://www.jsdocs.io/package/react-instantsearch"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>