···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Alert',
66+ description: 'A component for displaying important messages to the user.',
77+ props: {
88+ title: {
99+ type: 'string',
1010+ description: 'The title text of the alert.'
1111+ },
1212+ type: {
1313+ type: { type: 'enum', definition: "'info' | 'warning' | 'success' | 'error'" },
1414+ description: 'The type of alert, which determines the icon and default color scheme.'
1515+ },
1616+ variant: {
1717+ type: 'string',
1818+ description: 'The visual variant of the alert.'
1919+ },
2020+ children: {
2121+ type: 'Snippet',
2222+ description: 'The content to display inside the alert.',
2323+ required: true
2424+ },
2525+ class: {
2626+ type: 'string',
2727+ description: 'Additional CSS classes to apply.'
2828+ },
2929+ ref: {
3030+ type: 'HTMLDivElement',
3131+ description: 'The underlying DOM element.',
3232+ bindable: true
3333+ }
3434+ }
3535+ }
3636+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/alert/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'alert',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+86
apps/docs/src/lib/docs/core/avatar/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Avatar',
66+ description: 'An image element with a fallback for representing a user.',
77+ props: {
88+ src: {
99+ type: 'string',
1010+ description: 'The image source URL.'
1111+ },
1212+ alt: {
1313+ type: 'string',
1414+ description: 'Alt text for the avatar image.'
1515+ },
1616+ fallback: {
1717+ type: 'string',
1818+ description: 'Fallback text to display when the image is not available (e.g. initials).'
1919+ },
2020+ useThemeColor: {
2121+ type: 'boolean',
2222+ description: 'Whether to apply theme color styling to the image.',
2323+ default: 'false'
2424+ },
2525+ imageClass: {
2626+ type: 'string',
2727+ description: 'Additional CSS classes to apply to the image element.'
2828+ },
2929+ fallbackClass: {
3030+ type: 'string',
3131+ description: 'Additional CSS classes to apply to the fallback element.'
3232+ },
3333+ imageRef: {
3434+ type: 'HTMLImageElement',
3535+ description: 'Reference to the image DOM element.',
3636+ bindable: true
3737+ },
3838+ fallbackRef: {
3939+ type: 'HTMLElement',
4040+ description: 'Reference to the fallback DOM element.',
4141+ bindable: true
4242+ },
4343+ class: {
4444+ type: 'string',
4545+ description: 'Additional CSS classes to apply to the root element.'
4646+ },
4747+ ref: {
4848+ type: 'HTMLElement',
4949+ description: 'The underlying DOM element.',
5050+ bindable: true
5151+ }
5252+ }
5353+ },
5454+ {
5555+ title: 'AvatarGroup',
5656+ description: 'A group of overlapping avatars displayed in a row.',
5757+ props: {
5858+ users: {
5959+ type: { type: 'array', definition: '{ src?: string; alt?: string; fallback?: string }[]' },
6060+ description: 'The list of users to display avatars for.',
6161+ required: true
6262+ },
6363+ avatarClass: {
6464+ type: 'string',
6565+ description: 'Additional CSS classes to apply to each avatar.'
6666+ },
6767+ imageClass: {
6868+ type: 'string',
6969+ description: 'Additional CSS classes to apply to each avatar image.'
7070+ },
7171+ fallbackClass: {
7272+ type: 'string',
7373+ description: 'Additional CSS classes to apply to each avatar fallback.'
7474+ },
7575+ class: {
7676+ type: 'string',
7777+ description: 'Additional CSS classes to apply to the group container.'
7878+ },
7979+ ref: {
8080+ type: 'HTMLDivElement',
8181+ description: 'The underlying DOM element.',
8282+ bindable: true
8383+ }
8484+ }
8585+ }
8686+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/avatar/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'avatar',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+34
apps/docs/src/lib/docs/core/badge/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Badge',
66+ description: 'A small label for status, categories, or metadata.',
77+ props: {
88+ variant: {
99+ type: { type: 'enum', definition: "'primary' | 'primary_shift' | 'primary_shift_2' | 'secondary' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose'" },
1010+ description: 'The visual variant of the badge.',
1111+ default: "'primary'"
1212+ },
1313+ size: {
1414+ type: { type: 'enum', definition: "'sm' | 'md' | 'lg'" },
1515+ description: 'The size of the badge.',
1616+ default: "'sm'"
1717+ },
1818+ children: {
1919+ type: 'Snippet',
2020+ description: 'The content to display inside the badge.',
2121+ required: true
2222+ },
2323+ class: {
2424+ type: 'string',
2525+ description: 'Additional CSS classes to apply.'
2626+ },
2727+ ref: {
2828+ type: 'HTMLSpanElement',
2929+ description: 'The underlying DOM element.',
3030+ bindable: true
3131+ }
3232+ }
3333+ }
3434+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/badge/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'badge',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+23
apps/docs/src/lib/docs/core/box/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Box',
66+ description: 'A styled container with default padding, rounded corners, and a subtle background.',
77+ props: {
88+ children: {
99+ type: 'Snippet',
1010+ description: 'The content to display inside the box.',
1111+ required: true
1212+ },
1313+ class: {
1414+ type: 'string',
1515+ description: 'Additional CSS classes to apply.'
1616+ },
1717+ ref: {
1818+ type: 'HTMLDivElement',
1919+ description: 'The underlying DOM element.'
2020+ }
2121+ }
2222+ }
2323+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/box/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'box',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+51
apps/docs/src/lib/docs/core/button/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Button',
66+ description: 'A clickable button element. Renders as an anchor tag when href is provided.',
77+ props: {
88+ variant: {
99+ type: { type: 'enum', definition: "'primary' | 'secondary' | 'link' | 'ghost' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose'" },
1010+ description: 'The visual variant of the button.',
1111+ default: "'primary'"
1212+ },
1313+ size: {
1414+ type: { type: 'enum', definition: "'default' | 'sm' | 'lg' | 'icon' | 'iconSm' | 'iconLg'" },
1515+ description: 'The size of the button.',
1616+ default: "'default'"
1717+ },
1818+ href: {
1919+ type: 'string',
2020+ description: 'When provided, the button renders as an anchor element (<a>) instead of a <button>.'
2121+ },
2222+ type: {
2323+ type: 'string',
2424+ description: 'The type attribute for the button element.',
2525+ default: "'button'"
2626+ },
2727+ haptics: {
2828+ type: 'boolean',
2929+ description: 'Whether to trigger haptic feedback on click (uses web-haptics).'
3030+ },
3131+ onclick: {
3232+ type: { type: 'function', definition: '(event: MouseEvent) => void' },
3333+ description: 'Click event handler.'
3434+ },
3535+ children: {
3636+ type: 'Snippet',
3737+ description: 'The content to display inside the button.',
3838+ required: true
3939+ },
4040+ class: {
4141+ type: 'string',
4242+ description: 'Additional CSS classes to apply.'
4343+ },
4444+ ref: {
4545+ type: 'HTMLElement',
4646+ description: 'The underlying DOM element.',
4747+ bindable: true
4848+ }
4949+ }
5050+ }
5151+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/button/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'button',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+41
apps/docs/src/lib/docs/core/cards/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'ImageCard',
66+ description: 'A card component with an image, title, and optional description. Can be a link or clickable.',
77+ props: {
88+ src: {
99+ type: 'string',
1010+ description: 'The image source URL.',
1111+ required: true
1212+ },
1313+ alt: {
1414+ type: 'string',
1515+ description: 'Alt text for the card image.',
1616+ required: true
1717+ },
1818+ title: {
1919+ type: 'string',
2020+ description: 'The card title.',
2121+ required: true
2222+ },
2323+ description: {
2424+ type: 'string',
2525+ description: 'Optional description text below the title.'
2626+ },
2727+ href: {
2828+ type: 'string',
2929+ description: 'When provided, the card renders as a link.'
3030+ },
3131+ onclick: {
3232+ type: { type: 'function', definition: '() => void' },
3333+ description: 'Click event handler.'
3434+ },
3535+ class: {
3636+ type: 'string',
3737+ description: 'Additional CSS classes to apply.'
3838+ }
3939+ }
4040+ }
4141+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/cards/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'cards',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+38
apps/docs/src/lib/docs/core/chat-bubble/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'ChatBubble',
66+ description: 'A chat message bubble with left/right alignment for conversations.',
77+ props: {
88+ side: {
99+ type: { type: 'enum', definition: "'left' | 'right'" },
1010+ description: 'Which side the bubble appears on. Left for received messages, right for sent.',
1111+ default: "'left'"
1212+ },
1313+ variant: {
1414+ type: 'string',
1515+ description: 'The visual variant. Defaults to "primary" for left and "secondary" for right.'
1616+ },
1717+ size: {
1818+ type: { type: 'enum', definition: "'sm' | 'md' | 'lg'" },
1919+ description: 'The size of the chat bubble.',
2020+ default: "'md'"
2121+ },
2222+ children: {
2323+ type: 'Snippet',
2424+ description: 'The message content.',
2525+ required: true
2626+ },
2727+ class: {
2828+ type: 'string',
2929+ description: 'Additional CSS classes to apply.'
3030+ },
3131+ ref: {
3232+ type: 'HTMLSpanElement',
3333+ description: 'The underlying DOM element.',
3434+ bindable: true
3535+ }
3636+ }
3737+ }
3838+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/chat-bubble/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'chat-bubble',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+67
apps/docs/src/lib/docs/core/checkbox/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Checkbox',
66+ description: 'A control that allows the user to toggle between checked and not checked.',
77+ props: {
88+ checked: {
99+ type: 'boolean',
1010+ description: 'The checked state of the checkbox.',
1111+ default: 'false',
1212+ bindable: true
1313+ },
1414+ indeterminate: {
1515+ type: 'boolean',
1616+ description: 'Whether the checkbox is in an indeterminate state.',
1717+ default: 'false',
1818+ bindable: true
1919+ },
2020+ variant: {
2121+ type: { type: 'enum', definition: "'primary' | 'secondary'" },
2222+ description: 'The visual variant of the checkbox.',
2323+ default: "'primary'"
2424+ },
2525+ sizeVariant: {
2626+ type: { type: 'enum', definition: "'default' | 'sm' | 'lg'" },
2727+ description: 'The size of the checkbox.',
2828+ default: "'default'"
2929+ },
3030+ disabled: {
3131+ type: 'boolean',
3232+ description: 'Whether the checkbox is disabled.',
3333+ default: 'false'
3434+ },
3535+ required: {
3636+ type: 'boolean',
3737+ description: 'Whether the checkbox is required.',
3838+ default: 'false'
3939+ },
4040+ name: {
4141+ type: 'string',
4242+ description: 'The name of the checkbox used in form submission.'
4343+ },
4444+ value: {
4545+ type: 'string',
4646+ description: 'The value of the checkbox used in form submission.'
4747+ },
4848+ onCheckedChange: {
4949+ type: { type: 'function', definition: '(checked: boolean) => void' },
5050+ description: 'A callback invoked when the checked state changes.'
5151+ },
5252+ onIndeterminateChange: {
5353+ type: { type: 'function', definition: '(indeterminate: boolean) => void' },
5454+ description: 'A callback invoked when the indeterminate state changes.'
5555+ },
5656+ class: {
5757+ type: 'string',
5858+ description: 'Additional CSS classes to apply.'
5959+ },
6060+ ref: {
6161+ type: 'HTMLElement',
6262+ description: 'The underlying DOM element. You can bind to this to get a reference to the element.',
6363+ bindable: true
6464+ }
6565+ }
6666+ }
6767+] satisfies APISchema[];
+10
apps/docs/src/lib/docs/core/checkbox/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'checkbox',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://bits-ui.com/docs/components/checkbox',
1616+ label: 'bits-ui checkbox',
1717+ package: 'bits-ui',
1818+ component: 'Checkbox'
1919+ }
2020+ ]
1121};
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'DownloadButton',
66+ description: 'A button that triggers a file download with a title and optional description.',
77+ props: {
88+ title: {
99+ type: 'string',
1010+ description: 'The display title of the download.',
1111+ required: true
1212+ },
1313+ description: {
1414+ type: 'string',
1515+ description: 'Optional description text below the title.'
1616+ },
1717+ fileUrl: {
1818+ type: 'string',
1919+ description: 'The URL of the file to download.',
2020+ required: true
2121+ },
2222+ fileName: {
2323+ type: 'string',
2424+ description: 'The name for the downloaded file. Defaults to the filename parsed from fileUrl.'
2525+ }
2626+ }
2727+ }
2828+] satisfies APISchema[];
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33+import api from './api';
3445export default {
56 slug: 'download-button',
67 title: 'Download Button',
78 docs: Docs,
89 example: Example,
1010+ api,
911};
+30
apps/docs/src/lib/docs/core/head/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Head',
66+ description: 'Sets page metadata including title, description, Open Graph tags, and favicon.',
77+ props: {
88+ title: {
99+ type: 'string',
1010+ description: 'The page title (sets <title> and og:title).'
1111+ },
1212+ description: {
1313+ type: 'string',
1414+ description: 'The page description (sets meta description and og:description).'
1515+ },
1616+ image: {
1717+ type: 'string',
1818+ description: 'The Open Graph image URL.'
1919+ },
2020+ url: {
2121+ type: 'string',
2222+ description: 'The canonical page URL.'
2323+ },
2424+ emojiFavicon: {
2525+ type: 'string',
2626+ description: 'An emoji to use as the page favicon (rendered as SVG).'
2727+ }
2828+ }
2929+ }
3030+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/head/index.ts
···11import Docs from './Documentation.md';
22import Card from './Card.svelte';
33+import api from './api';
3445export default {
56 slug: 'head',
67 title: 'Head',
78 docs: Docs,
89 card: Card,
1010+ api,
911};
+47
apps/docs/src/lib/docs/core/image/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Image',
66+ description: 'An image component with optional theme color overlay and blur effects.',
77+ props: {
88+ src: {
99+ type: 'string',
1010+ description: 'The image source URL.'
1111+ },
1212+ alt: {
1313+ type: 'string',
1414+ description: 'Alt text for the image.',
1515+ required: true
1616+ },
1717+ useThemeColor: {
1818+ type: 'boolean',
1919+ description: 'Whether to apply a theme color overlay to the image.',
2020+ default: 'false'
2121+ },
2222+ blur: {
2323+ type: 'boolean',
2424+ description: 'Whether to apply a blur loading effect.',
2525+ default: 'true'
2626+ },
2727+ showNormalOnHover: {
2828+ type: 'boolean',
2929+ description: 'When useThemeColor is true, shows the original image on hover.',
3030+ default: 'false'
3131+ },
3232+ containerClasses: {
3333+ type: 'string',
3434+ description: 'Additional CSS classes for the image container.'
3535+ },
3636+ class: {
3737+ type: 'string',
3838+ description: 'Additional CSS classes for the image element.'
3939+ },
4040+ ref: {
4141+ type: 'HTMLImageElement',
4242+ description: 'The underlying image DOM element.',
4343+ bindable: true
4444+ }
4545+ }
4646+ }
4747+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/image/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'image',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+38
apps/docs/src/lib/docs/core/input/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Input',
66+ description: 'A styled text input field.',
77+ props: {
88+ value: {
99+ type: 'string',
1010+ description: 'The current value of the input.',
1111+ bindable: true
1212+ },
1313+ type: {
1414+ type: 'string',
1515+ description: 'The HTML input type (text, email, password, number, etc.). Excludes "file".'
1616+ },
1717+ variant: {
1818+ type: { type: 'enum', definition: "'primary' | 'secondary'" },
1919+ description: 'The visual variant of the input.',
2020+ default: "'primary'"
2121+ },
2222+ sizeVariant: {
2323+ type: { type: 'enum', definition: "'default' | 'sm' | 'lg'" },
2424+ description: 'The size of the input.',
2525+ default: "'default'"
2626+ },
2727+ class: {
2828+ type: 'string',
2929+ description: 'Additional CSS classes to apply.'
3030+ },
3131+ ref: {
3232+ type: 'HTMLInputElement',
3333+ description: 'The underlying DOM element.',
3434+ bindable: true
3535+ }
3636+ }
3737+ }
3838+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/input/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'input',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+51
apps/docs/src/lib/docs/core/modal/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Modal',
66+ description: 'A dialog overlay that requires user interaction. Built on top of the bits-ui Dialog primitive.',
77+ props: {
88+ open: {
99+ type: 'boolean',
1010+ description: 'Whether the modal is open.',
1111+ default: 'false',
1212+ bindable: true
1313+ },
1414+ children: {
1515+ type: 'Snippet',
1616+ description: 'The content to display inside the modal.',
1717+ required: true
1818+ },
1919+ closeButton: {
2020+ type: 'boolean',
2121+ description: 'Whether to show the close button in the top-right corner.',
2222+ default: 'true'
2323+ },
2424+ interactOutsideBehavior: {
2525+ type: { type: 'enum', definition: "'close' | 'ignore'" },
2626+ description: 'How the modal responds to clicks outside its content.',
2727+ default: "'close'"
2828+ },
2929+ onOpenAutoFocus: {
3030+ type: { type: 'function', definition: '(event: Event) => void' },
3131+ description: 'Callback when focus is moved into the modal on open. Call event.preventDefault() to prevent default focus behavior.'
3232+ },
3333+ contentProps: {
3434+ type: 'Dialog.ContentProps',
3535+ description: 'Additional props to pass to the underlying Dialog.Content component.'
3636+ },
3737+ onOpenChange: {
3838+ type: { type: 'function', definition: '(open: boolean) => void' },
3939+ description: 'A callback invoked when the open state changes.'
4040+ },
4141+ onOpenChangeComplete: {
4242+ type: { type: 'function', definition: '(open: boolean) => void' },
4343+ description: 'A callback invoked after the open/close transition completes.'
4444+ },
4545+ class: {
4646+ type: 'string',
4747+ description: 'Additional CSS classes to apply to the modal content.'
4848+ }
4949+ }
5050+ }
5151+] satisfies APISchema[];
+10
apps/docs/src/lib/docs/core/modal/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'modal',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://bits-ui.com/docs/components/dialog',
1616+ label: 'bits-ui dialog',
1717+ package: 'bits-ui',
1818+ component: 'Dialog'
1919+ }
2020+ ]
1121};
+64
apps/docs/src/lib/docs/core/number-input/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'NumberInput',
66+ description: 'A numeric input with animated value transitions. Uses number-flow for smooth animations.',
77+ props: {
88+ value: {
99+ type: 'number',
1010+ description: 'The current numeric value.',
1111+ default: '50',
1212+ bindable: true
1313+ },
1414+ min: {
1515+ type: 'number',
1616+ description: 'The minimum allowed value.',
1717+ default: '0'
1818+ },
1919+ max: {
2020+ type: 'number',
2121+ description: 'The maximum allowed value.',
2222+ default: '999'
2323+ },
2424+ step: {
2525+ type: 'number',
2626+ description: 'The step increment for the input.',
2727+ default: '1'
2828+ },
2929+ defaultValue: {
3030+ type: 'number',
3131+ description: 'The initial default value.',
3232+ default: '0'
3333+ },
3434+ variant: {
3535+ type: { type: 'enum', definition: "'primary' | 'secondary'" },
3636+ description: 'The visual variant.',
3737+ default: "'primary'"
3838+ },
3939+ size: {
4040+ type: { type: 'enum', definition: "'default' | 'sm' | 'lg'" },
4141+ description: 'The size of the input.',
4242+ default: "'default'"
4343+ },
4444+ tabindex: {
4545+ type: 'number',
4646+ description: 'The tabindex of the input.'
4747+ },
4848+ class: {
4949+ type: 'string',
5050+ description: 'Additional CSS classes to apply.'
5151+ },
5252+ ref: {
5353+ type: 'HTMLDivElement',
5454+ description: 'The underlying container DOM element.',
5555+ bindable: true
5656+ },
5757+ inputRef: {
5858+ type: 'HTMLInputElement',
5959+ description: 'Reference to the inner input element.',
6060+ bindable: true
6161+ }
6262+ }
6363+ }
6464+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/number-input/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'number-input',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113 sources: [
1214 {
1315 href: 'https://number-flow.barvian.me/',
+67
apps/docs/src/lib/docs/core/popover/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Popover',
66+ description: 'A floating panel anchored to a trigger button. Built on top of the bits-ui Popover primitive.',
77+ props: {
88+ open: {
99+ type: 'boolean',
1010+ description: 'Whether the popover is open.',
1111+ default: 'false',
1212+ bindable: true
1313+ },
1414+ onOpenChange: {
1515+ type: { type: 'function', definition: '(open: boolean) => void' },
1616+ description: 'A callback invoked when the open state changes.'
1717+ },
1818+ children: {
1919+ type: 'Snippet',
2020+ description: 'The content to display inside the popover.',
2121+ required: true
2222+ },
2323+ triggerText: {
2424+ type: 'string',
2525+ description: 'Text label for the trigger button.'
2626+ },
2727+ triggerVariant: {
2828+ type: { type: 'enum', definition: "'primary' | 'secondary' | 'link' | 'ghost'" },
2929+ description: 'The visual variant of the trigger button.',
3030+ default: "'primary'"
3131+ },
3232+ triggerSize: {
3333+ type: { type: 'enum', definition: "'default' | 'sm' | 'lg' | 'icon' | 'iconSm' | 'iconLg'" },
3434+ description: 'The size of the trigger button.',
3535+ default: "'default'"
3636+ },
3737+ triggerClasses: {
3838+ type: 'string',
3939+ description: 'Additional CSS classes to apply to the trigger button.',
4040+ default: "''"
4141+ },
4242+ triggerRef: {
4343+ type: 'HTMLButtonElement',
4444+ description: 'Reference to the trigger button element.',
4545+ bindable: true
4646+ },
4747+ side: {
4848+ type: { type: 'enum', definition: "'top' | 'bottom' | 'left' | 'right'" },
4949+ description: 'The preferred side of the trigger to render the popover.',
5050+ default: "'top'"
5151+ },
5252+ sideOffset: {
5353+ type: 'number',
5454+ description: 'The distance in pixels from the trigger.',
5555+ default: '10'
5656+ },
5757+ child: {
5858+ type: 'Snippet',
5959+ description: 'A snippet for custom trigger rendering. Use this instead of triggerText for full control over the trigger.'
6060+ },
6161+ class: {
6262+ type: 'string',
6363+ description: 'Additional CSS classes to apply to the popover content.'
6464+ }
6565+ }
6666+ }
6767+] satisfies APISchema[];
+10
apps/docs/src/lib/docs/core/popover/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'popover',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://bits-ui.com/docs/components/popover',
1616+ label: 'bits-ui popover',
1717+ package: 'bits-ui',
1818+ component: 'Popover'
1919+ }
2020+ ]
1121};
+29
apps/docs/src/lib/docs/core/prose/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Prose',
66+ description: 'A wrapper that applies Tailwind Typography styles to its content for rendering rich text.',
77+ props: {
88+ size: {
99+ type: { type: 'enum', definition: "'default' | 'md' | 'lg' | 'xl' | '2xl'" },
1010+ description: 'The typography size scale.',
1111+ default: "'default'"
1212+ },
1313+ children: {
1414+ type: 'Snippet',
1515+ description: 'The content to apply typography styles to.',
1616+ required: true
1717+ },
1818+ class: {
1919+ type: 'string',
2020+ description: 'Additional CSS classes to apply.'
2121+ },
2222+ ref: {
2323+ type: 'HTMLDivElement',
2424+ description: 'The underlying DOM element.',
2525+ bindable: true
2626+ }
2727+ }
2828+ }
2929+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/prose/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'prose',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'scroll-area',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+71
apps/docs/src/lib/docs/core/select/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Select',
66+ description: 'A dropdown select menu. Built on top of the bits-ui Select primitive.',
77+ props: {
88+ value: {
99+ type: { type: 'union', definition: 'string | string[]' },
1010+ description: 'The currently selected value.',
1111+ bindable: true
1212+ },
1313+ items: {
1414+ type: { type: 'array', definition: '{ value: string; label: string; disabled?: boolean }[]' },
1515+ description: 'The list of items to display in the select dropdown.',
1616+ required: true
1717+ },
1818+ placeholder: {
1919+ type: 'string',
2020+ description: 'Placeholder text shown when no value is selected.'
2121+ },
2222+ type: {
2323+ type: { type: 'enum', definition: "'single' | 'multiple'" },
2424+ description: 'Whether the select allows single or multiple selections.',
2525+ default: "'single'"
2626+ },
2727+ open: {
2828+ type: 'boolean',
2929+ description: 'Whether the select dropdown is open.',
3030+ default: 'false',
3131+ bindable: true
3232+ },
3333+ onValueChange: {
3434+ type: { type: 'function', definition: '(value: string) => void' },
3535+ description: 'A callback invoked when the selected value changes.'
3636+ },
3737+ onOpenChange: {
3838+ type: { type: 'function', definition: '(open: boolean) => void' },
3939+ description: 'A callback invoked when the dropdown open state changes.'
4040+ },
4141+ disabled: {
4242+ type: 'boolean',
4343+ description: 'Whether the select is disabled.',
4444+ default: 'false'
4545+ },
4646+ name: {
4747+ type: 'string',
4848+ description: 'The name of the select used in form submission.'
4949+ },
5050+ required: {
5151+ type: 'boolean',
5252+ description: 'Whether the select is required.',
5353+ default: 'false'
5454+ },
5555+ loop: {
5656+ type: 'boolean',
5757+ description: 'Whether keyboard navigation loops from last item to first and vice versa.',
5858+ default: 'false'
5959+ },
6060+ allowDeselect: {
6161+ type: 'boolean',
6262+ description: 'Whether the user can deselect the selected item.',
6363+ default: 'false'
6464+ },
6565+ contentProps: {
6666+ type: 'Select.ContentProps',
6767+ description: 'Additional props to pass to the underlying Select.Content component (positioning, collision, etc.).'
6868+ }
6969+ }
7070+ }
7171+] satisfies APISchema[];
+10
apps/docs/src/lib/docs/core/select/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'select',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://bits-ui.com/docs/components/select',
1616+ label: 'bits-ui select',
1717+ package: 'bits-ui',
1818+ component: 'Select'
1919+ }
2020+ ]
1121};
+28
apps/docs/src/lib/docs/core/sidebar/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Sidebar',
66+ description: 'A responsive sidebar that shows as a fixed panel on desktop and a popover on mobile.',
77+ props: {
88+ mobileOnly: {
99+ type: 'boolean',
1010+ description: 'When true, only renders the mobile popover version (hidden on desktop).',
1111+ default: 'false'
1212+ },
1313+ mobileClasses: {
1414+ type: 'string',
1515+ description: 'Additional CSS classes to apply to the mobile popover version.'
1616+ },
1717+ children: {
1818+ type: 'Snippet',
1919+ description: 'The sidebar content.',
2020+ required: true
2121+ },
2222+ class: {
2323+ type: 'string',
2424+ description: 'Additional CSS classes to apply.'
2525+ }
2626+ }
2727+ }
2828+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/sidebar/index.ts
···11import Docs from './Documentation.md';
22import Card from './Card.svelte';
33+import api from './api';
3445export default {
56 slug: 'sidebar',
67 title: 'Sidebar',
78 docs: Docs,
89 card: Card,
1010+ api,
911};
+75
apps/docs/src/lib/docs/core/slider/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Slider',
66+ description: 'A control for selecting a numeric value within a range. Built on top of the bits-ui Slider primitive.',
77+ props: {
88+ value: {
99+ type: 'number[]',
1010+ description: 'The current value of the slider. Array with one element for single, multiple for range sliders.',
1111+ bindable: true
1212+ },
1313+ type: {
1414+ type: { type: 'enum', definition: "'single' | 'multiple'" },
1515+ description: 'Whether the slider has a single thumb or multiple thumbs.',
1616+ default: "'single'"
1717+ },
1818+ min: {
1919+ type: 'number',
2020+ description: 'The minimum value of the slider.',
2121+ default: '0'
2222+ },
2323+ max: {
2424+ type: 'number',
2525+ description: 'The maximum value of the slider.',
2626+ default: '100'
2727+ },
2828+ step: {
2929+ type: { type: 'union', definition: 'number | number[]' },
3030+ description: 'The step increment. Can be a single number or an array of specific step values.'
3131+ },
3232+ orientation: {
3333+ type: { type: 'enum', definition: "'horizontal' | 'vertical'" },
3434+ description: 'The orientation of the slider.',
3535+ default: "'horizontal'"
3636+ },
3737+ disabled: {
3838+ type: 'boolean',
3939+ description: 'Whether the slider is disabled.',
4040+ default: 'false'
4141+ },
4242+ onValueChange: {
4343+ type: { type: 'function', definition: '(value: number[]) => void' },
4444+ description: 'A callback invoked when the slider value changes during interaction.'
4545+ },
4646+ onValueCommit: {
4747+ type: { type: 'function', definition: '(value: number[]) => void' },
4848+ description: 'A callback invoked when the user finishes interacting with the slider (on pointerup/keyup).'
4949+ },
5050+ dir: {
5151+ type: { type: 'enum', definition: "'ltr' | 'rtl'" },
5252+ description: 'The reading direction of the slider.',
5353+ default: "'ltr'"
5454+ },
5555+ autoSort: {
5656+ type: 'boolean',
5757+ description: 'Whether to automatically sort the values when multiple thumbs cross over.',
5858+ default: 'true'
5959+ },
6060+ tabindex: {
6161+ type: 'number',
6262+ description: 'The tabindex of the slider thumbs.'
6363+ },
6464+ class: {
6565+ type: 'string',
6666+ description: 'Additional CSS classes to apply.'
6767+ },
6868+ ref: {
6969+ type: 'HTMLElement',
7070+ description: 'The underlying DOM element.',
7171+ bindable: true
7272+ }
7373+ }
7474+ }
7575+] satisfies APISchema[];
+10
apps/docs/src/lib/docs/core/slider/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'slider',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://bits-ui.com/docs/components/slider',
1616+ label: 'bits-ui slider',
1717+ package: 'bits-ui',
1818+ component: 'Slider'
1919+ }
2020+ ]
1121};
+15
apps/docs/src/lib/docs/core/sonner/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Toaster',
66+ description: 'A toast notification container. Place once in your layout and use the toast() function to show notifications. Built on svelte-sonner.',
77+ props: {
88+ colors: {
99+ type: { type: 'object', definition: "{ default?: Colors; success?: Colors; error?: Colors; info?: Colors }" },
1010+ description: "Color mapping for toast types. Colors can be: 'blue' | 'red' | 'yellow' | 'green' | 'indigo' | 'purple' | 'pink' | 'orange' | 'teal' | 'emerald' | 'lime' | 'cyan' | 'sky' | 'rose' | 'amber' | 'violet' | 'fuchsia' | 'base' | 'accent'.",
1111+ default: "{ default: 'accent', success: 'green', error: 'red', info: 'blue' }"
1212+ }
1313+ }
1414+ }
1515+] satisfies APISchema[];
+8
apps/docs/src/lib/docs/core/sonner/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'sonner',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://sonner.emilkowal.ski/',
1616+ label: 'sonner'
1717+ }
1818+ ]
1119};
+47
apps/docs/src/lib/docs/core/switch/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Switch',
66+ description: 'A toggle control that switches between on and off states. Built on top of the bits-ui Switch primitive.',
77+ props: {
88+ checked: {
99+ type: 'boolean',
1010+ description: 'Whether the switch is checked (on).',
1111+ default: 'false',
1212+ bindable: true
1313+ },
1414+ onCheckedChange: {
1515+ type: { type: 'function', definition: '(checked: boolean) => void' },
1616+ description: 'A callback invoked when the checked state changes.'
1717+ },
1818+ disabled: {
1919+ type: 'boolean',
2020+ description: 'Whether the switch is disabled.',
2121+ default: 'false'
2222+ },
2323+ name: {
2424+ type: 'string',
2525+ description: 'The name of the switch used in form submission.'
2626+ },
2727+ required: {
2828+ type: 'boolean',
2929+ description: 'Whether the switch is required.',
3030+ default: 'false'
3131+ },
3232+ value: {
3333+ type: 'string',
3434+ description: 'The value of the switch used in form submission.'
3535+ },
3636+ class: {
3737+ type: 'string',
3838+ description: 'Additional CSS classes to apply.'
3939+ },
4040+ ref: {
4141+ type: 'HTMLElement',
4242+ description: 'The underlying DOM element.',
4343+ bindable: true
4444+ }
4545+ }
4646+ }
4747+] satisfies APISchema[];
+10
apps/docs/src/lib/docs/core/switch/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'switch',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://bits-ui.com/docs/components/switch',
1616+ label: 'bits-ui switch',
1717+ package: 'bits-ui',
1818+ component: 'Switch'
1919+ }
2020+ ]
1121};
+24
apps/docs/src/lib/docs/core/tabs/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Tabs',
66+ description: 'A horizontal tab navigation component.',
77+ props: {
88+ items: {
99+ type: { type: 'array', definition: '{ name: string; href?: string; onclick?: () => void }[]' },
1010+ description: 'The list of tab items. Each item can be a link (href) or a button (onclick).',
1111+ required: true
1212+ },
1313+ active: {
1414+ type: 'string',
1515+ description: 'The name of the currently active tab.',
1616+ required: true
1717+ },
1818+ class: {
1919+ type: 'string',
2020+ description: 'Additional CSS classes to apply.'
2121+ }
2222+ }
2323+ }
2424+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/tabs/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'tabs',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+34
apps/docs/src/lib/docs/core/textarea/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Textarea',
66+ description: 'A styled multi-line text input.',
77+ props: {
88+ value: {
99+ type: 'string',
1010+ description: 'The current value of the textarea.',
1111+ bindable: true
1212+ },
1313+ variant: {
1414+ type: { type: 'enum', definition: "'primary' | 'secondary'" },
1515+ description: 'The visual variant.',
1616+ default: "'primary'"
1717+ },
1818+ sizeVariant: {
1919+ type: { type: 'enum', definition: "'default' | 'sm' | 'lg'" },
2020+ description: 'The size of the textarea.',
2121+ default: "'default'"
2222+ },
2323+ class: {
2424+ type: 'string',
2525+ description: 'Additional CSS classes to apply.'
2626+ },
2727+ ref: {
2828+ type: 'HTMLTextAreaElement',
2929+ description: 'The underlying DOM element.',
3030+ bindable: true
3131+ }
3232+ }
3333+ }
3434+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/textarea/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'textarea',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113};
+24
apps/docs/src/lib/docs/core/theme-toggle/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'ThemeToggle',
66+ description: 'A button that toggles between light, dark, and system theme modes. Uses mode-watcher under the hood.',
77+ props: {
88+ defaultMode: {
99+ type: { type: 'enum', definition: "'light' | 'dark' | 'system'" },
1010+ description: 'The initial theme mode.',
1111+ default: "'system'"
1212+ },
1313+ class: {
1414+ type: 'string',
1515+ description: 'Additional CSS classes to apply.'
1616+ },
1717+ ref: {
1818+ type: 'HTMLElement',
1919+ description: 'The underlying DOM element.',
2020+ bindable: true
2121+ }
2222+ }
2323+ }
2424+] satisfies APISchema[];
+2
apps/docs/src/lib/docs/core/theme-toggle/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'theme-toggle',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1113 sources: [
1214 {
1315 href: 'https://github.com/svecosystem/mode-watcher',
+97
apps/docs/src/lib/docs/core/toggle-group/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'ToggleGroup',
66+ description: 'A group of toggle buttons where one or multiple can be pressed. Built on top of the bits-ui ToggleGroup primitive.',
77+ props: {
88+ type: {
99+ type: { type: 'enum', definition: "'single' | 'multiple'" },
1010+ description: "Whether a single or multiple items can be pressed at a time.",
1111+ required: true
1212+ },
1313+ value: {
1414+ type: { type: 'union', definition: 'string | string[]' },
1515+ description: 'The currently pressed value(s). A string when type is "single", an array when "multiple".',
1616+ bindable: true
1717+ },
1818+ onValueChange: {
1919+ type: { type: 'function', definition: '(value: string | string[]) => void' },
2020+ description: 'A callback invoked when the pressed value changes.'
2121+ },
2222+ variant: {
2323+ type: { type: 'enum', definition: "'default'" },
2424+ description: 'The visual variant of the toggle group items.',
2525+ default: "'default'"
2626+ },
2727+ size: {
2828+ type: { type: 'enum', definition: "'default' | 'sm' | 'lg'" },
2929+ description: 'The size of the toggle group items.',
3030+ default: "'default'"
3131+ },
3232+ disabled: {
3333+ type: 'boolean',
3434+ description: 'Whether the entire toggle group is disabled.',
3535+ default: 'false'
3636+ },
3737+ loop: {
3838+ type: 'boolean',
3939+ description: 'Whether keyboard navigation loops from last item to first and vice versa.',
4040+ default: 'true'
4141+ },
4242+ orientation: {
4343+ type: { type: 'enum', definition: "'horizontal' | 'vertical'" },
4444+ description: 'The orientation of the toggle group for keyboard navigation.',
4545+ default: "'horizontal'"
4646+ },
4747+ rovingFocus: {
4848+ type: 'boolean',
4949+ description: 'Whether the toggle group uses roving focus management.',
5050+ default: 'true'
5151+ },
5252+ class: {
5353+ type: 'string',
5454+ description: 'Additional CSS classes to apply.'
5555+ },
5656+ ref: {
5757+ type: 'HTMLElement',
5858+ description: 'The underlying DOM element.',
5959+ bindable: true
6060+ }
6161+ }
6262+ },
6363+ {
6464+ title: 'ToggleGroupItem',
6565+ description: 'A single item within a toggle group.',
6666+ props: {
6767+ value: {
6868+ type: 'string',
6969+ description: 'The value of this toggle item.',
7070+ required: true,
7171+ bindable: true
7272+ },
7373+ variant: {
7474+ type: { type: 'enum', definition: "'default'" },
7575+ description: 'Override the visual variant for this specific item. Falls back to the parent ToggleGroup variant.'
7676+ },
7777+ size: {
7878+ type: { type: 'enum', definition: "'default' | 'sm' | 'lg'" },
7979+ description: 'Override the size for this specific item. Falls back to the parent ToggleGroup size.'
8080+ },
8181+ disabled: {
8282+ type: 'boolean',
8383+ description: 'Whether this item is disabled.',
8484+ default: 'false'
8585+ },
8686+ class: {
8787+ type: 'string',
8888+ description: 'Additional CSS classes to apply.'
8989+ },
9090+ ref: {
9191+ type: 'HTMLElement',
9292+ description: 'The underlying DOM element.',
9393+ bindable: true
9494+ }
9595+ }
9696+ }
9797+] satisfies APISchema[];
+10
apps/docs/src/lib/docs/core/toggle-group/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'toggle-group',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://bits-ui.com/docs/components/toggle-group',
1616+ label: 'bits-ui toggle-group',
1717+ package: 'bits-ui',
1818+ component: 'ToggleGroup'
1919+ }
2020+ ]
1121};
+44
apps/docs/src/lib/docs/core/toggle/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Toggle',
66+ description: 'A two-state button that can be toggled on or off. Built on top of the bits-ui Toggle primitive.',
77+ props: {
88+ pressed: {
99+ type: 'boolean',
1010+ description: 'Whether the toggle is pressed.',
1111+ default: 'false',
1212+ bindable: true
1313+ },
1414+ onPressedChange: {
1515+ type: { type: 'function', definition: '(pressed: boolean) => void' },
1616+ description: 'A callback invoked when the pressed state changes.'
1717+ },
1818+ variant: {
1919+ type: { type: 'enum', definition: "'default'" },
2020+ description: 'The visual variant of the toggle.',
2121+ default: "'default'"
2222+ },
2323+ size: {
2424+ type: { type: 'enum', definition: "'default' | 'sm' | 'lg'" },
2525+ description: 'The size of the toggle.',
2626+ default: "'default'"
2727+ },
2828+ disabled: {
2929+ type: 'boolean',
3030+ description: 'Whether the toggle is disabled.',
3131+ default: 'false'
3232+ },
3333+ class: {
3434+ type: 'string',
3535+ description: 'Additional CSS classes to apply.'
3636+ },
3737+ ref: {
3838+ type: 'HTMLElement',
3939+ description: 'The underlying DOM element.',
4040+ bindable: true
4141+ }
4242+ }
4343+ }
4444+] satisfies APISchema[];
+10
apps/docs/src/lib/docs/core/toggle/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'toggle',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://bits-ui.com/docs/components/toggle',
1616+ label: 'bits-ui toggle',
1717+ package: 'bits-ui',
1818+ component: 'Toggle'
1919+ }
2020+ ]
1121};
+74
apps/docs/src/lib/docs/core/tooltip/api.ts
···11+import type { APISchema } from '$lib/types/schema';
22+33+export default [
44+ {
55+ title: 'Tooltip',
66+ description: 'A popup that displays information related to an element when it receives keyboard focus or the mouse hovers over it. Built on top of the bits-ui Tooltip primitive.',
77+ props: {
88+ open: {
99+ type: 'boolean',
1010+ description: 'Whether the tooltip is open.',
1111+ default: 'false',
1212+ bindable: true
1313+ },
1414+ text: {
1515+ type: 'string',
1616+ description: 'Simple text content for the tooltip. Use this for plain text tooltips.'
1717+ },
1818+ content: {
1919+ type: 'Snippet',
2020+ description: 'A snippet for custom tooltip content. Use this instead of text for rich content.'
2121+ },
2222+ child: {
2323+ type: 'Snippet',
2424+ description: 'A snippet for custom trigger rendering. The trigger element that the tooltip is anchored to.'
2525+ },
2626+ withContext: {
2727+ type: 'boolean',
2828+ description: 'Whether to use a context menu-style tooltip (right-click triggered).',
2929+ default: 'false'
3030+ },
3131+ triggerProps: {
3232+ type: 'Tooltip.TriggerProps',
3333+ description: 'Additional props to pass to the underlying Tooltip.Trigger component.'
3434+ },
3535+ contentProps: {
3636+ type: 'Tooltip.ContentProps',
3737+ description: 'Additional props to pass to the underlying Tooltip.Content component (positioning, collision, etc.).'
3838+ },
3939+ onOpenChange: {
4040+ type: { type: 'function', definition: '(open: boolean) => void' },
4141+ description: 'A callback invoked when the open state changes.'
4242+ },
4343+ onOpenChangeComplete: {
4444+ type: { type: 'function', definition: '(open: boolean) => void' },
4545+ description: 'A callback invoked after the open/close transition completes.'
4646+ },
4747+ disabled: {
4848+ type: 'boolean',
4949+ description: 'Whether the tooltip is disabled.',
5050+ default: 'false'
5151+ },
5252+ delayDuration: {
5353+ type: 'number',
5454+ description: 'The delay in milliseconds before the tooltip opens on hover.',
5555+ default: '700'
5656+ },
5757+ disableHoverableContent: {
5858+ type: 'boolean',
5959+ description: 'Whether hovering over the tooltip content keeps it open.',
6060+ default: 'false'
6161+ },
6262+ disableCloseOnTriggerClick: {
6363+ type: 'boolean',
6464+ description: 'Whether clicking the trigger closes the tooltip.',
6565+ default: 'false'
6666+ },
6767+ ignoreNonKeyboardFocus: {
6868+ type: 'boolean',
6969+ description: 'Whether to ignore non-keyboard focus events (e.g. mouse focus).',
7070+ default: 'false'
7171+ }
7272+ }
7373+ }
7474+] satisfies APISchema[];
+10
apps/docs/src/lib/docs/core/tooltip/index.ts
···11import Docs from './Documentation.md';
22import Example from './Example.svelte';
33import Card from './Card.svelte';
44+import api from './api';
4556export default {
67 slug: 'tooltip',
···89 docs: Docs,
910 example: Example,
1011 card: Card,
1212+ api,
1313+ sources: [
1414+ {
1515+ href: 'https://bits-ui.com/docs/components/tooltip',
1616+ label: 'bits-ui tooltip',
1717+ package: 'bits-ui',
1818+ component: 'Tooltip'
1919+ }
2020+ ]
1121};