For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/color-picker.md.
v0.0.57
  • English
  • ColorPicker

    Data Entry@rockshin/tao-ui

    Choose solid or gradient colors with precise Color objects, presets and format conversion.

    The added API follows Ant Design 6.7.0; appearance, theming and Semantic DOM use tao-ui. Existing component APIs remain unchanged.

    Examples

    Controlled color

    Keep the Color object returned by onChange to retain precision while editing.

    #008888

    TSX

    Three sizes

    Sizes follow the compatible API: small, middle and large.

    TSX

    Gradients and stops

    Add, remove and move stops, or switch between solid and gradient modes.

    TSX

    Grouped presets

    Group colors by use; presets can also contain gradients.

    TSX

    HEX, RGB and HSB

    Switch representations in the panel or lock the required format.

    TSX

    Alpha and clear

    disabledAlpha emits opaque colors; allowClear provides a transparent value.

    TSX

    Commit after editing

    Use onChangeComplete to commit a completed drag or edit.

    Committed: #008888

    TSX

    Custom panel

    Compose Picker and Presets while retaining picker state and events.

    TSX

    Triggers and disabled state

    Use a custom button, hover activation or a disabled picker.

    TSX

    Phone palette

    The independent phone viewport constrains the panel and inherits the theme.

    390 × 640
    TSX

    API

    ColorPicker

    PropertyDescriptionTypeDefault Value
    classNameAdditional css classstring | undefined-
    styleAdditional styleCSSProperties | undefined-
    disabledWhether to disableboolean | undefined-