Before you start
- A real button or link with an existing action.
- The selector or reusable component for the primary variant.
- For direct mode: a global stylesheet and Node.js.
How to do it
- Identify primary, secondary, and destructive actions. Scope this edit to the primary variant.
- Choose a background color in the customizer. The direct script chooses a black or white text color from the selected background.
- Check the previewed CSS and apply it to the stylesheet already used by the page.
- Test keyboard focus, a disabled button, and the original click action.
Before & after
.primary-button { background: #285D49; color: #ffffff; }The primary action becomes easier to identify without changing its label, destination, or event handler.
Use with an AI coding tool
1 Describe your change
Use your own words. You do not need a file name. The prompt asks the AI to preserve unrelated work.
We remember this choice on this device. Choosing a tool does not connect it to this website.
2 Copy your prompt
Read the complete prompt below, then copy it.
3 Paste into your AI coding tool
Open your website or app project in your AI coding tool. Paste this into its AI chat box and send it. The tool needs access to your project files to make changes.
A website address alone does not give an AI permission or access to edit it. This prompt goes into an AI chat, not a regular terminal window.
4 Check the result
Check primary and secondary variants, keyboard focus, and narrow layouts.
Open your project preview and try the change. Review what changed before publishing. If it is wrong, use your tool’s undo or restore your saved project version.
If the result is not what you expected
Every button changed
The selector was too broad. Target the primary class instead of button.
The button looks clickable while disabled
Color is only one state. Keep the disabled behavior and its visual treatment.
Undo the change
Remove the labelled button override or restore the previous primary-variant styles.
References & testing
The examples above explain the expected behavior; they are not a claim that this prompt has been tested in every framework or AI model. The direct tool uses our shared local-edit engine; native Windows execution remains unverified.