RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/NoDeskAI/browser-pilot

Cursor rule

.cursor/rules/keyboard-shortcuts-ux.mdc

快捷键交互必须有可见 UI 提示,并使用统一 kbd 样式

Cursor rules

Quality

31/100

Scores the file, not the repository.

Length

105 words

3 headings · 1 code blocks

Repository

34

— · pushed 25 days ago

Last changed

3 days ago

First indexed 3 days ago.
NoDeskAI/browser-pilot/.cursor/rules/keyboard-shortcuts-ux.mdcRawGitHub
1---
2description: 快捷键交互必须有可见 UI 提示,并使用统一 kbd 样式
3globs: "*.vue, *.ts, *.tsx, *.css"
4---
5 
6# 快捷键 UX 规范
7 
8所有新增或修改的快捷键交互,都必须同时更新用户可见的 UI 提示。不能只实现键盘监听而不在界面上标注快捷键。
9 
10## 规则
11 
121. **快捷键必须可见**:有快捷键的按钮、菜单项、Tooltip 或 Dialog 操作,必须在对应操作旁展示快捷键提示。
132. **统一使用 kbd 样式**:快捷键提示使用 `<kbd data-slot="kbd">...</kbd>`,不要在业务组件里手写背景、边框、字号、阴影或额外间距等 Tailwind 样式。
143. **文案走 i18n**:用户可见的快捷键文本必须复用或新增 locale key;不要在 Vue 模板中硬编码英文文案。
154. **Enter/Return 用图标**:确认类回车快捷键优先使用回车/Return 图标,例如 `CornerDownLeft`;保留 `sr-only` 文案用于可访问性。
165. **ESC 用文字**:取消/关闭类快捷键显示为 `ESC`,不要写成 `Esc` 或其它大小写形式。
176. **文字不替代状态**:快捷键提示只标注快捷键,不改变按钮主文案;例如 `删除 + ↵`,不要把按钮文案改成“回车删除”。
187. **Keycap 必须轻量**:快捷键提示是辅助信息,样式应跟随当前按钮颜色,只使用 10% 透明叠色底;不要加边框,不要做成按钮里的第二个按钮。
198. **底色算法固定**:keycap 底色基于 `currentColor` 计算,使用类似 `color-mix(in srgb, currentColor var(--kbd-bg-strength), transparent)` 的算法;默认强度为 10%,深色背景会被浅色前景提亮,浅色背景会被深色前景压暗。需要微调时只改全局 `--kbd-bg-strength`。
209. **图标 keycap 单独留白**:文字 keycap 保持紧凑;图标 keycap 使用更大的正方形底色区域承载图标,保证图标四周有约 2-3px 视觉留白。
21 
22## 示例
23 
24```vue
25<Button>
26 {{ t('session.confirmDelete') }}
27 <kbd data-slot="kbd" data-icon="true">
28 <CornerDownLeft aria-hidden="true" />
29 <span class="sr-only">{{ t('session.shortcutEnter') }}</span>
30 </kbd>
31</Button>
32 
33<Button variant="outline">
34 {{ t('session.cancel') }}
35 <kbd data-slot="kbd">{{ t('session.shortcutEscape') }}</kbd>
36</Button>
37```
38 

Sections

  • 快捷键 UX 规范
  • 规则
  • 示例

What it covers

ui

Stack — with the evidence

docker

(1.00)

python

(0.80)

node

(0.70)

vue

(0.70)

fastapi

(0.70)

postgres

(0.70)

tailwind

(0.70)

vite

(0.70)

aws

(0.70)

typescript

(0.60)

javascript

(0.50)

Glob targeting

  • *.vue
  • *.ts
  • *.tsx
  • *.css

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
NoDeskAI
Language
—
License
—
Archived
no

All configs in this repo

Also in NoDeskAI/browser-pilot

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
NoDeskAI/browser-pilot.cursor/rules/build-from-user-perspective.mdc · 34Cursor rulesdockernode+9buildsecurity51/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/debug-container.mdc · 34Cursor rulesdockerpython+9api65/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/deploy.mdc · 34Cursor rulesdockerpython+9no sections38/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/env-vars.mdc · 34Cursor rulesdockerpython+9setup63/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/fingerprint-popover-sync.mdc · 34Cursor rulesdockerpython+9no sections25/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/plan-ui-summary.mdc · 34Cursor rulesdockerpython+9ui54/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/tailwind-css-color-mix.mdc · 34Cursor rulesdockerpython+9ui50/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/ux-ui-daynight.mdc · 34Cursor rulesdockerpython+9lint-formatui54/1003 days ago
NoDeskAI/browser-pilot.cursor/rules/verify-before-claim.mdc · 34Cursor rulesdockerpython+9no sections50/1003 days ago
Diff against .cursor/rules/build-from-user-perspective.mdc Diff against .cursor/rules/debug-container.mdc Diff against .cursor/rules/deploy.mdc Diff against .cursor/rules/env-vars.mdc Diff against .cursor/rules/fingerprint-popover-sync.mdc Diff against .cursor/rules/plan-ui-summary.mdc Diff against .cursor/rules/tailwind-css-color-mix.mdc Diff against .cursor/rules/ux-ui-daynight.mdc Diff against .cursor/rules/verify-before-claim.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack