Propiedades de Text y TextField

Referencia completa para Jetpack Compose

馃摑 Componente Text

Propiedad Tipo Descripci贸n Ejemplo
text String Texto a mostrar text = "Hola"
fontSize TextUnit Tama帽o de la fuente fontSize = 20.sp
fontWeight FontWeight Grosor del texto fontWeight = Bold
fontStyle FontStyle Estilo (normal o it谩lica) fontStyle = Italic
color Color Color del texto color = Color.Red
textAlign TextAlign Alineaci贸n del texto textAlign = Center
lineHeight TextUnit Altura entre l铆neas lineHeight = 24.sp
maxLines Int N煤mero m谩ximo de l铆neas maxLines = 2
overflow TextOverflow Comportamiento del desbordamiento overflow = Ellipsis
letterSpacing TextUnit Espaciado entre letras letterSpacing = 0.5.sp
textDecoration TextDecoration Decoraci贸n (underline, lineThrough) textDecoration = Underline

鉁忥笍 Componente TextField

Propiedad Tipo Descripci贸n Ejemplo
value String Valor actual del campo value = text
onValueChange Lambda Callback al cambiar el texto onValueChange = { text = it }
label @Composable Etiqueta descriptiva label = { Text("Nombre") }
placeholder @Composable Texto de ayuda cuando est谩 vac铆o placeholder = { Text("Escribe...") }
leadingIcon @Composable Icono al inicio del campo leadingIcon = { Icon(...) }
trailingIcon @Composable Icono al final del campo trailingIcon = { Icon(...) }
singleLine Boolean Limita a una sola l铆nea singleLine = true
maxLines Int N煤mero m谩ximo de l铆neas maxLines = 3
enabled Boolean Habilita o deshabilita el campo enabled = true
readOnly Boolean Campo de solo lectura readOnly = false
keyboardOptions KeyboardOptions Opciones del teclado (tipo, acci贸n) keyboardOptions = KeyboardOptions(keyboardType = Number)
keyboardActions KeyboardActions Acciones del teclado keyboardActions = KeyboardActions(onDone = {...})
visualTransformation VisualTransformation Transformaci贸n visual (ej: password) visualTransformation = PasswordVisualTransformation()
isError Boolean Indica estado de error isError = false
colors TextFieldColors Colores personalizados colors = TextFieldDefaults.colors(...)

馃敡 Modifiers Comunes

Modifier Descripci贸n Ejemplo
padding A帽ade espacio interno .padding(16.dp)
fillMaxWidth Ocupa todo el ancho disponible .fillMaxWidth()
width Define ancho espec铆fico .width(200.dp)
height Define altura espec铆fica .height(56.dp)
background Color de fondo .background(Color.White)
border A帽ade borde .border(2.dp, Color.Gray)
clip Recorta con forma espec铆fica .clip(RoundedCornerShape(8.dp))
clickable Hace el elemento clickeable .clickable { /* acci贸n */ }
alpha Transparencia .alpha(0.5f)
shadow A帽ade sombra .shadow(4.dp)