-
Notifications
You must be signed in to change notification settings - Fork 0
Using Design System
Ali Sadeghi edited this page Jan 6, 2026
·
5 revisions
Auto-activates when: Working in feature/*/ui/ directories, creating Composables, mentions "UI", "screen", "component"
Ensures X-components are used instead of Material3, preventing design drift.
// ❌ Material3 // ✅ X-Components
Scaffold → XScaffold
Button → XButton
OutlinedButton → XOutlinedButton
TextButton → XTextButton
Text → XText
TextField → XTextField
OutlinedTextField → XOutlinedTextField
Card → XCard
Icon → XIcon
IconButton → XIconButton
Switch → XSwitch
Checkbox → XCheckbox
RadioButton → XRadioButton
Divider → XDivider
CircularProgressIndicator → XLoadingIndicator> Create a login form with email, password, and submit buttonAI generates:
@Composable
fun LoginForm(
email: String,
password: String,
onEmailChange: (String) -> Unit,
onPasswordChange: (String) -> Unit,
onSubmit: () -> Unit
) {
Column {
XTextField(
value = email,
onValueChange = onEmailChange,
label = { XText("Email") }
)
XTextField(
value = password,
onValueChange = onPasswordChange,
label = { XText("Password") },
visualTransformation = PasswordVisualTransformation()
)
XButton(
onClick = onSubmit,
text = "Login"
)
}
}> Create a product card component with image, title, price, and add to cart buttonAI generates using XCard, XText, XButton (not Material3 components)
// ✅ Correct
XTheme {
XScaffold { }
}
// ❌ Wrong
MaterialTheme {
Scaffold { }
}Back to Skills