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

# Widget Sharing

> Share helpers publicly with widget links, embeds, QR codes, and advanced access controls

Widget sharing lets you create public or semi-public access to your helpers. Perfect for dashboards, team kiosks, customer feedback forms, or embedded content on external sites.

## Creating a Widget Share

<Steps>
  <Step title="Open Share Dialog">
    Click the share icon on any helper, then select the **Widget** tab.
  </Step>

  <Step title="Configure Options">
    Set permissions, security, appearance, and expiration settings.
  </Step>

  <Step title="Generate Widget Link">
    Click "Generate Widget Link" to create your unique share URL.
  </Step>

  <Step title="Share or Embed">
    Copy the widget link, embed code, or download QR codes.
  </Step>
</Steps>

## Access Methods

<CardGroup cols={2}>
  <Card title="Widget Link" icon="link">
    Direct URL at `/w/:slug` that opens a focused view of your helper.
  </Card>

  <Card title="Embed Code" icon="code">
    iframe HTML for embedding in websites, Notion, or other platforms.
  </Card>

  <Card title="QR Codes" icon="qrcode">
    Branded, downloadable QR codes for physical displays or printed materials.
  </Card>

  <Card title="Telegram Deep Link" icon="paper-plane">
    Opens the helper directly in the Telegram Mini App.
  </Card>
</CardGroup>

## Security Options

### Password Protection

Add a password to restrict access to your widget:

<Steps>
  <Step title="Enable Password">
    Toggle on "Require password" in the widget options.
  </Step>

  <Step title="Set Password">
    Enter a password that visitors must provide to access the widget.
  </Step>

  <Step title="Share Separately">
    Share the password through a separate, secure channel (not in the same message as the link).
  </Step>
</Steps>

When password protection is enabled:

* Visitors see a lock screen before accessing content
* Password is verified before showing any data
* Failed attempts are logged for security

<Tip>
  Use password protection for sensitive data like financial trackers or internal team dashboards.
</Tip>

### Anonymous Viewing

Control whether visitors can view without signing in:

* **Enabled**: Anyone with the link can view (subject to password if set)
* **Disabled**: Visitors must sign in with a Peanuts account

## Custom Slugs

Create human-readable URLs instead of random tokens:

```
Default:   https://peanutsapp.com/w/a1b2c3d4
Custom:    https://peanutsapp.com/w/my-expense-tracker
```

### Creating a Custom Slug

1. Enter your desired slug in the "Custom URL" field
2. Use lowercase letters, numbers, and hyphens only
3. Availability is checked in real-time
4. Click generate to confirm

<Info>
  Custom slugs must be unique across all Peanuts widgets. Common words may already be taken.
</Info>

## Expiration Controls

Set when the widget link should expire:

| Option          | Behavior                           |
| --------------- | ---------------------------------- |
| **Never**       | Link remains active indefinitely   |
| **7 days**      | Expires one week from creation     |
| **30 days**     | Expires one month from creation    |
| **90 days**     | Expires three months from creation |
| **Custom date** | Pick a specific expiration date    |

### What Happens When Expired

* The widget link stops working
* Visitors see an "Access expired" message
* Embed iframes show an expiration notice
* QR codes lead to the expired page
* You can create a new widget share anytime

## Appearance Options

Customize how the widget looks:

### Show/Hide Header

* **Enabled**: Shows helper name, icon, and branding
* **Disabled**: Minimal view, content only

### Show/Hide Entry Form

* **Enabled**: Visitors can add new entries (if permitted)
* **Disabled**: View-only, no entry form shown

<Tip>
  Hide the entry form for dashboard displays, and show it for feedback collection or data input kiosks.
</Tip>

## Permission Levels

Choose what visitors can do:

| Permission      | View | Add | Edit     | Delete |
| --------------- | ---- | --- | -------- | ------ |
| **Viewer**      | ✓    | ✗   | ✗        | ✗      |
| **Contributor** | ✓    | ✓   | Own only | ✗      |
| **Editor**      | ✓    | ✓   | ✓        | ✓      |

## Widget Link

The widget link follows this format:

```
https://peanutsapp.com/w/{token-or-custom-slug}
```

Share this link anywhere. Visitors see a streamlined view with only the helper content and permitted actions.

## Embedding in Websites

Copy the embed code from the Widget tab:

```html theme={null}
<iframe 
  src="https://peanutsapp.com/embed/{token}"
  width="100%" 
  height="600"
  frameborder="0"
></iframe>
```

The embed view fires postMessage events for integration:

* `embed:ready` when the iframe loads
* `embed:loaded` when helper data is fetched
* `embed:resize` with height updates for responsive containers

## QR Codes

### Branded QR Codes

Widget QR codes are branded with your helper's theme color:

* Color matches your helper's accent color
* Optional logo overlay for branding
* Clean, scannable design

### Download Options

Choose your QR code size:

* **Small** (256px) - Business cards, receipts
* **Medium** (512px) - Flyers, posters
* **Large** (1024px) - Banners, signage

### QR Code Types

Two QR codes are available:

1. **Widget Link QR** - Opens the web widget
2. **Telegram QR** - Opens in Telegram Mini App (if configured)

<Steps>
  <Step title="Expand QR Code Section">
    Click the QR code accordion in the Widget tab.
  </Step>

  <Step title="Choose QR Type">
    Select between widget link QR or Telegram deep link QR.
  </Step>

  <Step title="Select Size">
    Choose small, medium, or large download size.
  </Step>

  <Step title="Download">
    Click download to save as PNG.
  </Step>
</Steps>

## Telegram Deep Links

Widget shares generate Telegram deep links:

```
https://t.me/YourBotName?startapp=share_{token}
```

When opened, the Telegram Mini App loads the shared helper with the same permissions as the widget link.

## Managing Widgets

### Viewing Active Shares

1. Open the Share dialog
2. Go to "Manage Shares" section
3. See all active widget shares with their settings

### Revoking Access

To disable a widget share:

1. Open the Share dialog for the helper
2. Find the widget in "Manage Shares"
3. Click "Revoke" to immediately disable

The widget link stops working instantly. Any embedded iframes show an error message.

## Use Cases

<AccordionGroup>
  <Accordion title="Public Dashboard">
    Share a read-only widget link for a status board or metrics display that updates in real-time. Use "Viewer" permission with header hidden.
  </Accordion>

  <Accordion title="Team Kiosk">
    Set up a tablet with the widget link for team members to log entries without individual accounts. Enable "Contributor" permission with the entry form shown.
  </Accordion>

  <Accordion title="Customer Feedback Form">
    Embed a widget with "Contributor" permission on your website. Add password protection for internal feedback. Hide the header for a cleaner look.
  </Accordion>

  <Accordion title="Event Registration">
    Print QR codes linking to an event helper. Set expiration for after the event. Use custom slug like "conference-2025".
  </Accordion>

  <Accordion title="Shared Family Tracker">
    Create a widget for shared household expenses. Use password protection so only family members can access. Set to never expire.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Sharing & Collaboration" icon="users" href="/core-concepts/sharing">
    Learn about private sharing with specific people
  </Card>

  <Card title="Telegram Integration" icon="paper-plane" href="/integrations/telegram">
    Set up your Telegram bot for widget deep links
  </Card>
</CardGroup>
