Usage

Focus a field from an action

tsx
import { Button, ref, TextField, VStack } from 'kuito';

function Search() {
  const field = ref();

  return (
    <VStack gap={8}>
      <TextField ref={field} placeholder="Search" />
      <Button onPress={() => field.current?.focus()}>Search</Button>
    </VStack>
  );
}

Signatures

ts
<T extends ElementHandle = ElementHandle>(name?: string): ElementRef<T>

Type parameters

NameConstraintDefault
TElementHandleElementHandle

Parameters

NameTypeRequiredDescription
namestringNo—

Returns

ElementRef<T>

Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.