Git Product home page Git Product logo

fe-case's Introduction

Aral Select

A customizable and easy-to-use select control for React applications, designed to enhance user experience with smooth interactions and a variety of configuration options.

Table of Contents

Usage

import type { JSX } from 'react'
import type { AralItem } from '@fe-case/aral-select'
import { AralSelect } from '@fe-case/aral-select'

function Page(): JSX.Element {
  return (
    <AralSelect
      name={'_rick_and_morty_'}
      getItemText={(item: AralItem) => item['name']}
      getItemValue={(item: AralItem) => item['id']}
      items={[]}
      isMulti={true}
    />
  )
}

Options

  • id - The unique ID to set on the Aral Select component
  • name - The name of the HTML input (no input will be rendered in case of leaving this empty)
  • defaultValue - The default value(s) to be shown at start
  • items - Array of items that populate the select menu
  • required - Marks the value-holding input as required for form validation
  • placeholder - Placeholder for the select value
  • isDisabled - Disables the select control
  • isMulti - Support multiple selected items
  • isLoading - Is the select control in a state of loading (async)
  • disableHighlight - Disables highlighting the search term
  • enableDebugMode - Enables inserting debug logs into the console
  • hideSelectedItems - Hide the selected item from the select menu
  • closeMenuOnSelect - Close the select menu when the user selects an item
  • isMenuOpen - Whether the select menu is open
  • inputProps - To set and/or overwrite existing HTML input attributes
  • noItemsMessage - Text to display when there are no items to show
  • loadItems - The async function that fetches and returns the items
  • loadingElement - The custom loading component
  • menuElement - The custom menu component
  • itemElement - The custom item component
  • getItemText - The function that extracts the text from the item
  • getItemValue - The function that extracts the value from the item
  • isItemDisabled - The function that decides if the item must be in disabled state

License

MIT. Copyright (c) Huseyin ELMAS 2024.

fe-case's People

Contributors

hsynlms avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.