### jelly-textarea Examples
Source: https://jelly-ui.com/api/index.html
Examples demonstrating the usage of the jelly-textarea component for various scenarios, including auto-growing, capped height, and RTL support.
```APIDOC
## jelly-textarea Examples
#### Auto-growing notes field
```html
```
#### Capped height with a custom max
```html
```
#### RTL textarea (caret ripple mirrors)
```html
```
```
--------------------------------
### Basic jelly-radio-group Example
Source: https://jelly-ui.com/api/index.html
Demonstrates a simple jelly-radio-group with a label and multiple jelly-radio options. Ensure jelly-radio is imported and available in the scope.
```html
FreeProTeam
```
--------------------------------
### Basic jelly-segmented Example
Source: https://jelly-ui.com/api/index.html
Demonstrates a basic jelly-segmented component with three options: Day, Week, and Month. The 'week' option is pre-selected.
```html
DayWeekMonth
```
--------------------------------
### jelly-collapsible Component Usage
Source: https://jelly-ui.com/api
Example of how to use the jelly-collapsible component in HTML, demonstrating how to set attributes and use slots.
```APIDOC
## jelly-collapsible Component
A bouncy disclosure section: a header button springs its panel open and closed.
### Attributes
Name| Type| Default| Description
---|---|---|---
`open`| boolean| ``| The expanded state (reflected).
`size`| "small"|"medium"|"large"| `medium`| Density scale.
### Properties
Name| Type| Description
---|---|---
`open`| boolean| Get or set the expanded state.
### Methods
Signature| Description
---|---
`toggle(force?)`| Flips (or forces) the open state; fires toggle only on a real change.
`focus(options?)`| Focuses the header button.
### Events
Event| detail| Description
---|---|---
`toggle`| -| Fires once per open/close change.
### Slots
Slot| Description
---|---
`header`| The header label.
`(default)`| The collapsible content.
### CSS custom properties
Property| Default| Description
---|---|---
`--jelly-collapsible-padding-block`| `13px`| Header vertical padding.
`--jelly-collapsible-padding-inline`| `14px`| Header horizontal padding.
`--jelly-collapsible-radius`| `12px`| Header corner radius.
### Shadow parts
Part| Description
---|---
`header`| The header button.
### Keyboard
Keys| Action
---|---
`Enter / Space`| Toggles the section.
### Example Usage
```html
What moves?
The surface, not the text.
```
```
--------------------------------
### RTL field (ripples follow the caret)
Source: https://jelly-ui.com/api
Example demonstrating jelly-input in a Right-To-Left context.
```APIDOC
## RTL field (ripples follow the caret)
### Description
Example demonstrating jelly-input in a Right-To-Left context.
### Request Example
```html
```
```
--------------------------------
### Basic Jelly Select with Event Listener
Source: https://jelly-ui.com/api/index.html
Demonstrates how to use the jelly-select component with options and listen for the 'change' event to get the selected value.
```html
FreeProTeam (coming soon)
```
--------------------------------
### Jelly Alert Examples
Source: https://jelly-ui.com/api/index.html
Demonstrates the usage of the jelly-alert component with different tones and dismissibility. The first line of content acts as a title.
```html
Saved! Your changes are live.Something broke.
```
--------------------------------
### Jelly Segmented Control Example
Source: https://jelly-ui.com/api/index.html
Defines a jelly-segmented control with two jelly-segment options, one of which is initially selected.
```html
OnOff
```
--------------------------------
### Basic Tooltip Example
Source: https://jelly-ui.com/
This snippet demonstrates how to use the component with an embedded jelly-icon-button. The tooltip appears on hover or focus.
```html
```
--------------------------------
### Basic Jelly Buttons
Source: https://jelly-ui.com/api/index.html
Demonstrates the creation of basic jelly buttons with different variants and sizes. Includes a disabled button example.
```html
Create accountDeleteUnavailable
```
--------------------------------
### Jelly Tabs with Tab Panels Example
Source: https://jelly-ui.com/api/index.html
Implement tabbed navigation using and . The component manages the active state and provides keyboard navigation. Each should have a unique 'label' attribute that corresponds to a tab.
```html
Project summary.Recent events.
```
--------------------------------
### Jelly Popover Example
Source: https://jelly-ui.com/api/index.html
A jelly-popover triggered by a jelly-button, with custom content. Use this for non-modal, click-triggered floating panels.
```html
Options
Anything can live here.
```
--------------------------------
### Jelly Theme with Card and Controls
Source: https://jelly-ui.com/
Demonstrates the use of the jelly-theme component to scope design tokens and provides an example of a card containing various interactive controls like sliders, progress bars, checkboxes, and switches.
```html
Workspace controlsPreview the scoped theme
SyncNotifications
```
--------------------------------
### Basic Jelly Menu with Button Trigger
Source: https://jelly-ui.com/api/index.html
This example demonstrates a basic jelly-menu with a jelly-button as its trigger. The menu contains several jelly-menu-item elements, including a danger-styled item for destructive actions. Items are dynamically re-read on open, ensuring additions are always visible.
```html
ActionsEditDuplicateDelete
```
--------------------------------
### Jelly Menu Item Example
Source: https://jelly-ui.com/api/index.html
A jelly-menu-item with a value and danger styling. Use this for declarative menu entries with destructive actions.
```html
Delete
```
--------------------------------
### Jelly Skeleton Placeholder Examples
Source: https://jelly-ui.com/api/index.html
Use the `shape` attribute to define the placeholder's form. Inline styles can override preset sizes.
```html
```
```html
```
--------------------------------
### jelly-segmented Basic Usage
Source: https://jelly-ui.com/api/index.html
Provides an example of how to use jelly-segment components within a jelly-segmented parent to create a selection control.
```APIDOC
## jelly-segmented Basic Usage
### Description
Demonstrates the structure for creating a segmented control using `jelly-segmented` and `jelly-segment`.
### Endpoint
N/A (Web Component Usage)
### Request Example
```html
OnOff
```
```
--------------------------------
### Jelly Tab Panel Example
Source: https://jelly-ui.com/api/index.html
Use this component to create a single tab panel within a component. It displays content when its corresponding tab is active. Ensure it has a 'label' attribute for accessibility and identification.
```html
…
```
--------------------------------
### Basic Usage
Source: https://jelly-ui.com/api
Demonstrates the basic implementation of the jelly-switch component with its default settings.
```APIDOC
## jelly-switch
### Description
A draggable jelly switch: a capsule track whose thumb stretches like a liquid drop and whose color crossfades between off and on.
### Attributes
- `checked` (boolean) - `false` - Whether the switch is on. Reflected; updated by taps, drags and keyboard toggles.
- `label` (string) - `` - Explicit accessible name mapped to the inner input's aria-label; overrides the slotted text for assistive technology.
- `size` (string) - `medium` - Track geometry: 50x28 / 62x34 / 74x40 px. The sm / md / lg aliases are accepted.
- `value` (string) - `on` - The form value submitted while on (nothing is submitted when off).
- `name` (string) - `` - Form field name used on submission (native form association through ElementInternals).
- `variant` (string) - `theme accent` - The "on" track hue, resolved through theme tokens. Explicit variants also pair the thumb foreground with the variant's on-color.
### Properties
- `checked` (boolean) - Gets/sets the on state (reflects the attribute).
- `value` (string) - Gets/sets the submitted form value; defaults to "on".
### Methods
- `focus(options?: FocusOptions): void` - Moves focus to the hidden native input.
### Events
- `change` - Fired when a user interaction (tap, drag release, or Space/Enter) actually changes the state. Composed and bubbling; not fired for programmatic changes or drags that settle back.
### Slots
- `(default)` - The visible label text next to the track.
### Example
```html
Wi-Fi
```
```
--------------------------------
### Basic Icon Buttons with Fluent Icons
Source: https://jelly-ui.com/api/index.html
Demonstrates how to create and populate icon buttons using built-in Fluent icons. Ensure the jellyIcon function is imported.
```html
```
--------------------------------
### Invite code without autofill
Source: https://jelly-ui.com/api
Example of configuring jelly-input to disable autofill features.
```APIDOC
## Invite code without autofill
### Description
Example of configuring jelly-input to disable autofill features.
### Request Example
```html
```
```
--------------------------------
### Email field in a form
Source: https://jelly-ui.com/api/index.html
Example of how to use the jelly-input component for an email field within a form.
```APIDOC
## Email field in a form
### Request Example
```html
```
```
--------------------------------
### Sizes and Variants
Source: https://jelly-ui.com/api/index.html
Demonstrates how to set the size and color variant of the jelly-switch.
```APIDOC
## jelly-switch
### Description
A draggable jelly switch: a capsule track whose thumb stretches like a liquid drop and whose color crossfades between off and on.
### Attributes
- `size` (string) - `medium` - Track geometry: 50x28 / 62x34 / 74x40 px. The sm / md / lg aliases are accepted.
- `variant` (string) - `theme accent` - The "on" track hue, resolved through theme tokens. Explicit variants also pair the thumb foreground with the variant's on-color.
### Example
```html
BluetoothDo not disturb
```
```
--------------------------------
### Invite code without autofill
Source: https://jelly-ui.com/api/index.html
Example demonstrating how to disable autofill for an invite code input using the `no-autofill` attribute.
```APIDOC
## Invite code without autofill
### Request Example
```html
```
```
--------------------------------
### RTL Mirroring and Change Events
Source: https://jelly-ui.com/api/index.html
Shows how the switch behaves in an RTL layout and how to listen for the `change` event.
```APIDOC
## jelly-switch
### Description
A draggable jelly switch: a capsule track whose thumb stretches like a liquid drop and whose color crossfades between off and on.
### Attributes
- `checked` (boolean) - `false` - Whether the switch is on. Reflected; updated by taps, drags and keyboard toggles.
### Events
- `change` (null) - Fired when a user interaction (tap, drag release, or Space/Enter) actually changes the state. Composed and bubbling; not fired for programmatic changes or drags that settle back.
### Example
```html
الإشعارات
```
```
--------------------------------
### Jelly Range Sizes and Variants
Source: https://jelly-ui.com/api/index.html
Shows how to configure jelly-range with different variants (mint, rose) and sizes (large, small), along with step increments.
```html
```
--------------------------------
### Basic jelly-tooltip Usage
Source: https://jelly-ui.com/api/index.html
Demonstrates how to use the jelly-tooltip component with a jelly-icon-button. The tooltip text is set via the 'text' attribute and its placement is configured.
```html
```
--------------------------------
### Open Jelly Drawer
Source: https://jelly-ui.com/api/index.html
Demonstrates how to open a jelly-drawer using a jelly-button. The drawer opens when the button is clicked, setting its `open` property to true.
```html
Open drawer
Drawer
I float in from the inline-end.
```
--------------------------------
### RTL field (ripples follow the caret)
Source: https://jelly-ui.com/api/index.html
Example showcasing an RTL (Right-to-Left) input field where ripples correctly follow the caret direction.
```APIDOC
## RTL field (ripples follow the caret)
### Request Example
```html
```
```
--------------------------------
### Size Propagation in jelly-radio-group
Source: https://jelly-ui.com/api/index.html
Illustrates how the 'size' attribute on jelly-radio-group propagates to child jelly-radio elements that do not have their own size defined. This example shows 'small' and 'large' sizes.
```html
AlphaBetaAlphaBeta
```
--------------------------------
### Scoped Dark Mode with jelly-theme
Source: https://jelly-ui.com/api/index.html
Use the jelly-theme component to apply a dark mode to its subtree. This example shows a jelly-card with a jelly-button inside a dark-themed subtree.
```html
Dark-token subtree
```
--------------------------------
### Full-Width Jelly Button
Source: https://jelly-ui.com/api/index.html
Illustrates how to make a jelly button occupy the full width of its container by using the 'block' attribute. The example is constrained within a div for demonstration.
```html
Continue
```
--------------------------------
### Jelly Skeleton Placeholder with Custom Size
Source: https://jelly-ui.com/api
Demonstrates using jelly-skeleton for a line-shaped placeholder with specified width and height. This is useful for loading content.
```html
```
--------------------------------
### Basic jelly-collapsible Usage
Source: https://jelly-ui.com/api/index.html
Demonstrates how to use the jelly-collapsible component with the 'open' attribute set. The content within the 'header' slot defines the collapsible header, and the default slot contains the collapsible content.
```html
What moves?
The surface, not the text.
```
--------------------------------
### Custom Accent with jelly-theme
Source: https://jelly-ui.com/api/index.html
Apply a custom accent color to a subtree using the jelly-theme component. This example sets the mode to 'auto' and specifies a hex color for the accent, applied to a jelly-slider.
```html
```
--------------------------------
### Listening for Radio Button Selection Changes
Source: https://jelly-ui.com/api/index.html
Shows how to attach an event listener to a group of radio buttons to detect when a new option is selected. The example logs the value of the selected radio button to the console.
```html
MintRose
```
--------------------------------
### jelly-range Sizes and Variants
Source: https://jelly-ui.com/api/index.html
Illustrates how to configure different sizes and visual variants for the jelly-range component.
```APIDOC
## jelly-range Sizes and Variants
### Description
Demonstrates the usage of `variant` and `size` attributes for customizing the jelly-range component.
### Endpoint
N/A (Web Component Usage)
### Parameters
#### Attributes
- **label** (string) - Required - The label for the range.
- **variant** (string) - Optional - The visual style of the range (e.g., 'mint', 'rose').
- **size** (string) - Optional - The size of the range (e.g., 'large', 'small').
- **step** (number) - Optional - The increment step for the range values.
- **low** (number) - Required - The initial lower bound of the selected range.
- **high** (number) - Required - The initial upper bound of the selected range.
### Request Example
```html
```
```
--------------------------------
### Slider in a Form with Event Listener
Source: https://jelly-ui.com/api/index.html
Shows how to integrate the jelly-slider into an HTML form using the 'name' attribute for form submission. It also includes a JavaScript example to listen for the 'change' event, which fires when the value is committed.
```html
```
--------------------------------
### Basic Usage
Source: https://jelly-ui.com/api/index.html
A simple jelly-switch with a label. The `checked` attribute sets the initial state to 'on'.
```APIDOC
## jelly-switch
### Description
A draggable jelly switch: a capsule track whose thumb stretches like a liquid drop and whose color crossfades between off and on.
### Attributes
- `checked` (boolean) - `false` - Whether the switch is on. Reflected; updated by taps, drags and keyboard toggles.
- `label` (string) - `` - Explicit accessible name mapped to the inner input's aria-label; overrides the slotted text for assistive technology.
### Example
```html
Wi-Fi
```
```
--------------------------------
### Basic Usage
Source: https://jelly-ui.com/api/index.html
This snippet shows the basic implementation of the jelly-otp component with a default length of 6 digits.
```APIDOC
## jelly-otp
A one-time-code input: one box per digit with typing, backspace, arrow and paste handling.
### Description
A component for inputting one-time codes, with features like individual digit boxes, keyboard navigation, and paste handling.
### Attributes
- `length` (number, default: `6`): How many digit boxes to render.
- `size` ("small"|"medium"|"large", default: `medium`): Box density scale.
- `variant` ("white"|"rose"|"amber"|"azure"|"mint"|"platinum"|"graphite", default: `(theme accent)`): Caret and focus accent hue.
- `disabled` (boolean, default: `false`): Disables every box.
- `label` (string, default: `One-time code`): Accessible name for the digit group.
- `name` (string, default: ``): Form field name used on submission.
### Properties
- `value` (string): Get or set the joined code across all boxes.
### Methods
- `focus(options?)`: Focuses the first box.
### Events
- `input`: Fires on every digit change.
- `change`: Fires when the code reaches full length.
- `complete` ({ value }): Fires when every box is filled, carrying the value.
### CSS custom properties
- `--jelly-otp-width`: Box width.
- `--jelly-otp-height`: Box height.
- `--jelly-otp-gap`: Gap between boxes.
- `--jelly-otp-font-size`: Digit font size.
- `--jelly-otp-radius`: Box corner radius.
- `--jelly-otp-accent`: Caret color.
- `--jelly-ring`: Focus border and outline color.
### Keyboard
- `0–9`: Fills the box and hops to the next.
- `Backspace`: Clears; on an empty box, hops back.
- `Arrow Left / Right`: Move between boxes.
- `Paste`: Distributes pasted digits across the remaining boxes.
### Example
```html
```
```
--------------------------------
### Jelly Select with Sizes and Variants
Source: https://jelly-ui.com/api/index.html
Shows how to customize the appearance of jelly-select components using 'size' and 'variant' attributes.
```html
EuropeUnited StatesLowHigh
```
--------------------------------
### jelly-input Methods
Source: https://jelly-ui.com/api
Enables programmatic control over the jelly-input's focus state.
```APIDOC
## jelly-input Methods
### Description
Enables programmatic control over the jelly-input's focus state.
### Methods
Signature| Description
---|---
`focus(options?: FocusOptions)`| Routes programmatic focus into the inner native input.
```
--------------------------------
### Sizes and Variants
Source: https://jelly-ui.com/api/index.html
Demonstrates different size and variant options for the jelly-slider.
```APIDOC
## jelly-slider
### Description
Customizable jelly-slider with various size and color options.
### Attributes
- `label` (string) - Accessible name for the slider.
- `variant` (string) - Accent hue for the fill and thumb. Accepted values: "white", "rose", "amber", "azure", "mint", "platinum", "graphite". Defaults to theme accent.
- `size` (string) - Size scale of the slider. Accepted values: "small", "medium", "large". Defaults to `medium`.
- `step` (number) - Increment used by keyboard stepping. If missing or non-positive, keyboard steps fall back to 1/100 of the span.
- `value` (number) - Current value of the slider.
### Example
```html
```
```
--------------------------------
### Form Integration and Change Event
Source: https://jelly-ui.com/api/index.html
Shows how to integrate the jelly-slider into a form and listen for the 'change' event.
```APIDOC
## jelly-slider
### Description
Integrate the jelly-slider into a form and handle the 'change' event for committed value updates.
### Attributes
- `name` (string) - Form field name for standard form-associated custom element behavior.
- `label` (string) - Accessible name for the slider.
- `value` (number) - Initial value of the slider.
### Events
- `change` - Fired when a value is committed: on pointer release/cancel after a drag, or after each keyboard step. Composed and bubbling.
### Example
```html
```
```