> ## Documentation Index
> Fetch the complete documentation index at: https://camarauth-docs.camarai.es/llms.txt
> Use this file to discover all available pages before exploring further.

# CountdownOptions

> Opciones de configuracion para useCountdown

# CountdownOptions

Opciones para controlar el temporizador de `useCountdown`.

## Estructura

```typescript theme={null}
interface CountdownOptions {
  seconds: number;
  autoStart?: boolean;
  onExpire?: () => void;
}
```

## Propiedades

### seconds

Tiempo inicial en segundos.

```typescript theme={null}
seconds: number;
```

### autoStart

Inicia el countdown automaticamente al montar el componente.

```typescript theme={null}
autoStart?: boolean;
```

* Default: `false`

### onExpire

Callback que se ejecuta una sola vez cuando llega a `0`.

```typescript theme={null}
onExpire?: () => void;
```

## Ejemplo

```tsx theme={null}
import { useCountdown } from "@camarauth/sdk/react";

function PinTimer() {
  const { formattedTime, isExpired } = useCountdown({
    seconds: 180,
    autoStart: true,
    onExpire: () => console.log("PIN expirado"),
  });

  return <p>{isExpired ? "Expirado" : formattedTime}</p>;
}
```

## Vease tambien

* [useCountdown](/react/hooks/use-countdown)
* [PinAuthState](/react/interfaces/pin-auth-state)
