ant-design / ant-design/pro-editor

[Request] add Toggle Component

Open
#205 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
247
Forks
28
PR merge metrics
No merged PRs in 30d

Description

### 🥰 需求描述 | Feature Description

![Kapture 2025-01-10 at 14 10 20](https://github.com/user-attachments/assets/d998451c-60ab-4516-b79d-e6bc71a96045)

请看上面的动图,有点类似可选择的按钮,这个组件在 shadcn/ui 中叫做 Toggle: https://ui.shadcn.com/docs/components/toggle-group

### 🧐 解决方案 | Proposed Solution

两点小想法:
1. 新增 Toggle 组件
2. 扩展 ActionIcon 组件,用户点击的动画是可选择(animation),并增加一个可选择的属性(selectable)

这个组件挺实用的,希望支持🙏

### 📝 补充信息 | Additional Information

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the existing ActionIcon component and compare the requested Toggle behavior with the linked shadcn/ui Toggle documentation. The work is done when a Toggle component is available and ActionIcon supports the requested selectable state and animation behavior, with the component APIs and interaction details matching the project’s conventions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.