0.0.21 • Published 5 years ago
cavemen v0.0.21
Cavemen
Primitive React Components
PLEASE NOTE: At this current time, searchable
cannot be used with multiple
Dropdown
Prop | Description | Type | Required | Default Value |
---|---|---|---|---|
options | An array of Option type to display | Option[] | * | - |
onChange | An event handler for when an Option is selected. | Handler | * | - |
clearable | Whether or not the Dropdown Option can be cleared | Boolean | false | |
default | A default Option to be selected | Option | - | |
disabled | Whether or not the Dropdown is disabled | Boolean | false | |
id | An ID to append to the Dropdown wrapper | String | - | |
label | A label for the Dropdown - appears directly above it | String | - | |
multiple | Whether or not the Dropdown should be a mult-select | Boolean | false | |
open | Whether or not the Dropdown is open on render | Boolean | false | |
placeholder | Placeholder text before a user selects an option | String | - | |
searchable | Allows users to search for Option | Boolean | false | |
trigger | A component passed down as a trigger - for example, if you want an icon to have dropdown functionality | ReactNode | - |
Dropdown Types
Option
interface Option {
value: string | number,
name: string
}
Handler
type Handler = (option: Option | Option[] | null, event: SyntheticEvent) => void;
0.0.21
5 years ago
0.0.20
5 years ago
0.0.19
5 years ago
0.0.18
5 years ago
0.0.17
5 years ago
0.0.16
5 years ago
0.0.15
5 years ago
0.0.14
5 years ago
0.0.13
5 years ago
0.0.12
5 years ago
0.0.11
5 years ago
0.0.10
5 years ago
0.0.9
5 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.6
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago