import 'package:gluestack_ui/gluestack_ui.dart';
GSInput(
size: GSInputSizes.$md,
variant: GSInputVariants.outline,
hintText: "Enter text here",
isDisabled: false,
isInvalid: false,
isReadOnly: false,
style: GSStyle(
width: 300,
),
)
import "package:gluestack_ui/gluestack_ui.dart"
Parameters | Type | Default | Description |
---|---|---|---|
isInvalid | bool | false | When true, the input displays an error state. |
isDisabled | bool | false | When true, the input is disabled and cannot be edited. |
isReadOnly | bool | false | If true, the input value cannot be edited. |
Name | Value | Default |
---|---|---|
size | xl | lg | md | sm | md |
variant | underlined | outline | rounded | outline |
import 'package:gluestack_ui/gluestack_ui.dart';
GSBox(
style: GSStyle(
width: 250,
height: 300,
borderRadius: 8,
borderColor: $GSColors.blueGray300,
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 15),
),
child: GSVStack(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const GSHeading(text: "Login"),
const SizedBox(
height: 20,
),
const GSText(text: 'Email'),
GSInput(
style: GSStyle(
width: 300,
),
),
const SizedBox(
height: 20,
),
const GSText(text: 'Password'),
GSInput(
obscureText: true,
style: GSStyle(
width: 300,
),
),
const SizedBox(
height: 20,
),
GSButton(
style: GSStyle(),
onPressed: () {},
child: const GSButtonText(text: "Save"),
),
],
),
)
import 'package:gluestack_ui/gluestack_ui.dart';
GSBox(
style: GSStyle(
width: 250,
height: 100,
padding: const EdgeInsets.symmetric(horizontal: 15, vertical: 15),
),
child: const GSInput(
prefixIcon: GSIcon(icon: Icons.search),
obscureText: true,
hintText: 'Search...',
),
)