### Checkbox Group Setup in Svelte
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/checkbox.md
Provides an example of creating a checkbox group using `Checkbox.Group` and `Checkbox.Root` components. It includes basic setup with script and template.
```svelte
Notifications
```
--------------------------------
### Usage Example
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/type-helpers/with-element-ref.md
An example demonstrating how to use the `WithElementRef` type helper in a Svelte component.
```APIDOC
## Usage Example
### Description
This example shows how to integrate the `WithElementRef` type helper into a custom Svelte component to manage the `ref` prop.
### Component: CustomButton.svelte
```svelte
```
### Explanation
- The `Props` type is defined by extending `WithElementRef` with specific component props (`yourPropA`, `yourPropB`) and the desired HTML element type (`HTMLButtonElement`).
- The `ref` prop is then destructured from `Props` and initialized using `$bindable(null)`.
- The `bind:this={ref}` directive on the `` element assigns the button's DOM element to the `ref` variable.
```
--------------------------------
### Svelte Integration Example
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/command.md
Demonstrates how to bind the Command component instance and programmatically update selection using the updateSelectedToIndex method.
```svelte
{
if (e.key === "o") {
jumpToLastItem();
}
}}
/>
```
--------------------------------
### Basic Alert Dialog Implementation
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/alert-dialog.md
A fundamental example showing the structure of an Alert Dialog using the Root, Trigger, Portal, Overlay, and Content sub-components.
```svelte
Open Dialog
Confirm Action
Are you sure?
Cancel
Confirm
```
--------------------------------
### Basic BitsConfig Setup
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/utilities/bits-config.md
Demonstrates how to use BitsConfig at the top level to set default portal targets and locales for all child components. This avoids repetitive prop passing.
```svelte
Open Dialog
Dialog Title
Dialog content here
```
--------------------------------
### Meter Component - Usage Example
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/meter.md
Shows how to use the custom `MyMeter` component in a page.
```APIDOC
## Meter Component - Usage Example
### Description
This snippet demonstrates how to integrate and use the custom `MyMeter` component within a Svelte page, passing necessary props for value, labels, and maximum.
### Method
N/A (Component Usage)
### Endpoint
N/A (Component Usage)
### Parameters
#### Component Props
- **value** (number) - Required - The current value to display.
- **max** (number) - Required - The maximum possible value.
- **label** (string) - Required - The main label for the meter.
- **valueLabel** (string) - Required - The text indicating the current value out of the maximum.
### Request Example
```svelte title="+page.svelte"
```
### Response
N/A (Component Usage)
```
--------------------------------
### Changelog Entry Format Example
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/policies/changelog-conventions.md
Demonstrates the standard format for a changelog entry, including type, scope, and a concise description of the change. This format is used for patch releases.
```markdown
## 1.3.10
### Patch Changes
- fix(Select.Trigger): improve accessibility for screen readers and keyboard navigation
```
```markdown
## 1.3.7
### Patch Changes
- chore(Menubar.Content): simplify internal implementation for maintainability
- fix(Menubar): prevent multiple submenus from opening simultaneously when too close
```
```markdown
## 1.3.6
### Patch Changes
- fix(Calendar): prevent outside days from being focusable when `disableOutsideDays` is `true`
- fix(Range Calendar): prevent outside days from being focusable when `disableOutsideDays` is `true`
- fix(Calendar): ensure default placeholder isn't a disabled date for keyboard navigation
```
--------------------------------
### Using Reusable Dropdown Menu
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/dropdown-menu.md
Example of how to use the custom `MyDropdownMenu` component, passing in a button text and a list of items to populate the dropdown.
```svelte
```
--------------------------------
### Configure Dialog Focus and Scroll Behavior
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/dialog.md
Examples for disabling focus traps, customizing initial focus on open, and managing scroll behavior.
```svelte
{
e.preventDefault();
nameInput?.focus();
}}
>
```
--------------------------------
### Building a Reusable Dialog Component
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/dialog.md
Example of creating a reusable Dialog component with customizable slots for title, description, and content.
```APIDOC
## Building a Reusable Dialog Component
### Description
This example demonstrates how to create a versatile, reusable Dialog component using Bits UI building blocks. This implementation showcases the flexibility of the component API by combining props and snippets.
### Code
```svelte
{buttonText}
{@render title()}
{@render description()}
{@render children?.()}
Close Dialog
```
```
--------------------------------
### Install Bits UI Package
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/getting-started.md
Installs the bits-ui package using npm. This is the first step to integrating Bits UI into your Svelte project.
```bash
npm install bits-ui
```
--------------------------------
### Basic Avatar Setup in Svelte
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/avatar.md
Demonstrates the fundamental usage of the Avatar component by composing its Root, Image, and Fallback primitives. It shows how to provide an image source and alt text, along with fallback content.
```svelte
HB
```
--------------------------------
### Run Svelte Development Server
Source: https://github.com/huntabyte/bits-ui/blob/main/tests/README.md
Commands to start the development server for a Svelte project. Allows for live reloading and testing during development. The -- --open flag automatically opens the app in a new browser tab.
```bash
npm run dev
npm run dev -- --open
```
--------------------------------
### Use Custom Tooltip Component
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/tooltip.md
Example of how to use the custom MyTooltip component in your application. This demonstrates passing a trigger snippet and content.
```svelte
alert("changed to bold!") }}>
{#snippet trigger()}
{/snippet}
Change font to bold
```
--------------------------------
### Manage Value State
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/time-range-field.md
Examples of managing the value state for the time range, demonstrating both automatic synchronization and manual control via function bindings.
```svelte
```
--------------------------------
### Accordion Usage Examples
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/accordion.md
Demonstrates practical implementations of the Accordion component for UI patterns like horizontal cards and multi-step forms.
```APIDOC
## Accordion Implementation Examples
### Horizontal Cards
Use the Accordion component to create a horizontal card layout with collapsible sections.
### Checkout Steps
Use the Accordion component to create a multi-step checkout process where only one section is expanded at a time.
### Usage Example
```svelte
Step 1
Content for step 1
```
```
--------------------------------
### Managing Menubar State
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/menubar.md
Examples of managing the active menu state using simple two-way binding with bind:value or a fully controlled approach using function bindings.
```svelte
```
--------------------------------
### Create a Reusable MySelect Component
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/select.md
Wrap the primitive Select components to create a more convenient API for your application's use cases. This example shows how to create a reusable `MySelect` component that accepts a list of options.
```svelte
up
{#each items as { value, label, disabled } (value)}
{#snippet children({ selected })}
{selected ? "✅" : ""}
{label}
{/snippet}
{/each}
down
```
--------------------------------
### Create Reusable Context Menu Component
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/context-menu.md
Example of creating a reusable Context Menu component that accepts custom props for trigger and items. This component wraps the bits-ui Context Menu for easier integration.
```svelte
{@render trigger()}
Select an Office
{#each items as item}
{item}
{/each}
```
--------------------------------
### Use Custom Accordion Content Component (Svelte)
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/accordion.md
This example shows how to integrate the custom MyAccordionContent component within the Accordion.Root structure. It demonstrates nesting the custom content component inside an Accordion.Item, allowing for custom transition durations.
```svelte
A
```
--------------------------------
### TimeField Fully Controlled Value Binding
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/time-field.md
Demonstrates managing the TimeField's value state externally using Svelte's Function Binding for complete control. This allows custom logic for getting and setting the value. It requires `TimeField` and `TimeValue` from 'bits-ui'. Note: The example uses `DateField.Root` which might be a typo and should likely be `TimeField.Root`.
```svelte
```
--------------------------------
### Creating a Reusable Transition-Enabled Component
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/transitions.md
Shows how to wrap Bits UI components in a custom component to encapsulate the forceMount and transition logic for cleaner usage across an application.
```svelte
{#snippet child({ props, open })}
{#if open}
{@render children?.()}
{/if}
{/snippet}
```
--------------------------------
### Usage Example of Reusable Accordion in Svelte
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/accordion.md
An example of how to use the reusable `MyAccordion` component in a Svelte page. It demonstrates passing an array of items to the `MyAccordion` component to render multiple collapsible sections.
```svelte
```
--------------------------------
### Basic Toggle Implementation
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/toggle.md
Demonstrates the simplest way to import and render the Toggle component using the Root element.
```svelte
```
--------------------------------
### Install @internationalized/date Package
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/dates.md
Installs the @internationalized/date package, which is essential for handling dates and times in Bits UI. This package provides a unified API for date and time manipulation across different locales and time zones.
```bash
npm install @internationalized/date
```
--------------------------------
### Configure Calendar Week Start Day
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/calendar.md
Sets the first day of the week for the calendar. The `weekStartsOn` prop accepts a number from 0 (Sunday) to 6 (Saturday) to enforce a consistent start day across different locales.
```svelte
```
--------------------------------
### Implement Basic Calendar Structure
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/calendar.md
Demonstrates the standard implementation of the Calendar component using the Root, Header, and Grid sub-components to display months and days.
```svelte
{#snippet children({ months, weekdays })}
{#each months as month}
{#each weekdays as day}
{day}
{/each}
{#each month.weeks as weekDates}
{#each weekDates as date}
{/each}
{/each}
{/each}
{/snippet}
```
--------------------------------
### Managing Slider State
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/slider.md
Examples of two-way binding and fully controlled state management for the Slider component.
```svelte
// Two-Way Binding
// Fully Controlled
```
--------------------------------
### Managing Collapsible State
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/collapsible.md
Examples of managing the open state via two-way binding or fully controlled function bindings.
```svelte
(isOpen = true)}>Open Collapsible
```
```svelte
```
--------------------------------
### Apply Svelte Transitions to Menubar
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/menubar.md
Demonstrates using the forceMount prop and the child snippet to apply Svelte transitions like fly to Menubar content.
```svelte
{#snippet child({ wrapperProps, props, open })}
{#if open}
{/if}
{/snippet}
```
--------------------------------
### TimeRange Type Definition
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/src/lib/content/api-reference/extended-types/shared/time-range-prop.md
Defines the structure for a time range object containing optional start and end time values.
```APIDOC
## Type Definition: TimeRange
### Description
The `TimeRange` type represents a temporal range consisting of an optional start time and an optional end time, utilizing the `TimeValue` type from the Bits UI package.
### Structure
- **start** (TimeValue | undefined) - The beginning of the time range.
- **end** (TimeValue | undefined) - The conclusion of the time range.
### Usage Example
```typescript
import type { TimeRange } from "bits-ui";
const myRange: TimeRange = {
start: new Time(9, 0),
end: new Time(17, 0)
};
```
```
--------------------------------
### Using Custom Switch Component (Svelte)
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/switch.md
Illustrates how to integrate and use the custom 'MySwitch' component within an application. It demonstrates binding the 'checked' state to a local variable and setting a descriptive label.
```svelte
```
--------------------------------
### Manage Rating State
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/rating-group.md
Provides examples for managing component state using two-way binding or fully controlled function bindings.
```svelte
(myRating = 5)}> Give 5 stars
{#snippet children({ items })}
{#each items as item (item.index)}
{#if item.state === "active"}⭐{:else}☆{/if}
{/each}
{/snippet}
```
```svelte
{#snippet children({ items })}
{#each items as item (item.index)}
{#if item.state === "active"}⭐{:else}☆{/if}
{/each}
{/snippet}
```
--------------------------------
### Creating a Reusable Progress Component
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/progress.md
An example of wrapping the Progress primitive to create a custom, reusable component with labels and accessibility attributes.
```svelte
{label}
{valueLabel}
```
--------------------------------
### Implement Basic Date Picker Structure
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/date-picker.md
Demonstrates the standard composition of a Date Picker using Bits UI sub-components. It includes the input field, calendar grid, and navigation controls.
```svelte
{#snippet children({ segments })}
{#each segments as { part, value }}
{value}
{/each}
{/snippet}
{#snippet children({ months, weekdays })}
{#each months as month}
{#each weekdays as day}
{day}
{/each}
{#each month.weeks as weekDates}
{#each weekDates as date}
{/each}
{/each}
{/each}
{/snippet}
```
--------------------------------
### Toolbar Structure
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/toolbar.md
Demonstrates the basic HTML structure for implementing the Toolbar component using bits-ui.
```APIDOC
## Toolbar Structure
### Description
This section shows the fundamental HTML structure for the Toolbar component.
### Method
N/A (Component Structure)
### Endpoint
N/A (Component Structure)
### Parameters
N/A (Component Structure)
### Request Example
```svelte
```
### Response
N/A (Component Structure)
### Response Example
N/A (Component Structure)
```
--------------------------------
### Use Custom Context Menu with Inline Snippet
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/context-menu.md
Example of using the reusable CustomContextMenu component with the trigger snippet defined inline.
```svelte
{#snippet triggerArea()}
Right-click me
{/snippet}
```
--------------------------------
### Applying Svelte Transitions with forceMount
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/transitions.md
Demonstrates how to use the forceMount prop and the child snippet to conditionally render a Dialog component and apply a Svelte fly transition.
```svelte
{#snippet child({ props, open })}
{#if open}
{/if}
{/snippet}
```
--------------------------------
### Basic PIN Input Structure (Svelte)
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/pin-input.md
Demonstrates the fundamental structure of the PIN Input component using Svelte. It sets up the root element and iterates through cells to render individual input fields.
```svelte
{#snippet children({ cells })}
{#each cells as cell}
{/each}
{/snippet}
```
--------------------------------
### Manage Placeholder State
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/time-range-field.md
Examples of managing the placeholder state using standard two-way binding or a fully controlled approach with function bindings.
```svelte
```
--------------------------------
### Basic Toolbar Structure
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/toolbar.md
Demonstrates the fundamental composition of a Toolbar using the Root, Group, GroupItem, Link, and Button sub-components.
```svelte
```
--------------------------------
### Meter Component - Basic Usage
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/meter.md
Demonstrates the basic structure of using the Meter component.
```APIDOC
## Meter Component - Basic Usage
### Description
This snippet shows the fundamental way to include and use the Meter component.
### Method
N/A (Component Usage)
### Endpoint
N/A (Component Usage)
### Parameters
N/A (Component Usage)
### Request Example
```svelte
```
### Response
N/A (Component Usage)
```
--------------------------------
### Custom Accordion Content Component
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/accordion.md
A guide on how to create a reusable Accordion Content component that encapsulates Svelte transition logic for better maintainability.
```APIDOC
## Custom Accordion Content Component
### Description
Encapsulates the Accordion.Content primitive with custom transition logic using Svelte's `fade` transition.
### Parameters
#### Props
- **duration** (number) - Optional - The duration of the fade transition in milliseconds.
- **ref** (HTMLElement) - Optional - Bindable reference to the underlying element.
### Implementation Example
```svelte
{#snippet child({ props, open })}
{#if open}
{@render children?.()}
{/if}
{/snippet}
```
```
--------------------------------
### Create Svelte Project
Source: https://github.com/huntabyte/bits-ui/blob/main/tests/README.md
Commands to create a new Svelte project either in the current directory or a specified directory. This is the initial step for any Svelte application.
```bash
npm create svelte@latest
npm create svelte@latest my-app
```
--------------------------------
### Configure TimeField Placeholder
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/time-field.md
Examples of setting the initial placeholder time for the TimeField component using standard Time objects or ZonedDateTime for timezone support.
```svelte
```
--------------------------------
### Basic Dialog Structure
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/dialog.md
Demonstrates the fundamental composition of the Dialog component using its sub-components like Root, Trigger, Portal, Overlay, and Content.
```svelte
```
--------------------------------
### Configure Accordion Selection Modes
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/accordion.md
Examples of setting the Accordion type to either single or multiple selection modes to control user interaction behavior.
```svelte
```
--------------------------------
### Use Custom Context Menu with Separate Snippet
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/context-menu.md
Example of using the reusable CustomContextMenu component with the trigger snippet defined separately and passed as a prop.
```svelte
{#snippet triggerArea()}
Right-click me
{/snippet}
```
--------------------------------
### Use Svelte Transitions with Tooltip Content
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/tooltip.md
Use the `forceMount` prop on `Tooltip.Content` to enable Svelte Transitions or other animation libraries. This requires manually managing the open state within a child snippet.
```svelte
{#snippet child({ wrapperProps, props, open })}
{#if open}
{/if}
{/snippet}
```
--------------------------------
### Use Command LinkItem for Navigation
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/command.md
Explains how to use Command.LinkItem to render an anchor tag, providing standard link behavior like prefetching.
```svelte
```
--------------------------------
### Creating Reusable Menubar Components
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/menubar.md
Shows how to wrap Menubar parts into a custom component to simplify implementation when using the Menubar in multiple locations.
```svelte
{triggerText}
{#each items as item}
{item.label}
{/each}
```
--------------------------------
### Customizing Accessibility with aria-valuetext
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/rating-group.md
Provides an example of how to use the `aria-valuetext` prop to supply custom descriptive text for rating values, enhancing screen reader announcements.
```APIDOC
## Customizing Accessibility
You can enhance the accessibility experience with custom `aria-valuetext`:
```svelte
{
if (value === 0) return "No rating selected";
return `${value} out of ${max} stars. ${value >= 4 ? "Excellent" : value >= 3 ? "Good" : "Fair"} rating.`;
}}
>
```
```
--------------------------------
### Configure Scroll Area Behavior and Delay
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/scroll-area.md
Examples showing how to toggle scrollbar visibility types and customize the hide delay using the custom component wrapper.
```svelte
```
--------------------------------
### Basic Aspect Ratio Implementation (Svelte)
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/aspect-ratio.md
Demonstrates the fundamental usage of the AspectRatio.Root component from bits-ui in a Svelte application. This snippet shows how to import and render the root component.
```svelte
```
--------------------------------
### Define TimeRange Type
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/src/lib/content/api-reference/extended-types/shared/time-range-prop.md
Defines a TypeScript type for representing a range of time. It relies on the TimeValue type from bits-ui and allows both start and end properties to be undefined.
```typescript
import type { TimeValue } from "bits-ui";
type TimeRange = {
start: TimeValue | undefined;
end: TimeValue | undefined;
};
```
--------------------------------
### Apply Svelte Transitions to Link Preview
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/link-preview.md
Use the forceMount prop and child snippet to enable Svelte transitions for the Link Preview content.
```svelte
{#snippet child({ wrapperProps, props, open })}
{#if open}
{/if}
{/snippet}
```
--------------------------------
### Control Tooltip Active Trigger Programmatically
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/tooltip.md
In controlled mode, bind both `open` and `triggerId` to manage tooltip visibility programmatically. This is useful for guided onboarding flows.
```svelte
{
triggerId = "setup-members";
open = true;
}}>
Show members tip
```
--------------------------------
### Using MyAspectRatio Component (Svelte)
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/aspect-ratio.md
Shows how to integrate the custom 'MyAspectRatio' reusable component within a Svelte page. It demonstrates passing the 'src', 'alt', and 'ratio' props to render an image with a specific aspect ratio.
```svelte
```
--------------------------------
### Configure AlertDialog Focus Management
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/alert-dialog.md
Provides examples for disabling focus traps, overriding auto-focus on open, and overriding auto-focus on close to improve accessibility and user flow.
```svelte
{
e.preventDefault();
nameInput?.focus();
}}
>
{
e.preventDefault();
nameInput?.focus();
}}
>
```
--------------------------------
### Implement Basic Link Preview Structure
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/link-preview.md
The fundamental structure of the Link Preview component using Root, Trigger, and Content sub-components.
```svelte
```
--------------------------------
### Use Svelte Transitions with ContextMenu.Content
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/context-menu.md
Force mount ContextMenu.Content using the 'forceMount' prop and the 'child' snippet to integrate Svelte Transitions or other animation libraries. This requires manual handling of the content's visibility and wrapper props.
```svelte
{#snippet child({ wrapperProps, props, open })}
{#if open}
{/if}
{/snippet}
```
--------------------------------
### Implement Time Range Field Structure
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/time-range-field.md
Basic implementation of the TimeRangeField component using Svelte. It demonstrates how to structure the root, label, and input segments for both start and end times.
```svelte
Working Hours
{#each ["start", "end"] as const as type}
{#snippet children({ segments })}
{#each segments as { part, value }}
{value}
{/each}
{/snippet}
{/each}
```
--------------------------------
### Theme-specific Portal Targets
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/utilities/bits-config.md
Demonstrates configuring different portal targets for distinct UI regions like headers, sidebars, and main content areas using separate BitsConfig instances.
```svelte
```
--------------------------------
### Custom Anchor for Select Content
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/select.md
Anchor the Select.Content to a different element by providing a selector string or an HTMLElement to the `customAnchor` prop. This example demonstrates binding the `customAnchor` prop to a div element.
```svelte
```
--------------------------------
### Using Custom Checkbox Component (Svelte)
Source: https://github.com/huntabyte/bits-ui/blob/main/docs/content/components/checkbox.md
Shows a practical example of how to import and use the custom `MyCheckbox` component within a Svelte page, passing necessary props like `labelText`.
```svelte
```