# Configuration

Here are some properties you can pass to the widget:

| Property             | Description                                                                                                                                                                                                        |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| mode                 | Specifies whether it is `register`(default), `login`, `logout` or `manage`. Modes are described under [Modes](/docs/front-end/modes.md) page                                                                       |
| project-id           | Your project ID                                                                                                                                                                                                    |
| copy                 | Overrides default copy                                                                                                                                                                                             |
| email                | User's email                                                                                                                                                                                                       |
| email-input-id       | Id of an input the widget needs to get email value from                                                                                                                                                            |
| text                 | Text for the widget button                                                                                                                                                                                         |
| hide-success-screens | Boolean showing or hiding success screens after registration flow completed                                                                                                                                        |
| type                 | If `submit` is passed the widget logic will be attached to a parent form submit method, used for accessibility if you have inputs for email, etc                                                                   |
| kind                 | Button look                                                                                                                                                                                                        |
| rank                 | Button look                                                                                                                                                                                                        |
| size                 | Button look                                                                                                                                                                                                        |
| button-only          | Hides the widget button container                                                                                                                                                                                  |
| button-class         | Class string applied to the widget button                                                                                                                                                                          |
| container-class      | Class string applied to the button container, omitted if `button-only` is used                                                                                                                                     |
| button-ref           | Ref of the widget button html element                                                                                                                                                                              |
| container-ref        | Ref of the widget button container html element, omitted if `button-only` is used                                                                                                                                  |
| lang                 | Widget will automatically read language value from `lang` attribute on `html` tag or any other parent tag, or it can be passed to the widget component itself. Currently supported languages are: `en`, `pl`, `lt` |

You can also pass following callbacks (See [Examples](/docs/front-end/examples/react.md#custom-integration-example-based-on-react-framework)):

| Callback   | Description                                                                                           |
| ---------- | ----------------------------------------------------------------------------------------------------- |
| onValidate | Callback that allows authentication process if returned true                                          |
| onSuccess  | Called when authentication has been successful, gets tokenId as argument, can be used for redirection |
| onFail     | Called when authentication fails and gets an error as an argument, can be used for redirection        |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.authopia.io/docs/front-end/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
