2.0.2 • Published 8 months ago

@licuido-ui/ui_search v2.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Search

Search allows a user to search for specific information or data. The component typically includes an input field where the user can enter a search

Author

Link

Story Book Link Search

PlayGround

Try it have a fun codeBox

Installation

npm i  @licuido-ui/ui_search

Import component

import { Search } from '@licuido-ui/ui_search';

Usage

<Search options={[]} />

Image

alt text

Sample Code

<Search
  options={[
    { label: 'Redemption', id: 1 },
    { label: 'Random', id: 2 },
    { label: 'Godfather', id: 3 },
    { label: 'Dark Knight', id: 4 },
    {
      id: 1,
      label: 'The Redemption',
      url: 'https://images.unsplash.com/photo-1517630800677-932d836ab680?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=687&q=80',
    },
  ]}
  variant={'isTextSearch'}
  paperRootStyle={{}}
  rootStyle={{ height: '60vh', width: '300px' }}
  noOptionsText={'No options'}
  inputRootStyle={{}}
  placeHolderText={'Search..'}
  placeHolderColor={'#929292'}
  placeHolderSize={12}
  inputFontSize={12}
  inputFontColor={'#393939dd'}
  inputBackgroundColor={''}
  inputBorderDefaultColor={'#E9E9E9'}
  inputBorderHoverColor={'#b4aef4'}
  inputBorderFocusColor={'#665CD7'}
  startAdornmentIcon={<SearchIcon />}
  endAdornmentIcon={<Close />}
  paperBackgroundColor={''}
  paperBorderColor={'#665CD7'}
  paperMinHeight={undefined}
  paperMaxHeight={undefined}
  listItemSubTextStyles={{}}
  listItemSubTextColor={'#E9E9E9'}
  listItemSubTextSize={12}
  listItemLabelStyles={{}}
  listItemLabelColor={'#393939dd'}
  listItemLabelSize={12}
  listTextHoverColor={'#665CD7'}
  listTextHoverBgColor={'#fdfafa'}
  keyDownListBgcolor={''}
  keyDownListTextColor={''}
  cardImgStyle={{}}
  cardImgWidth={30}
  cardImgHeight={30}
  imgBorderRadius={4}
  recentLabel={'Recent Search'}
  recentLabelTextColor={'#393939dd'}
  recentLabelFontSize={12}
  recentLabelStyle={{}}
  recentSearchItemStyles={{}}
  recentSearchItemTextColor={'#393939dd'}
  recentSearchItemBgcolor={'#E9E9E9'}
  recentSearchItemSize={10}
  controlsRootStyles={{}}
  controlsTextColor={'#393939dd'}
  controlsBgColor={'#E9E9E9'}
  controlsTextSize={12}
  componentColumnDirection={'column-reverse'}
  recentSearchLabelColor={'#393939dd'}
  recentSearchLabelSize={12}
  recentSearchLabel={'Recent Search'}
  categoryLabel1={' CATEGORY SUGGEST 1'}
  categoryLabel2={'CATEGORY SUGGEST 2'}
  primaryCategoryData={[]}
  secondaryCategoryData={[]}
  onSelectSearchDataFun={() => false}
  handleInputOnChange={() => false}
  handleOptionChange={() => false}
/>

Sample Code

<Search
  variant={'isSearchInput'}
  rootStyle={{ height: '60vh', width: '300px' }}
  inputWidth='100%'
  minExpandWidth='43px'
/>

Props

NameDescriptionDefaultControl
options{ id: number; label: string; subTitle?: string; url?: string; }[][][]
variant"isSearchInput" or "isTextSearch" or "isRecentSearch" or "isCardBased" or "isCardWithTitleBased" or "isShortcutKeyBased" or "isShortComponent""isSearchInput""isSearchInput"
paperRootStyleSxProps<{}>{ }paperRootStyle : {}
noOptionsTextstring"no option"No options
inputRootStyleSxProps<{}>{ }inputRootStyle : {}
placeHolderTextstring"Search"Search..
placeHolderColorstring"#929292"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
placeHolderSizenumber12
inputFontSizenumber12
inputFontColorstring"#393939dd"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
inputBackgroundColorstring""linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
inputBorderDefaultColorstring"#E9E9E9"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
inputBorderHoverColorstring"#b4aef4"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
inputBorderFocusColorstring"#665CD7"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
startAdornmentIconReactNode<SearchIcon />""
endAdornmentIconReactNode<Close />""
paperBackgroundColorstring""linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
paperBorderColorstring"#665CD7"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
paperMinHeightnumber-Set number
paperMaxHeightnumber-Set number
listItemSubTextStylesSxProps<{}>{ }listItemSubTextStyles : {}
listItemSubTextColorstring"#E9E9E9"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
listItemSubTextSizenumber12
listItemLabelStylesSxProps<{}>{ }listItemLabelStyles : {}
listItemLabelColorstring"#393939dd"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
listItemLabelSizenumber12
listTextHoverColorstring"#665CD7"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
listTextHoverBgColorstring"#fdfafa"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
keyDownListBgcolorstring""linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
keyDownListTextColorstring""linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
cardImgStyleSxProps<{}>{ }cardImgStyle : {}
cardImgWidthnumber30
cardImgHeightnumber30
imgBorderRadiusnumber4
recentLabelstring""Recent Search
recentLabelTextColorstring"#393939dd"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
recentLabelFontSizenumber12
recentLabelStyleSxProps<{}>{ }recentLabelStyle : {}
recentSearchItemStylesSxProps<{}>{ }recentSearchItemStyles : {}
recentSearchItemTextColorstring"#393939dd"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
recentSearchItemBgcolorstring"#E9E9E9"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
recentSearchItemSizenumber10
controlsRootStylesSxProps<{}>{ }controlsRootStyles : {}
controlsTextColorstring"#393939dd"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
controlsBgColorstring"#E9E9E9"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
controlsTextSizenumber12
componentColumnDirection"column" or "column-reverse""column"column
recentSearchLabelColorstring"#393939dd"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
recentSearchLabelSizenumber12
recentSearchLabelstring""Recent Search
categoryLabel1string""CATEGORY SUGGEST 1
categoryLabel2string""CATEGORY SUGGEST 2
primaryCategoryData{ id: number; label: string; url?: string; subTitle?: string; }[][][]
secondaryCategoryData{ id: number; label: string; subTitle?: string; url?: string; }[][][]
onSelectSearchDataFun()=>{} void() => false-
handleInputOnChange()=>{} void() => false-
handleOptionChange()=>{} void() => false-
classNamestring-Set string
sxSxProps<Theme>-Set object
isTextSearchboolean-Set boolean
isRecentSearchboolean-Set boolean
isCardBasedboolean-Set boolean
isCardWithTitleBasedboolean-Set boolean
isShortcutKeyBasedboolean-Set boolean
isShortComponentboolean-Set boolean
keyBasedOptionStyleSxProps<{}>{ }Set object
cardTitleImgWidthnumber40Set number
cardTitleImgHeightnumber40Set number
TitleImgBorderRadiusnumber4Set number
recentSearchOptionany[]Set object
categoryLabel1Colorstring"#393939dd"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
categoryLabel1Sizenumber12Set number
categoryLabel2Colorstring"#393939dd"linear-gradient(rgba(255,0,0,0), rgba(255,0,0,1));
categoryLabel2Sizenumber12Set number
isSearchExpandWithDropdownSearch with dropdown for search expanded-Set boolean (true or false)
inputWidthstring""width
minExpandWidthstring""minExpandWidth for input