> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lucidworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# widget:login-form

export const LwTemplate = ({title = "Key questions to get you started", icon = "sparkles", cta = "Powered by Agent Studio", linkHref = "https://lucidworks.com/demo/?utm_source=docs&utm_medium=referral&utm_campaign=docs_cta_ai"}) => {
  const [isLoaded, setIsLoaded] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      setIsLoaded(true);
    }, 500);
    return () => clearTimeout(timer);
  }, []);
  return <div className="lw-template-container">
      <Card title={title} icon={icon}>
        {isLoaded && <span dangerouslySetInnerHTML={{
    __html: `<lw-template id="a029c1a9-28be-427e-b0e1-5d918920246a"></lw-template
            >`
  }} />}
        <Link href={linkHref} className="agent-studio-link text-left text-gray-600 gap-2 dark:text-gray-400 text-sm font-medium flex flex-row items-center hover:text-primary dark:hover:text-primary-light group-hover:text-primary group-hover:dark:text-primary-light">Powered by Lucidworks Agent Studio</Link>
      </Card>
    </div>;
};

[localhost link]: http://localhost:3000/docs/5/app-studio/reference/tags/lightning.directive.widgetLoginForm

[mintlify link]: https://doc.lucidworks.com/docs/5/app-studio/reference/tags/lightning.directive.widgetLoginForm

[old doc.lw link]: https://doc.lucidworks.com/app-studio/4.2/1195

<LwTemplate />

## Description

Creates a login form

## Usage

as element:

```xml wrap  expandable  theme={"dark"}
<widget:login-form
       [logo="{string}"]
       [logo-alt="{string}"]
       [title="{string}"]
       [message="{string}"]
       [action="{string}"]
       [method="{string}"]
       [username="{string}"]
       [password="{string}"]
       [username-placeholder="{string}"]
       [password-placeholder="{string}"]
       [remember="{string}"]
       [submit-label="{string}"]
       [access-denied="{string}"]
       [error-message="{string}"]
       [reset-link="{string}"]
       [create-link="{string}"]
       [username-error-message="{string}"]
       [password-error-message="{string}"]>
</widget:login-form>
```

#### Parameters

| Param | Type | Details |
| - | - | - |
| logo  *(optional)* | **string** | The path to the logo |
| logo-alt  *(optional)* | **string** | The alt text for the logo |
| title  *(optional)* | **string** | The title text that displays below the logo |
| message  *(optional)* | **string** | The message to display below the title |
| action  *(optional)* | **string** | URL to send the form data to |
| method  *(optional)* | **string** | The form method to use. Default POST |
| username  *(optional)* | **string** | The name of the username input |
| password  *(optional)* | **string** | The name of the password input |
| username-placeholder  *(optional)* | **string** | The placeholder of the username input |
| password-placeholder  *(optional)* | **string** | The placeholder of the password input |
| remember  *(optional)* | **string** | The name of the remember input. Set to false to hide remember me checkbox  *(default: "remember")* |
| submit-label  *(optional)* | **string** | The text on the submit button.  *(default: "Login")* |
| access-denied  *(optional)* | **string** | Checks the URL for the value of access-denied, if found the error message will be displayed E.g. access=denied |
| error-message  *(optional)* | **string** | The error message to display when the login is rejected.  *(default: "Invalid username or password")* |
| reset-link  *(optional)* | **string** | Provide a link to reset the user’s password |
| create-link  *(optional)* | **string** | Provide a link to for a user to request an account |
| username-error-message  *(optional)* | **string** | Message to display if the username is not entered or valid.  *(default: "This field is required.")* |
| password-error-message  *(optional)* | **string** | Message to display if the password is not entered or valid.  *(default: "This field is required.")* |

## Example

#### Source

```xml wrap  theme={"dark"}
<widget:login-form></widget:login-form>
```

#### Result

<img src="https://mintcdn.com/lucidworks/J_LymSfRoWq3UOvg/assets/images/app-studio/as-examples/tags/widgetLoginForm.png?fit=max&auto=format&n=J_LymSfRoWq3UOvg&q=85&s=0053d87d7ba9273267f336d9aedd473f" alt="Result" width="1024" height="361" data-path="assets/images/app-studio/as-examples/tags/widgetLoginForm.png" />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.