@elastic/react-search-ui-views
TypeScript icon, indicating that this package has built-in type declarations

1.21.5 • Public • Published

react-search-ui-views

Part of the Search UI project.

This is the view layer for react-search-ui.

This library provides view implementations for all of React Search UI's components along with corresponding CSS, and a few layout components.

The components provided here have no logic behind them, they are simple, stateless, view-only components.

Usage

import React from "react";
import {
  Layout,
  PagingInfo,
  Result,
  SearchBox
} from "@elastic/react-search-ui-views";
import "@elastic/react-search-ui-views/lib/styles/styles.css";

export default function App() {
  return (
    <div>
      <Layout
        header={<SearchBox value="test" />}
        bodyHeader={
          <div className="meta">
            <PagingInfo
              end={10}
              searchTerm={"test"}
              start={1}
              totalResults={100}
            />
          </div>
        }
        bodyContent={
          <div>
            <Result
              title="A Result"
              fields={{ description: "This is an example of a result" }}
            />
          </div>
        }
      />
    </div>
  );
}

Storybook

A visual component reference is available locally. It is built with Storybook, and can be run locally with the following command:

npm run storybook

/@elastic/react-search-ui-views/

    Package Sidebar

    Install

    npm i @elastic/react-search-ui-views

    Weekly Downloads

    85,674

    Version

    1.21.5

    License

    Apache-2.0

    Unpacked Size

    298 kB

    Total Files

    184

    Last publish

    Collaborators

    • miguel-elastic
    • lenegadewoll
    • cbishopewc
    • cindy_c
    • asnyder-elastic
    • lgestc
    • patryk.kopycinski
    • banerjeesoham004
    • legrego
    • bradtimmerman
    • devcorpio
    • yan.savitski
    • jeramysoucy
    • tkajtoch
    • johnwcambra
    • colleen.mcginnis
    • scottybollinger
    • kyrspl
    • phoey1
    • verogo
    • breehall
    • trevorpierce
    • glitteringkatie
    • jen-huang
    • delvedor
    • lukasolson
    • ccowan
    • jbudz
    • thomasneirynck
    • weltenwort
    • pugnascotia
    • zinckiwi
    • brandon.kobel
    • nreese
    • mgreau
    • jonahbull
    • jarpy
    • leathekd
    • lukeelmers
    • ddillinger
    • joshdover
    • jasonstoltz
    • bamieh
    • markov00
    • joshmock
    • vignesh.shanmugam
    • watson
    • rhodesjason
    • jmlrt
    • mattkime
    • constancecchen
    • afoucret
    • nickpeihl
    • axw
    • mistic
    • elasticmachine
    • gtback
    • pickypg
    • trentm
    • andrewvc-elastic
    • jorge.sanz
    • stratoula
    • nkammah
    • streamich
    • nickofthyme
    • chloeruka