# Sign Message

URL: https://docs.blux.cc/react/usage/sign-message

Request a signed message from the user's wallet using the Blux SDK.

Use `signMessage` from the `useBlux` hook to request a message signature from the connected user's wallet. This is useful for verifying ownership of an account without submitting a transaction.

## Import
```tsx
```

## Usage
```tsx

function SignButton() {
  const { signMessage } = useBlux();

  const handleSign = async () => {
    try {
      const signature = await signMessage("Hello from Blux!");
      console.log("Signature:", signature);
    } catch (error) {
      console.error("Signing failed:", error);
    }
  };

  return <button onClick={handleSign}>Sign Message</button>;
}
```

## Screenshots

![Sign Message modal](/img/SignMessage.png)