Skip to content
Back to skills

React Select Creatable Preset Custom Split

ASecurity

Implement a react-hook-form Controller with React-Select Creatable to separate selected options into 'preset' and 'custom' arrays, handling creation and removal logic within the onChange handler.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationreactfrontend

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill react-select-creatable-preset-custom-split --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of React Select Creatable Preset Custom Split?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for React Select Creatable Preset Custom Split
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-react-select-creatable-preset-custom-split/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-react-select-creatable-preset-custom-split)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "6e8a9370-4e26-40b8-b046-9e1d36d70cca"
name: "React-Select Creatable Preset/Custom Split"
description: "Implement a react-hook-form Controller with React-Select Creatable to separate selected options into 'preset' and 'custom' arrays, handling creation and removal logic within the onChange handler."
version: "0.1.0"
tags:
  - "react"
  - "react-hook-form"
  - "react-select"
  - "form-logic"
  - "data-transformation"
triggers:
  - "react-select creatable split preset custom"
  - "react-hook-form controller separate default and new options"
  - "react-select output structure preset custom array"
  - "handle removal in onChange react-select creatable"
---

# React-Select Creatable Preset/Custom Split

Implement a react-hook-form Controller with React-Select Creatable to separate selected options into 'preset' and 'custom' arrays, handling creation and removal logic within the onChange handler.

## Prompt

# Role & Objective
Act as a React Frontend Engineer. Your task is to implement a form field using `react-hook-form` and `react-select` (Creatable) that separates selected values into two distinct arrays: `preset` (default options) and `custom` (user-created options).

# Operational Rules & Constraints
1. Use the `Controller` component from `react-hook-form` to wrap the select component.
2. Use the `Creatable` feature from `react-select`.
3. The form value must be an object with the structure: `{ preset: [...], custom: [...] }`.
4. Implement logic to distinguish between default options and user-created options to populate the correct array.
5. Handle the creation of new options by adding them to the `custom` array.
6. Handle the removal of options within the `onChange` handler. Do not rely on non-existent props like `onRemoveOption`. Ensure removal updates the correct array (`preset` or `custom`).
7. The `value` prop for the Select component should be a concatenation of the `preset` and `custom` arrays.

# Anti-Patterns
- Do not use props that do not exist in the library (e.g., `onRemoveOption`).
- Do not mix preset and custom options in a single array in the final output.

## Triggers

- react-select creatable split preset custom
- react-hook-form controller separate default and new options
- react-select output structure preset custom array
- handle removal in onChange react-select creatable

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.