Supported Intents
Intents are the core building blocks of IntentCSS. Every prompt is matched against one of the supported intents before generation occurs.
Overview
An intent represents a UI component or interface pattern.
When a prompt is processed, IntentCSS attempts to identify the most relevant intent and then applies any detected modifiers.
Example:
intentcss generate --prompt "large red button"
intentcss generate --prompt "large red button"
IntentCSS detects:
Intent: button
Modifiers:
- large
- red
Intent: button
Modifiers:
- large
- red
and generates output accordingly.
Available Intents
Current releases of IntentCSS include the following intents.
| Intent | Description |
|---|---|
| Button | Buttons and call-to-action elements |
| Card | Content cards and panels |
| Navbar | Navigation bars and menus |
| Form | Login, signup, and input forms |
| Modal | Dialogs and overlays |
| Sidebar | Application sidebars |
| Hero | Marketing and landing page hero sections |
| Footer | Website footers |
Button
Generate buttons and call-to-action components.
Example:
intentcss generate --prompt "red button"
intentcss generate --prompt "red button"
Output:
rounded-lg bg-red-600 px-4 py-2 text-white hover:bg-red-700
rounded-lg bg-red-600 px-4 py-2 text-white hover:bg-red-700
Supported modifiers:
- red
- blue
- green
- purple
- black
- large
- shadow
- pill
Card
Generate content cards and containers.
Example:
intentcss generate --prompt "shadow card"
intentcss generate --prompt "shadow card"
Output:
rounded-xl bg-white p-6 shadow-lg
rounded-xl bg-white p-6 shadow-lg
Supported modifiers:
- shadow
- glass
- rounded
- dark
- large
Navbar
Generate navigation bars.
Example:
intentcss generate --prompt "dark navbar"
intentcss generate --prompt "dark navbar"
Output:
flex items-center justify-between p-4 bg-gray-900 text-white border-b border-gray-800
flex items-center justify-between p-4 bg-gray-900 text-white border-b border-gray-800
Supported modifiers:
- dark
- glass
- shadow
- centered
Form
Generate forms including login and signup layouts.
Example:
intentcss generate --prompt "glass login form"
intentcss generate --prompt "glass login form"
Output:
flex flex-col gap-4 backdrop-blur-md bg-white/30 border border-white/20 rounded-xl shadow-md p-6 space-y-2
flex flex-col gap-4 backdrop-blur-md bg-white/30 border border-white/20 rounded-xl shadow-md p-6 space-y-2
Supported modifiers:
- login
- signup
- register
- centered
- responsive
- glass
- shadow
- large
- minimal
Modal
Generate dialogs and overlays.
Example:
intentcss generate --prompt "glass centered modal"
intentcss generate --prompt "glass centered modal"
Output:
fixed inset-0 flex items-center justify-center w-full max-w-lg p-6 backdrop-blur-md bg-white/30 border border-white/20 rounded-xl shadow-lg
fixed inset-0 flex items-center justify-center w-full max-w-lg p-6 backdrop-blur-md bg-white/30 border border-white/20 rounded-xl shadow-lg
Supported modifiers:
- glass
- centered
- fullscreen
- large
- shadow
Sidebar
Generate application sidebars.
Example:
intentcss generate --prompt "dark compact sidebar"
intentcss generate --prompt "dark compact sidebar"
Output:
w-48 min-h-screen bg-gray-900 text-white
w-48 min-h-screen bg-gray-900 text-white
Supported modifiers:
- dark
- compact
- glass
- rounded
- shadow
Hero
Generate hero sections for marketing pages.
Example:
intentcss generate --prompt "dark large hero"
intentcss generate --prompt "dark large hero"
Output:
text-center py-32 px-12 bg-gray-900 text-white
text-center py-32 px-12 bg-gray-900 text-white
Supported modifiers:
- dark
- large
- glass
- rounded
- shadow
- centered
Footer
Generate footer sections.
Example:
intentcss generate --prompt "large blue footer"
intentcss generate --prompt "large blue footer"
Output:
p-10 bg-blue-600 text-white shadow-lg
p-10 bg-blue-600 text-white shadow-lg
Supported modifiers:
- dark
- centered
- large
- shadow
- blue
Intent Detection
IntentCSS uses:
- Prompt parsing
- NLP extraction
- Typo correction
- Confidence scoring
to determine the most likely intent.
Example:
intentcss generate --prompt "purpl buton"
intentcss generate --prompt "purpl buton"
Internally becomes:
purple button
purple button
and resolves to:
Intent: button
Intent: button
before generation begins.
Unsupported Prompts
If no supported intent can be detected, IntentCSS will not generate output.
Example:
intentcss generate --prompt "glorp wazzoo"
intentcss generate --prompt "glorp wazzoo"
Output:
Could not confidently understand that prompt.
Try words like: button, card, navbar, blue, responsive.
Could not confidently understand that prompt.
Try words like: button, card, navbar, blue, responsive.
Future Intents
Planned future intents include:
- Pricing Card
- Table
- Dashboard
- Grid
- Alert
- Badge
- Avatar
- Accordion
- Tabs
- Timeline
Additional intents will be added in future releases.
Next Steps
Continue with:
- Modifiers
- CLI Reference
- Generate Command
- Architecture