Modifiers
Modifiers allow you to customize generated output by adding visual, layout, size, and behavior instructions to a prompt.
Overview
Modifiers enhance an intent.
For example:
intentcss generate --prompt "button"
intentcss generate --prompt "button"
generates a standard button.
Adding modifiers:
intentcss generate --prompt "large red shadow button"
intentcss generate --prompt "large red shadow button"
changes the appearance of the generated output.
IntentCSS combines detected modifiers with the selected intent to build the final result.
How Modifiers Work
Prompt:
large red button
large red button
Detected:
Intent:
button
Modifiers:
large
red
Intent:
button
Modifiers:
large
red
Generated:
rounded-lg bg-red-600 px-6 py-3 text-lg text-white hover:bg-red-700
rounded-lg bg-red-600 px-6 py-3 text-lg text-white hover:bg-red-700
Color Modifiers
Colors alter component appearance.
Blue
intentcss generate --prompt "blue button"
intentcss generate --prompt "blue button"
bg-blue-600 hover:bg-blue-700
bg-blue-600 hover:bg-blue-700
Red
intentcss generate --prompt "red button"
intentcss generate --prompt "red button"
bg-red-600 hover:bg-red-700
bg-red-600 hover:bg-red-700
Green
intentcss generate --prompt "green button"
intentcss generate --prompt "green button"
bg-green-600 hover:bg-green-700
bg-green-600 hover:bg-green-700
Purple
intentcss generate --prompt "purple button"
intentcss generate --prompt "purple button"
bg-purple-600 hover:bg-purple-700
bg-purple-600 hover:bg-purple-700
Black
intentcss generate --prompt "black button"
intentcss generate --prompt "black button"
bg-black hover:bg-gray-800
bg-black hover:bg-gray-800
Size Modifiers
Large
Adds additional padding and sizing.
intentcss generate --prompt "large button"
intentcss generate --prompt "large button"
px-6 py-3 text-lg
px-6 py-3 text-lg
Compact
Reduces spacing.
intentcss generate --prompt "compact sidebar"
intentcss generate --prompt "compact sidebar"
w-48
w-48
Style Modifiers
Glass
Applies glassmorphism styling.
intentcss generate --prompt "glass modal"
intentcss generate --prompt "glass modal"
Output:
backdrop-blur-md bg-white/30 border border-white/20
backdrop-blur-md bg-white/30 border border-white/20
Commonly used with:
- Modal
- Form
- Card
- Sidebar
- Hero
Shadow
Adds stronger elevation.
intentcss generate --prompt "shadow card"
intentcss generate --prompt "shadow card"
Output:
shadow-lg
shadow-lg
Rounded
Increases corner radius.
intentcss generate --prompt "rounded hero"
intentcss generate --prompt "rounded hero"
Output:
rounded-3xl
rounded-3xl
Pill
Creates fully rounded buttons.
intentcss generate --prompt "pill button"
intentcss generate --prompt "pill button"
Output:
rounded-full
rounded-full
Minimal
Creates cleaner layouts with fewer visual effects.
intentcss generate --prompt "minimal login form"
intentcss generate --prompt "minimal login form"
Output:
border border-gray-200
border border-gray-200
Layout Modifiers
Centered
Centers components.
intentcss generate --prompt "centered login form"
intentcss generate --prompt "centered login form"
Output:
mx-auto
mx-auto
Responsive
Adds responsive sizing behavior.
intentcss generate --prompt "responsive form"
intentcss generate --prompt "responsive form"
Output:
w-full max-w-md
w-full max-w-md
Fullscreen
Expands a component to fill the viewport.
intentcss generate --prompt "fullscreen modal"
intentcss generate --prompt "fullscreen modal"
Output:
fixed inset-0
fixed inset-0
Theme Modifiers
Dark
Applies dark-mode styling.
intentcss generate --prompt "dark navbar"
intentcss generate --prompt "dark navbar"
Output:
bg-gray-900 text-white
bg-gray-900 text-white
Context Modifiers
Some modifiers provide additional meaning rather than visual styling.
Login
intentcss generate --prompt "login form"
intentcss generate --prompt "login form"
Used to generate login-specific layouts.
Signup
intentcss generate --prompt "signup form"
intentcss generate --prompt "signup form"
Used to generate registration layouts.
Register
intentcss generate --prompt "register form"
intentcss generate --prompt "register form"
Treated similarly to signup forms.
Combining Modifiers
Multiple modifiers can be used together.
Example:
intentcss generate --prompt "glass shadow rounded sidebar"
intentcss generate --prompt "glass shadow rounded sidebar"
Output:
w-64 min-h-screen backdrop-blur-md bg-white/30 border border-white/20 rounded-2xl shadow-lg
w-64 min-h-screen backdrop-blur-md bg-white/30 border border-white/20 rounded-2xl shadow-lg
Another example:
intentcss generate --prompt "large red shadow button"
intentcss generate --prompt "large red shadow button"
Output:
rounded-lg bg-red-600 px-6 py-3 text-lg text-white shadow-lg hover:bg-red-700
rounded-lg bg-red-600 px-6 py-3 text-lg text-white shadow-lg hover:bg-red-700
Modifier Support
Not every modifier applies to every intent.
For example:
| Modifier | Button | Card | Form | Modal | Sidebar |
|---|---|---|---|---|---|
| Glass | ❌ | ✅ | ✅ | ✅ | ✅ |
| Shadow | ✅ | ✅ | ✅ | ✅ | ✅ |
| Large | ✅ | ✅ | ✅ | ✅ | ❌ |
| Responsive | ❌ | ❌ | ✅ | ❌ | ❌ |
| Fullscreen | ❌ | ❌ | ❌ | ✅ | ❌ |
IntentCSS automatically ignores unsupported modifier combinations.
Future Modifiers
Planned modifiers include:
- outlined
- gradient
- animated
- floating
- sticky
- fixed
- bordered
- blurred
- transparent
- elevated
These may be introduced in future releases.
Next Steps
Continue with:
- CLI Reference
- Generate Command
- Explain Command
- Architecture