@ui5/webcomponents-react
Version:
React Wrapper for UI5 Web Components and additional components
75 lines (74 loc) • 3 kB
TypeScript
import '@ui5/webcomponents/dist/ColorPicker.js';
import type { CommonProps, Ui5CustomEvent, Ui5DomRef } from '@ui5/webcomponents-react-base';
interface ColorPickerAttributes {
/**
* Defines the accessible name of the component.
*
* **Note:** Available since [v2.20.0](https://github.com/UI5/webcomponents/releases/tag/v2.20.0) of **@ui5/webcomponents**.
* @default undefined
*/
accessibleName?: string | undefined;
/**
* Receives id(or many ids) of the elements that label the component.
*
* **Note:** Available since [v2.20.0](https://github.com/UI5/webcomponents/releases/tag/v2.20.0) of **@ui5/webcomponents**.
* @default undefined
*/
accessibleNameRef?: string | undefined;
/**
* Determines the name by which the component will be identified upon submission in an HTML form.
*
* **Note:** This property is only applicable within the context of an HTML Form element.
*
* **Note:** Available since [v2.0.0](https://github.com/UI5/webcomponents/releases/tag/v2.0.0) of **@ui5/webcomponents**.
* @default undefined
*/
name?: string | undefined;
/**
* When set to `true`, the alpha slider and inputs for RGB values will not be displayed.
*
* **Note:** Available since [v2.5.0](https://github.com/UI5/webcomponents/releases/tag/v2.5.0) of **@ui5/webcomponents**.
* @default false
*/
simplified?: boolean;
/**
* Defines the currently selected color of the component.
*
* **Note**: use HEX, RGB, RGBA, HSV formats or a CSS color name when modifying this property.
* @default "rgba(255,255,255,1)"
*/
value?: string;
}
interface ColorPickerDomRef extends Required<ColorPickerAttributes>, Ui5DomRef {
}
interface ColorPickerPropTypes extends ColorPickerAttributes, Omit<CommonProps, keyof ColorPickerAttributes | 'onChange'> {
/**
* Fired when the the selected color is changed
*
* | cancelable | bubbles |
* | :--------: | :-----: |
* | ❌|✅|
*/
onChange?: (event: Ui5CustomEvent<ColorPickerDomRef>) => void;
}
/**
* The `ColorPicker` allows users to choose any color and provides different input options for selecting colors.
*
* ### Usage
*
* #### When to use
* Use the color picker if:
*
* - users need to select any color freely.
*
* #### When not to use
*
* - Users need to select one color from a predefined set of colors. Use the ColorPalette component instead.
*
*
*
* __Note:__ This is a UI5 Web Component! [ColorPicker UI5 Web Component Documentation](https://ui5.github.io/webcomponents/components/ColorPicker) | [Repository](https://github.com/UI5/webcomponents)
*/
declare const ColorPicker: import("react").ForwardRefExoticComponent<ColorPickerPropTypes & import("@ui5/webcomponents-react-base").WithWebComponentPropTypes & import("react").RefAttributes<ColorPickerDomRef>>;
export { ColorPicker };
export type { ColorPickerDomRef, ColorPickerPropTypes };