> For the complete documentation index, see [llms.txt](https://anticode.gitbook.io/templates/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://anticode.gitbook.io/templates/plugins/bubble-pattern-lock-plugin.md).

# Bubble - Pattern Lock Plugin

### Overview

This Plugin enables you to add a classical Pattern Lock to your app similar to the lock screen of an Android Smartphone. You can use the Pattern Lock to add an additional layer of user authentication (such as 2FA) and to increase the user experience on smartphones. The correct code that unlocks the Pattern Lock ist stored as a number, where ich number represents the position of a dot in accordance with a normal phone dial. You can also modify the background colour of the Pattern Lock. You can store the pattern for each user as a number within your database assigned to each user, and then check upon login for this code. For a demo of this Plugin please visit: <https://patternlock.bubbleapps.io/>

### Instructions

Drag the "Pattern Lock" Element to your page and place it where you want the pattern lock to appear. Within the element inspector you can define the background color of the pattern lock as well as the code (numerical) that will unlock the Pattern Lock. For example the Code "257" will be a straight line from the middle top to the bottom. If a user enters an incorrect code, the "Incorrect Code" event will be triggered and you can show an alert or a popup for example, informing the user that the code is incorrect. If a correct code is inputted the "Correct Code" event will be triggered and you can redirect the user to a different page, make change to the current user or change the state of an object.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://anticode.gitbook.io/templates/plugins/bubble-pattern-lock-plugin.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
