diff --git a/package-lock.json b/package-lock.json index 483e288..fafa251 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3856,6 +3856,12 @@ "@types/estree": "*" } }, + "node_modules/@types/flexsearch": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/@types/flexsearch/-/flexsearch-0.7.6.tgz", + "integrity": "sha512-H5IXcRn96/gaDmo+rDl2aJuIJsob8dgOXDqf8K0t8rWZd1AFNaaspmRsElESiU+EWE33qfbFPgI0OC/B1g9FCA==", + "license": "MIT" + }, "node_modules/@types/hast": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", @@ -6467,6 +6473,34 @@ "dev": true, "license": "ISC" }, + "node_modules/flexsearch": { + "version": "0.8.212", + "resolved": "https://registry.npmjs.org/flexsearch/-/flexsearch-0.8.212.tgz", + "integrity": "sha512-wSyJr1GUWoOOIISRu+X2IXiOcVfg9qqBRyCPRUdLMIGJqPzMo+jMRlvE83t14v1j0dRMEaBbER/adQjp6Du2pw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/ts-thomas" + }, + { + "type": "paypal", + "url": "https://www.paypal.com/donate/?hosted_button_id=GEVR88FC9BWRW" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/flexsearch" + }, + { + "type": "patreon", + "url": "https://patreon.com/user?u=96245532" + }, + { + "type": "liberapay", + "url": "https://liberapay.com/ts-thomas" + } + ], + "license": "Apache-2.0" + }, "node_modules/for-each": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", @@ -12574,8 +12608,10 @@ "name": "@baukasten/website", "version": "0.2.6", "dependencies": { + "@types/flexsearch": "^0.7.6", "baukasten-ui": "*", "baukasten-ui-web-wrapper": "*", + "flexsearch": "^0.8.212", "next": "^16.1.2", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/packages/website/next.config.js b/packages/website/next.config.js index 86464cc..4c073c8 100644 --- a/packages/website/next.config.js +++ b/packages/website/next.config.js @@ -7,6 +7,9 @@ const nextConfig = { styledComponents: true, }, transpilePackages: ['baukasten-ui', 'baukasten-ui-web-wrapper'], + env: { + NEXT_PUBLIC_BASE_PATH: '/baukasten', + }, } module.exports = nextConfig diff --git a/packages/website/package.json b/packages/website/package.json index 2fd7a44..61eb3ed 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -3,14 +3,17 @@ "version": "0.2.6", "private": true, "scripts": { - "dev": "next dev", - "build": "next build", + "dev": "npm run build:search && next dev", + "build": "npm run build:search && next build", + "build:search": "npx tsx scripts/build-search-index.ts", "start": "next start", "lint": "next lint" }, "dependencies": { + "@types/flexsearch": "^0.7.6", "baukasten-ui": "*", "baukasten-ui-web-wrapper": "*", + "flexsearch": "^0.8.212", "next": "^16.1.2", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/packages/website/public/search-index.json b/packages/website/public/search-index.json new file mode 100644 index 0000000..e0f2b90 --- /dev/null +++ b/packages/website/public/search-index.json @@ -0,0 +1,1283 @@ +[ + { + "id": "/components/accordion", + "title": "Accordion", + "description": "A collapsible content panel component for organizing information in expandable sections.", + "content": "Baukasten is a React component library for building VSCode webview UIs. It speeds up development by providing ready-to-use components. Install via npm: npm install baukasten-ui Content for section 1 Content for section 2 Content for section 3 Optimized for performance with minimal re-renders. Automatic theme synchronization with VSCode. Built with accessibility in mind with ARIA support. Configure general application settings. Manage notification preferences. Security and authentication settings. Settings content Notification settings New Features Check out the latest features added to Baukasten. Bug Fixes Fixed Several critical bugs have been resolved. Experimental Beta Try out experimental features in beta. Content here This feature is available and ready to use. This feature is under development. This feature is in beta testing. This feature will be removed soon. Available content Coming soon content Follow these steps to install Baukasten: Install: Import components in your app Add GlobalStyles to root Each component comes with comprehensive props documentation. Follow these steps: Step 1: install Step 2: Import Step 3: Use Accordion A collapsible content panel component for organizing information in expandable sections. Basic Usage The default accordion allows multiple sections to be open simultaneously. What is Baukasten? Why use Baukasten? How to install? Section 1 Section 2 Section 3 Exclusive Mode In exclusive mode, only one accordion item can be open at a time. performance Performance theming Theming accessibility Accessibility section-1 section-2 section-3 With Icons Add icons to accordion items for better visual communication. General Settings gear Notifications bell Security shield Settings Custom Title Nodes Titles can be any React node, allowing for rich, custom headers with badges and complex layouts. rocket semibold info bug success beaker warning Disabled State Accordion items can be disabled to prevent interaction. Available Feature Coming Soon Feature Beta Feature Deprecated Feature Available Coming Soon Rich Content Accordion content can include rich formatting: lists, code blocks, and styled text. Installation Guide API Reference symbol-method Guide use client exclusive boolean false Whether only one accordion item can be open at a time defaultOpen string undefined Default open item key (for controlled exclusive mode) onAccordionChange Callback when accordion items are toggled title React.ReactNode Title displayed in the accordion header Unique identifier for this item (required for exclusive mode) Whether the item is open by default disabled Whether the item is disabled icon Optional icon to display before the title children Content to display when the accordion item is expanded 100% 500px baukasten-ui 600px flex center var(--bk-gap-md) var(--bk-spacing-2) var(--bk-spacing-4) var(--bk-spacing-3) var(--bk-spacing-1) --- AccordionItem Props: \n \n Content for section 1\n \n \n Content for section 2\n \n \n Content for section 3\n \n \n \n Available content\n \n \n Coming soon content\n \n \n Follow these steps:\n
    \n
  1. Step 1: install
  2. \n
  3. Step 2: Import
  4. \n
  5. Step 3: Use
  6. \n
\n
", + "path": "/components/accordion", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "exclusive", + "defaultopen", + "onaccordionchange", + "title", + "id", + "disabled", + "icon", + "children", + "form", + "list", + "notification", + "badge", + "text", + "paragraph" + ] + }, + { + "id": "/components/alert", + "title": "Alert", + "description": "A prestyled container for displaying important information to users with multiple variants and optional dismissibility.", + "content": "void',\n description: 'Optional callback when the close button is clicked',\n },\n];\n\n\n return ( This is an informational alert that provides helpful information to users. This is an informational alert. This is an informational alert. Use it to provide helpful information to users. Operation completed successfully! Your changes have been saved. Please review your changes before proceeding. This action may have consequences. An error occurred while processing your request. Please try again. This alert includes a title to provide additional context and structure to the message. Your changes have been saved successfully and are now live. This action cannot be undone. Please make sure you want to proceed. Failed to connect to the server. Please check your network connection. This alert can be dismissed by clicking the close button. Success! This alert can also be dismissed. Make sure to save your work before closing this alert. This alert can be dismissed. With callback on close You can override the default icon with any custom icon you prefer. Your application has been successfully deployed to production! This is a brand new feature that just launched. Try it out! We detected a bug in your code. Please review and fix the issue. Custom icon alert Deployment successful! This alert has no icon, providing a more minimal appearance. You can also combine iconless alerts with titles for a clean design. Iconless alerts can still be dismissible with a close button. Alert without icon Minimal design with title Alerts can contain rich structured content including: Multiple paragraphs of text Lists (ordered or unordered) Inline formatting and links Any valid React content Alerts can contain structured content: Lists Multiple paragraphs Inline formatting info success warning error Alert A prestyled container for displaying important information to users with multiple variants and optional dismissibility. Basic Usage The default alert with info variant. Variants Four variants for different types of messages: info, success, warning, and error. With Title Add an optional title for better content organization. Information Success Warning Error Dismissible Alerts can be made dismissible by setting the closable prop. Dismissible Info Important Warning Custom Icons Override the default variant icons with custom icons. lightbulb Tip rocket Launched flame Hot Feature bug Bug Report Without Icons Complex Content Alerts can contain rich structured content including lists and paragraphs. Important Notice use client variant \"info\" | \"success\" | \"warning\" | \"error\" \"info\" Visual variant of the alert title string Optional title/header for the alert children React.ReactNode Content to display in the alert body icon Custom icon to override the default variant icon closable boolean false Whether the alert can be dismissed with a close button onClose Optional callback when the close button is clicked 100% 600px baukasten-ui flex column var(--bk-spacing-3) Alert closed var(--bk-spacing-5) \n This is an informational alert. Use it to provide helpful information to users.\n\n\n Operation completed successfully! Your changes have been saved.\n\n\n Please review your changes before proceeding. This action may have consequences.\n\n\n An error occurred while processing your request. Please try again.\n \n This alert includes a title to provide additional context and structure to the message.\n\n\n\n Your changes have been saved successfully and are now live.\n\n\n\n This action cannot be undone. Please make sure you want to proceed.\n\n\n\n Failed to connect to the server. Please check your network connection.\n 0 0 var(--bk-spacing-2) 0 \n
\n

Alerts can contain structured content:

\n \n
\n
", + "path": "/components/alert", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "variant", + "title", + "children", + "icon", + "closable", + "onclose", + "button", + "form", + "list", + "alert", + "text", + "paragraph" + ] + }, + { + "id": "/components/avatar", + "title": "Avatar", + "description": "A versatile avatar component that displays user images, initials, or a fallback. Supports circular and square shapes with optional tooltips.", + "content": "Circular Square Single name Two names Three names Four names // Shows \"J\" // Shows \"JD\" // Default tooltip (shows name) // No tooltip Team Members Project Team (Square) User Profile Sarah Johnson Senior Software Engineer ))} circular square Avatar A versatile avatar component that displays user images, initials, or a fallback. Supports circular and square shapes with optional tooltips. Basic Usage The default avatar displays initials from the name prop when no image is provided. John Doe With Image When an image URL is provided via the src prop, it displays the image instead of initials. Jane Smith https://i.pravatar.cc/150?img=1 Sizes Five size options from extra small to extra large. Shapes Avatars can be circular (default) or square. With Images - Different Shapes Images work with both circular and square shapes. All Sizes with Images Images scale properly across all size variants. User 1 https://i.pravatar.cc/150?img=2 User 2 https://i.pravatar.cc/150?img=3 User 3 https://i.pravatar.cc/150?img=4 User 4 https://i.pravatar.cc/150?img=5 User 5 https://i.pravatar.cc/150?img=6 Initials Generation Initials are automatically extracted from the first and last name. Single names show only one initial. John John Michael Doe María José García López Custom Tooltips Customize the tooltip content or disable it entirely. By default, the tooltip shows the name. CEO & Founder Senior Developer https://i.pravatar.cc/150?img=11 Bob Johnson Product Manager Alice Williams ... Avatar Group Common pattern for displaying multiple avatars together. https://i.pravatar.cc/150?img=7 https://i.pravatar.cc/150?img=8 https://i.pravatar.cc/150?img=9 https://i.pravatar.cc/150?img=10 Charlie Brown Sarah Connor Kyle Reese John Connor User Profile Example Combine avatars with other components for rich user interfaces. https://i.pravatar.cc/150?img=12 Team List Example Use avatars in lists to represent team members or users. use client name string Full name of the person (used for initials and tooltip) src Image URL to display. When not provided, initials from name will be shown alt Alt text for the image size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the avatar shape \"circular\" | \"square\" \"circular\" Shape of the avatar tooltip Tooltip content to display on hover. When not provided, name will be used if available showTooltip boolean true Whether to show tooltip baukasten-ui flex var(--bk-spacing-4) center var(--bk-spacing-8) column var(--bk-spacing-2) var(--bk-font-size-sm) var(--bk-color-foreground-muted) var(--bk-spacing-3) wrap var(--bk-font-size-xs) var(--bk-spacing-6) var(--bk-font-size-base) var(--bk-font-weight-semibold) var(--bk-color-background-secondary) var(--bk-radius-lg) 400px 300px Team Lead Emily Chen Frontend Developer Michael Brown Backend Developer Anna White Designer var(--bk-font-weight-medium) \n\n\n\n \n \n\n \n\n\n\n // Shows \"J\"\n // Shows \"JD\"\n // Shows \"JD\"\n // Shows \"ML\"", + "path": "/components/avatar", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "name", + "src", + "alt", + "size", + "shape", + "tooltip", + "showtooltip", + "list", + "text" + ] + }, + { + "id": "/components/badge", + "title": "Badge", + "description": "A small status indicator or label component with multiple variants and sizes.", + "content": "Default Badge Default Success Warning Error Info Extra Small Small Medium Large Extra Large Completed Pending Failed // Icons scale with badge size Large Badge Build Status: Passing Deployment: In Progress API Status: Offline Coverage: 85% Notifications Inbox Tasks Issues TypeScript React Design System UI Components VSCode Open Source XS Success SM Warning MD Error LG Info XL Default default success warning error info Badge A small status indicator or label component with multiple variants and sizes. Basic Usage The default badge with neutral styling. Variants Five semantic variants for different states and contexts. Sizes Five size options from extra small to extra large. Outline Style Transparent backgrounds with colored borders for a lighter visual weight. Default Outline Success Outline Warning Outline Error Outline Info Outline With Icons Badges support icons for enhanced visual communication. Icons automatically scale with badge size. check close Icon Only Badges can contain only icons for compact displays. Status Indicators Common pattern for displaying status information. Counters & Notifications Use badges as notification counters or numeric indicators. Tags & Labels Use default badges as content tags or category labels. Mixed Combinations Combine variants, sizes, and outline styles for different use cases. bug use client children React.ReactNode Content to display in the badge variant \"default\" | \"success\" | \"warning\" | \"error\" | \"info\" \"default\" Visual variant of the badge size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the badge outline boolean false Whether to render the badge with an outline style baukasten-ui flex var(--bk-spacing-4) center wrap column var(--bk-spacing-3) var(--bk-font-size-md) 120px var(--bk-spacing-2) Default\nSuccess\nWarning\nError\nInfo Extra Small\nSmall\nMedium\nLarge\nExtra Large Default\nSuccess\nWarning\nError\nInfo \n \n Completed\n\n\n\n \n Pending\n\n\n// Icons scale with badge size\n\n \n Large Badge\n \n \n\n\n\n \n
\n Build Status:\n Passing\n
\n\n
\n Deployment:\n In Progress\n
\n Notifications\n 12\n
\n\n
\n Inbox\n 42\n
TypeScript\nReact\nDesign System\nUI Components XS Success\nSM Warning\n\n \n MD Error\n\n\n \n LG Info\n", + "path": "/components/badge", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "children", + "variant", + "size", + "outline", + "form", + "notification", + "badge", + "icon", + "text" + ] + }, + { + "id": "/components/breadcrumbs", + "title": "Breadcrumbs", + "description": "A navigation component that shows the user", + "content": "File Explorer Click any breadcrumb to navigate back to that location );\n}\n\n\n return ( Default Variant Pill Variant // Pill variant (with background) ))} Default (/) Greater Than (›) Arrow (→) Chevron Icon // Icon separator },\n]; Full Path (7 items) Collapsed to 4 items Collapsed to 3 items // Show first item + last 3 items // Show first item + last 2 items Last clicked: );\n })()} Accessibility Uses semantic HTML with <nav> and <ol> elements Includes aria-label on the navigation (default: \"Breadcrumb\") Current page marked with aria-current=\"page\" Separators are marked with aria-hidden=\"true\" to prevent announcement Links and buttons are keyboard accessible and support standard navigation Behavior Notes The last item (current page) is rendered as plain text by default Items with href are rendered as <a> links Items with only onClick (no href) are rendered as <button> When using maxItems , the first item and last N-1 items are always shown The ellipsis (...) represents collapsed items and is not interactive default pill Breadcrumb home folder folder-opened file-code chevron-right Breadcrumbs A navigation component that shows the user's current location within the application hierarchy. Supports custom separators, sizing, icons, and automatic item collapsing for long paths. Basic Usage Breadcrumbs display a hierarchical navigation path. Each item has a label and can optionally have an href for navigation. The last item (current page) is not clickable by default. Variants Two visual variants are available: default (minimal text links) and pill (rounded background badges). The pill variant provides more visual prominence. Sizes Five size options are available: xs, sm, md (default), lg, and xl. Choose the size that best fits your UI hierarchy. Custom Separators Customize the separator between breadcrumb items. You can use text, symbols, or icon components. With Icons Add icons to breadcrumb items for better visual recognition. Icons are displayed before the label text and are particularly useful for file system navigation or categorized content. settings-gear Collapsed Items Use maxItems to collapse long breadcrumb paths. Middle items are replaced with an ellipsis (...), showing the first item and the last N-1 items. This is useful for deep hierarchies to prevent horizontal overflow. With Click Handlers Use onClick handlers for client-side routing (e.g., React Router, Next.js). Click handlers work whether or not an href is provided. Pill Variant with Icons Combine the pill variant with icons and custom separators for a more prominent navigation display. Great for modern app interfaces. file markdown Interactive File Browser Real-world example showing breadcrumbs in a file browser interface with click navigation. Click any breadcrumb to navigate to that level. page true use client items BreadcrumbItem[] Array of breadcrumb items to display variant \"default\" | \"pill\" \"default\" Visual variant of the breadcrumbs separator React.ReactNode \"/\" Custom separator between breadcrumb items (can be text or icon) size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the breadcrumbs number Maximum number of items to display. When exceeded, middle items will be collapsed with an ellipsis className string Additional CSS class name ariaLabel \"Breadcrumb\" Aria label for accessibility label Display text for the breadcrumb item Optional href for navigation. If provided, the item will be rendered as a clickable link Optional click handler icon Optional icon element to display before the label Home Products /products Electronics /products/electronics Laptops workspace /workspace src /workspace/src components /workspace/src/components Breadcrumbs.tsx Root Projects /projects Web Development /projects/web React Apps /projects/web/react Components /projects/web/react/components UI Library /projects/web/react/components/ui flex column var(--bk-spacing-4) var(--bk-spacing-5) var(--vscode-textBlockQuote-background) var(--bk-radius-md) 500px center space-between var(--bk-spacing-3) 1px solid var(--vscode-panel-border) var(--vscode-input-background) var(--bk-radius-sm) var(--bk-font-size-sm) var(--vscode-descriptionForeground) , href: , flexDirection: , gap: , alignItems: , fontWeight: , color: , maxWidth: , width: , minWidth: ,\n backgroundColor: ,\n borderRadius: ,\n fontSize: ,\n workspace: ,\n src: ,\n components: , type: , description: ,\n padding: ,\n backgroundColor: ,\n borderRadius: ,\n lineHeight: 1.6,\n color: ,\n marginLeft: BreadcrumbItem Interface:", + "path": "/components/breadcrumbs", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "items", + "variant", + "separator", + "size", + "maxitems", + "classname", + "arialabel", + "label", + "href", + "onclick", + "icon", + "button", + "input", + "badge", + "text", + "heading" + ] + }, + { + "id": "/components/button", + "title": "Button", + "description": "A versatile button component with multiple variants and sizes for various use cases.", + "content": "void',\n description: 'Click event handler',\n },\n];\n\n\n return ( Click me Primary Secondary Ghost Link Disabled Block Width (100%) Wide Button Auto Width primary secondary ghost link block wide Button A versatile button component with multiple variants and sizes for various use cases. Basic Usage The default button with primary variant. Variants Buttons come in four variants: primary, secondary, ghost, and link. Sizes Five size options from extra small to extra large. Extra Small Small Medium Large Extra Large Disabled State Buttons can be disabled to prevent interaction. Primary Disabled Secondary Disabled Outline Style Buttons can be rendered with an outline style, featuring transparent backgrounds with colored borders. Primary Outline Secondary Outline Ghost Outline Circular Buttons Circular buttons are perfect for icon-only actions. They maintain a 1:1 aspect ratio. Primary Circular Secondary Circular Ghost Circular Outline Circular Width Options Control button width with block (100%), wide (minimum width), or auto (default). use client variant \"primary\" | \"secondary\" | \"ghost\" | \"link\" \"primary\" Visual style variant of the button size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the button width \"block\" | \"wide\" undefined Width behavior: block (100%), wide (120px min), or auto (default) outline boolean false Whether to render with outline style (inverted colors) circular Whether to render as a circle (useful for icon-only buttons) disabled Whether the button is disabled children React.ReactNode The content of the button onClick Click event handler baukasten-ui flex column var(--bk-spacing-3) 100% \n\n\n \n\n\n\n \n \n\n \n\n\n", + "path": "/components/button", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "variant", + "size", + "width", + "outline", + "circular", + "disabled", + "children", + "onclick", + "button", + "icon" + ] + }, + { + "id": "/components/buttongroup", + "title": "ButtonGroup", + "description": "Groups buttons together with connected styling. Useful for creating toolbars, segmented controls, and split buttons. Supports a compositional API where buttons can be grouped naturally or combined with ButtonGroup.Dropdown for split button patterns.", + "content": "Save Save As... Save All Export Action Option 1 Option 2 Option 3 );\n}\n\n\n return ( Cut Copy Paste Bold Italic Underline Left Center Right // Secondary variant // Ghost variant ))} Day Week Month Without Separators (Default) List Grid Columns With Separators Outline With Separators // With separators Deploy Production Staging Development // With icon 1 / 10 // Icon-only circular buttons // Pagination with icons Previous Next Cancel Apply Year // Disabled split button ... Text Formatting Toolbar View Switcher (Segmented Control) Pagination Control Page 1 of 10 Zoom Controls 100% // View switcher (segmented control) // Pagination control // Zoom controls Split Button Pattern Primary action: Place the most common action as the first button Secondary actions: Related or alternative actions go in the dropdown menu Variant matching: Always match the dropdown variant with the button variant for visual consistency Menu content: Use Menu component with MenuItem for dropdown content Accessibility Each button maintains its own focus state and keyboard navigation Dropdown trigger has proper aria-expanded aria-haspopup=\"menu\" , and aria-label attributes Dropdown closes on Escape key and click outside Disabled buttons and dropdowns have proper disabled attribute and cannot receive focus Best Practices Related actions: Only group buttons with related or mutually exclusive actions Consistent styling: Use the same variant, size, and outline for all buttons in a group Button count: Limit to 2-5 buttons per group. More than 5 becomes cluttered Separators: Use sparingly, only when buttons need clear visual separation Full width: Use for modal actions, forms, or when buttons should be equally emphasized Icons: Use icon-only buttons for toolbars, mix with text for primary actions bottom-start bottom-end top-start top-end primary Open dropdown save save-as save-all export secondary ButtonGroup Groups buttons together with connected styling. Useful for creating toolbars, segmented controls, and split buttons. Supports a compositional API where buttons can be grouped naturally or combined with ButtonGroup.Dropdown for split button patterns. Basic Usage Group related buttons together to create a unified control. All buttons maintain their individual variant and size properties. Variants Button groups work with all button variants. Set the variant explicitly on each button for consistent styling within the group. ghost Sizes Five size options available: xs, sm, md (default), lg, and xl. Set the size explicitly on each button for consistent sizing. Outline Style Outline button groups have transparent backgrounds with colored borders. They fill with solid color on hover. Use showSeparator to add visible separator lines between buttons. Works well with outline buttons and segmented controls. Use ButtonGroup.Dropdown as the last child to create a split button pattern. The dropdown variant should match the main button for consistent styling. rocket With Icons Button groups work great with icons for toolbars and controls. Mix text with icons, use icon-only buttons, or create icon-based navigation. bold italic file-text layout-panel-left layout-centered layout-panel-right chevron-left chevron-right Full Width Use the fullWidth prop to make button groups span the full width of their container. Each button automatically gets equal width. Disabled State Individual buttons can be disabled within a group. You can also disable the dropdown trigger in split button patterns. Controlled Dropdown Control the dropdown open state programmatically for advanced use cases. Use the open and onOpenChange props for controlled mode. Real-World Examples Common use cases showing how ButtonGroup is used in practice. zoom-out zoom-in menu use client fullWidth boolean false Whether the button group should take full width showSeparator Whether to show separator lines between buttons content React.ReactNode Content to display in the dropdown menu placement \"bottom-start\" | \"bottom-end\" | \"top-start\" | \"top-end\" \"bottom-end\" Placement of the dropdown relative to the trigger closeOnClick true Whether to close the dropdown when clicking inside it open Whether the dropdown is open (controlled mode) onOpenChange Callback when the dropdown open state changes Whether the dropdown trigger is disabled variant ButtonVariant \"primary\" Visual style variant of the dropdown button size Size \"md\" Size of the dropdown button outline Whether to render with outline style icon Custom icon for the dropdown trigger (default: chevron-down) ariaLabel string \"Open dropdown\" Aria label for the dropdown trigger button Action clicked var(--bk-spacing-2) var(--bk-font-size-sm) var(--vscode-descriptionForeground) closed baukasten-ui flex column var(--bk-spacing-4) flex-start var(--bk-spacing-5) var(--bk-font-weight-medium) Save clicked Deploy clicked react var(--bk-spacing-6) var(--vscode-textBlockQuote-background) var(--bk-radius-md) var(--bk-spacing-3) // Primary variant\n\n \n \n \n\n\n// Secondary variant\n\n \n \n \n\n\n// Ghost variant\n\n \n \n \n \n \n \n \n\n\n\n \n \n \n\n\n\n \n \n \n \n \n \n \n\n\n\n \n \n \n // Without separators (default)\n\n \n \n \n\n\n// With separators\n\n \n \n \n // Text with icons\n\n \n \n\n\n// Icon-only circular buttons\n\n \n \n \n\n\n// Pagination with icons\n\n \n \n \n \n \n \n\n\n\n \n \n \n\n\n\n \n \n \n \n // Text formatting toolbar\n\n \n \n \n\n\n// View switcher (segmented control)\n\n \n \n \n\n\n// Pagination control\n\n \n \n \n\n\n// Zoom controls\n\n \n \n \n", + "path": "/components/buttongroup", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "fullwidth", + "showseparator", + "content", + "placement", + "closeonclick", + "open", + "onopenchange", + "disabled", + "variant", + "size", + "outline", + "icon", + "arialabel", + "button", + "modal", + "form", + "list", + "menu", + "text", + "heading" + ] + }, + { + "id": "/components/checkbox", + "title": "Checkbox", + "description": "A versatile checkbox component that supports both traditional checkbox and toggle switch styles, with full accessibility support.", + "content": "item.checked) && !allChecked;\n\n const handleSelectAll = (e: React.ChangeEvent Select all items ))} );\n}\n\n\n return ( Accept terms and conditions Checkbox variant Switch variant Checkbox Sizes Extra Small Small Medium Large Extra Large Switch Sizes Medium (default) Large Switch Checkbox States Unchecked Checked Indeterminate Disabled unchecked Disabled checked Switch States // Checked // Indeterminate (checkbox only) // Disabled Disabled This is a very long label that will wrap to multiple lines and maintain proper alignment with the checkbox. The text wraps naturally below the first line. This switch has a long label that demonstrates how multiline text is handled. Notice how the text wraps and stays aligned naturally. This is a very long label that will wrap to \n multiple lines and maintain proper alignment. Notification Preferences Email notifications Push notifications SMS notifications Display Settings Dark mode Compact view Show line numbers checkbox switch Checkbox A versatile checkbox component that supports both traditional checkbox and toggle switch styles, with full accessibility support. Basic Usage Checkboxes should be used with the Label component for proper accessibility. Use the checkbox variant for Label. Variants Two variants available: traditional checkbox and toggle switch. Sizes Five size options from extra small to extra large. Label font size automatically scales with checkbox size. States Multiple states: unchecked, checked, indeterminate, and disabled. Controlled Component Use React state to control the checkbox. The checkbox updates the label text based on its state. Indeterminate State The indeterminate state is useful for 'select all' functionality. When some but not all items are selected, the parent checkbox shows a horizontal line. Multiline Labels Labels automatically wrap and maintain proper alignment with the checkbox. Form Example Real-world example demonstrating checkboxes and switches in a settings form. use client variant \"checkbox\" | \"switch\" \"checkbox\" Visual style variant: traditional checkbox or toggle switch size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the checkbox checked boolean Whether the checkbox is checked (controlled) defaultChecked Initial checked state (uncontrolled) indeterminate false Whether the checkbox is in an indeterminate state (partially checked) disabled Whether the checkbox is disabled onChange Callback fired when the checked state changes flex column var(--bk-spacing-4) unchecked off Item 1 Item 2 Item 3 var(--bk-spacing-3) var(--bk-spacing-6) var(--bk-spacing-2) baukasten-ui var(--bk-spacing-8) wrap 250px var(--bk-font-size-sm) react select all 400px var(--vscode-sideBar-background) 1px solid var(--vscode-panel-border) var(--bk-radius-md) var(--bk-font-size-base) 1px var(--vscode-panel-border) var(--bk-spacing-2) 0 \n\n \n\n\n\n // Unchecked\n\n\n// Checked\n\n\n// Indeterminate (checkbox only)\n\n\n// Disabled\n
\n

Notification Preferences

\n \n \n\n

Display Settings

\n \n \n
", + "path": "/components/checkbox", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "variant", + "size", + "checked", + "defaultchecked", + "indeterminate", + "disabled", + "onchange", + "input", + "form", + "notification", + "text" + ] + }, + { + "id": "/components/contextmenu", + "title": "ContextMenu", + "description": "A context menu that appears on right-click, positioned at the cursor with automatic viewport detection.", + "content": "('No action yet');\n\tconst [liked, setLiked] = useState(false);\n\tconst [bookmarked, setBookmarked] = useState(false);\n\n\treturn ( Last Action: Liked: | Bookmarked: Copy Paste Delete Right-click for interactive actions! Watch the status update above );\n}\n\n\n\treturn ( Edit Right-click me! Undo Redo Cut Right-click for editor actions Right-click me New File New Folder VS Code Terminal Browser Email Copy Link Twitter LinkedIn Facebook Properties Right-click for file actions New Create Document Syncing Sync Changes Selected Item Disabled Action Archive Right-click for advanced menu ))} Large menu items Right-click for actions On Text Content Copy Text Search Right-click on this paragraph On List Items Rename Duplicate Reveal in Explorer app.tsx TypeScript React Component copy Ctrl+C clippy Ctrl+V trash Del ContextMenu A context menu that appears on right-click, positioned at the cursor with automatic viewport detection. Basic Usage Right-click on the box to open a context menu with common actions. edit With Keyboard Shortcuts Display keyboard shortcuts on the right side of menu items using the rightContent prop. discard Ctrl+Z redo Ctrl+Y Ctrl+X With Submenus Create nested menus using the SubMenu component. Submenus can be infinitely nested. file folder Open With folder-opened code terminal browser Share share mail link Social Media globe gear With Badges and States Use badges to show status or counts, and selected/disabled states for menu items. info sync warning check archive default Sizes Five size options from extra small to extra large. With Click Handlers Handle menu item clicks with onClick handlers. The menu automatically closes after clicking an item. Different Triggers Context menus work on any element: text, images, cards, list items, etc. search File Explorer Example Real-world example of a file explorer context menu with all features. Ctrl+N Ctrl+Shift+N go-to-file Ctrl+P file-code use client children React.ReactElement The content that triggers the context menu (will capture right-click events) menu React.ReactNode The menu content to display (MenuItem, MenuDivider, SubMenu, etc.) size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of menu items disabled boolean false Whether the context menu is disabled onOpen Callback when the context menu opens onClose Callback when the context menu closes var(--bk-spacing-8) var(--vscode-sideBar-background) 2px dashed var(--vscode-panel-border) var(--bk-radius-md) center context-menu none No action yet var(--bk-spacing-4) var(--vscode-editor-background) 1px solid var(--vscode-panel-border) var(--bk-font-size-sm) var(--bk-spacing-1) Yes Copied Pasted heart-filled heart Unliked Liked Unlike Like check-all bookmark Unbookmarked Bookmarked Remove Bookmark Bookmark Deleted var(--bk-font-size-xs) var(--vscode-descriptionForeground) var(--bk-spacing-2) baukasten-ui flex wrap react column Item 1 Item 2 Item 3 var(--bk-radius-sm) var(--bk-spacing-3)", + "path": "/components/contextmenu", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "children", + "menu", + "size", + "disabled", + "onopen", + "onclose", + "list", + "badge", + "icon", + "text", + "paragraph" + ] + }, + { + "id": "/components/datatable", + "title": "DataTable", + "description": "A powerful, feature-rich table component built on TanStack Table (React Table v8). Supports sorting, pagination, row selection, column resizing, global filtering, and more. Fully integrates with the Baukasten design system.", + "content": ";\n },\n },\n];\n\n// Custom columns with alignment\nconst customColumns: ColumnDef Edit ([]);\n\n return ( Current Sort: [\n createSelectColumn (),\n ...basicColumns,\n ], []);\n\n const selectedCount = Object.keys(rowSelection).length;\n\n return ( Selected: 0 && ( Clear );\n}\n\n\n return ( [\n createSelectColumn ([]);\n\n return ( ,\n enableSorting: false,\n },\n]; Line Indicator (Default) Spinner Overlay // Spinner overlay Custom Empty Text Custom Empty Component No Data Found Add some users to get started Add User // Custom empty component ))} TanStack Table Integration Column definitions: Use TanStack Table's ColumnDef type for full type safety Flexible rendering: Use cell property to render any React component in cells Meta information: meta.align to set column alignment Helper functions: createSelectColumn() to easily add checkbox column Accessibility Uses semantic <table> <thead> <tbody> elements Sortable columns are keyboard accessible with proper ARIA attributes Checkboxes have appropriate aria-label attributes Pagination buttons have attributes for screen readers prop to provide accessible label for the entire table Best Practices Simple vs DataTable: Use basic Table component for simple static data, DataTable for complex features Pagination: Always enable pagination for datasets with more than 20 rows Row ID: Provide getRowId when using row selection to ensure stable row identity Server-side: manualPagination with rowCount for server-side pagination Column sizing: Set initial size in column definitions when using column resizing Loading states: Use line indicator for quick loads, spinner overlay for longer operations Sticky headers: Combine with maxHeight for tables with many rows default zebra onChange Search... line spinner No data available ghost DataTable A powerful, feature-rich table component built on TanStack Table (React Table v8). Supports sorting, pagination, row selection, column resizing, global filtering, and more. Fully integrates with the Baukasten design system. Basic Usage Define columns using TanStack Table's column definition format, then pass your data and columns to the DataTable component. With Sorting Enable sorting by setting enableSorting prop. Click column headers to sort. Sorting state is managed internally by default. With Pagination Enable pagination with customizable page sizes. Perfect for large datasets. Row Selection Use createSelectColumn() to add a checkbox column for row selection. Track selected rows with rowSelection state. Global Filter (Search) Enable global filtering to search across all columns. The search input appears in a toolbar above the table. Search users... Controlled Sorting Control sorting state externally for integration with external state management or URL parameters. Custom Cell Rendering Use the cell property in column definitions to customize cell rendering. Use meta.align to control column alignment. Column Resizing Enable column resizing by dragging column edges. Set initial column widths with the size property in column definitions. Sticky Header Use stickyHeader with maxHeight to create a scrollable table with a fixed header that stays visible when scrolling. Loading States Show loading indicator while data is being fetched. Choose between line indicator (default) or spinner overlay. Empty State Customize the empty state message or component when no data is available. No users found. Try adjusting your filters. Sizes Five size options available: xs, sm, md (default), lg, and xl. Size affects padding and font size of cells. use client data TData[] Data array to display columns ColumnDef[] Column definitions (TanStack Table format) variant \"default\" | \"zebra\" \"default\" Visual variant of the table \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of table cells bordered boolean true Whether to show borders enableRowSelection false Enable row selection enableMultiRowSelection Enable multi-row selection rowSelection RowSelectionState Controlled row selection state onRowSelectionChange Callback when row selection changes enableSorting Enable sorting enableMultiSort Enable multi-column sorting sorting SortingState Controlled sorting state onSortingChange Callback when sorting changes enablePagination Enable pagination pageSizeOptions number[] [10, 20, 50, 100] Page size options for pagination initialPageSize number Initial page size pagination PaginationState Controlled pagination state onPaginationChange Callback when pagination changes Total row count (for server-side pagination) Enable manual pagination (server-side) enableColumnResizing Enable column resizing columnResizeMode ColumnResizeMode \"onChange\" Column resize mode enableGlobalFilter Enable global filtering globalFilter string Global filter value onGlobalFilterChange Callback when global filter changes globalFilterPlaceholder \"Search...\" Placeholder for global filter input stickyHeader Whether the table has sticky headers number | string Max height for scrollable table loading Whether the table is loading loadingIndicator \"line\" | \"spinner\" \"line\" Loading indicator style loadingComponent React.ReactNode Custom loading component emptyText \"No data available\" Empty state text emptyComponent Custom empty state component Row ID accessor (for selection state) onRowClick Callback when a row is clicked active inactive pending Admin Developer Designer Manager Engineering Design Marketing Sales name Name email Email role Role status Status success warning User var(--bk-font-weight-medium) var(--bk-font-size-xs) var(--vscode-descriptionForeground) department Department center actions Actions right flex var(--bk-spacing-1) flex-end var(--bk-spacing-3) var(--bk-spacing-2) var(--vscode-textBlockQuote-background) var(--bk-radius-md) desc asc None , header: ,\n header: column var(--bk-spacing-5) var(--bk-font-size-sm) var(--bk-spacing-6) var(--bk-font-size-3xl) 24px 2rem 8px medium 4px 14px 12px var(--bk-spacing-4) (default) , padding: , backgroundColor: , borderRadius: , lineHeight: 1.6, color: , marginLeft:", + "path": "/components/datatable", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "data", + "columns", + "variant", + "size", + "bordered", + "enablerowselection", + "enablemultirowselection", + "rowselection", + "onrowselectionchange", + "enablesorting", + "enablemultisort", + "sorting", + "onsortingchange", + "enablepagination", + "pagesizeoptions", + "initialpagesize", + "pagination", + "onpaginationchange", + "rowcount", + "manualpagination", + "enablecolumnresizing", + "columnresizemode", + "enableglobalfilter", + "globalfilter", + "onglobalfilterchange", + "globalfilterplaceholder", + "stickyheader", + "maxheight", + "loading", + "loadingindicator", + "loadingcomponent", + "emptytext", + "emptycomponent", + "getrowid", + "onrowclick", + "button", + "input", + "form", + "table", + "badge", + "text", + "heading" + ] + }, + { + "id": "/components/divider", + "title": "Divider", + "description": "A simple component for creating visual separation between content sections with support for labels and multiple styles.", + "content": ");\n\n\n return ( This is some content above the divider. This is content below the divider. Content above Content below Sign in with your existing account Create a new account to get started Content before section Follow these steps to begin. This is the main content. More content after centered divider. Content continues here. This is the final section. Solid (default) Content above solid divider Content below solid divider Dashed Content above dashed divider Content below dashed divider Dotted Content above dotted divider Content below dotted divider Left content Right content Button 1 Button 2 Button 3 // Between buttons (requires height on parent) Content with minimal spacing Very tight spacing (spacing-1) Content with default spacing Default spacing (spacing-4) Content with generous spacing Large spacing (spacing-8) Default border color Uses the theme's border color Primary color divider Stands out with brand color Success color divider Green for positive sections Warning color divider Yellow for caution sections Error color divider Red for important sections Sign In Sign in with Google Sign in with GitHub Email Password Documentation Welcome to our comprehensive documentation. This guide will help you understand\n all the features and capabilities of our platform. Our platform provides a complete solution for building modern web applications.\n It includes everything you need to get started quickly and scale efficiently. To begin, install the package using your preferred package manager. Follow the\n installation guide and you'll be up and running in minutes. The platform offers numerous features including real-time collaboration,\n advanced analytics, seamless integrations, and enterprise-grade security. Now that you understand the basics, explore our API reference and check out\n the example projects to see the platform in action. Welcome to our comprehensive documentation... Our platform provides a complete solution... To begin, install the package... The platform offers numerous features... Now that you understand the basics... horizontal vertical solid dashed dotted left center right var(--bk-spacing-4) Divider A simple component for creating visual separation between content sections with support for labels and multiple styles. Basic Usage The most basic usage - a simple horizontal line separating content. With Label Add a label in the center of the divider. Commonly used for 'OR' in forms. Label Alignment Labels can be aligned left, center (default), or right within the divider. Getting Started Section Break End Border Styles Three border styles available: solid (default), dashed, and dotted. Vertical Orientation Vertical dividers separate content horizontally. Best used in flex containers with a defined height. primary var(--bk-spacing-2) secondary ghost Custom Spacing Control the spacing around dividers using the spacing prop. Default is var(--bk-spacing-4). var(--bk-spacing-1) var(--bk-spacing-8) Custom Colors Customize divider color using the color prop with any valid CSS color or design token. var(--vscode-button-background) var(--vscode-terminal-ansiGreen) var(--vscode-terminal-ansiYellow) var(--vscode-terminal-ansiRed) Form Example Common use case: separating social login buttons from email/password form with an 'OR' divider. block email your@email.com password •••••••• Content Sections Using left-aligned labeled dividers to organize documentation or long-form content into clear sections. Introduction Key Features Next Steps use client orientation \"horizontal\" | \"vertical\" \"horizontal\" Orientation of the divider variant \"solid\" | \"dashed\" | \"dotted\" \"solid\" Border style of the divider line label React.ReactNode Optional label text to display in the divider (horizontal only) labelAlign \"left\" | \"center\" | \"right\" \"center\" Label alignment when label is provided spacing string \"var(--bk-spacing-4)\" Vertical spacing for horizontal or horizontal spacing for vertical dividers color Custom color for the divider line var(--bk-font-size-md) var(--vscode-foreground) 600px baukasten-ui flex column var(--bk-spacing-6) var(--bk-font-size-sm) 100px 40px var(--bk-spacing-3) ,\n padding: ,\n backgroundColor: ,\n border: ,\n borderRadius: , fontSize: , marginBottom: , fontWeight: 700, marginTop: 0, marginBottom: }}>\n To begin, install the package using your preferred package manager. Follow the\n installation guide and you
\n

Sign in with your existing account

\n \n

Create a new account to get started

\n
\n\n \n\n \n\n \n\n\n
\n

Sign In

\n \n \n \n \n \n \n \n Email\n \n \n Password\n \n \n \n
\n

Documentation

\n

Welcome to our comprehensive documentation...

\n\n \n

Our platform provides a complete solution...

\n\n \n

To begin, install the package...

\n\n \n

The platform offers numerous features...

\n\n \n

Now that you understand the basics...

\n
", + "path": "/components/divider", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "orientation", + "variant", + "label", + "labelalign", + "spacing", + "color", + "button", + "input", + "form", + "text", + "paragraph" + ] + }, + { + "id": "/components/dropdown", + "title": "Dropdown", + "description": "A flexible dropdown component that displays custom content when triggered. Perfect for menus, forms, and complex UI patterns.", + "content": "Controlled Dropdown Action 1 Action 2 Action 3 Toggle Open Close Sign In Welcome Back Email Password Forgot password? );\n}\n\n\n return ( Open Menu Edit Copy Paste Delete Bottom Start Below, aligned left Bottom End Below, aligned right Top Start Above, aligned left Top End Above, aligned right File Menu New File New Folder project-1.tsx component.tsx styles.css Clear Recent Export as JSON Export as PDF Export as ZIP Save My Account Jane Developer jane.dev@example.com Profile Settings Preferences Security Light Dark Auto Sign Out Commands Find Replace Notifications Messages Quick Stats Project Overview Files 247 Lines 12.4K View Analytics Export Report Refresh Data Primary Quick Action 3 notifications New message from Alice Comment on your post Task assigned to you Profile Settings Click me Action // Icon button // Badge trigger 3 new Notification 1 // Custom element Custom trigger bottom-start bottom-end top-start top-end check secondary ghost email you@example.com password •••••••• primary block Dropdown A flexible dropdown component that displays custom content when triggered. Perfect for menus, forms, and complex UI patterns. Basic Usage Use with the Menu component for action menus. This is the most common pattern. edit copy clippy trash Placement Options Four placement options: bottom-start (default), bottom-end, top-start, and top-end. arrow-down arrow-up With Submenus Use SubMenu component for nested menus. Submenus support infinite nesting. list-tree file folder Open Recent history clear-all Export export file-code file-pdf file-zip save User Profile Menu Common pattern: user profile dropdown with custom header and menu items. account person gear key Theme symbol-color circle-outline sign-out With Right Content MenuItem supports rightContent for shortcuts, badges, or additional info. rocket search replace bell error inbox info With Form Custom Content Mix custom HTML with Menu components for complex UIs like dashboards or stat cards. graph refresh Controlled Mode Control dropdown state externally with open and onOpenChange props. Different Triggers Any React element can be a dropdown trigger: buttons, badges, icons, or custom components. zap ellipsis chevron-down use client trigger React.ReactNode The element that opens the dropdown when clicked children The content to display inside the dropdown open boolean Controlled open state (optional) onOpenChange Callback when the dropdown open state changes placement \"bottom-start\" | \"bottom-end\" | \"top-start\" | \"top-end\" \"bottom-start\" Position of the dropdown relative to the trigger closeOnClick true Whether to close the dropdown when clicking inside it disabled false Whether the dropdown is disabled flex column var(--bk-spacing-4) center success default Closed var(--bk-spacing-2) var(--bk-spacing-5) 280px var(--bk-spacing-3) var(--bk-font-size-lg) var(--bk-spacing-1) var(--bk-font-size-sm) var(--vscode-textLink-foreground) pointer baukasten-ui wrap 220px 1px solid var(--vscode-panel-border) var(--bk-font-size-base) 2px var(--vscode-descriptionForeground) react 260px grid 1fr 1fr var(--vscode-sideBar-background) var(--bk-radius-md) var(--bk-font-size-xs) var(--bk-font-size-xl) 2rem var(--bk-spacing-2) var(--bk-spacing-3) var(--vscode-button-secondaryBackground) var(--vscode-button-secondaryForeground)", + "path": "/components/dropdown", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "trigger", + "children", + "open", + "onopenchange", + "placement", + "closeonclick", + "disabled", + "button", + "input", + "form", + "list", + "menu", + "notification", + "badge", + "icon", + "text" + ] + }, + { + "id": "/components/fileupload", + "title": "FileUpload", + "description": "A versatile file upload component with drag-and-drop support. Allows users to select files by clicking or dragging.", + "content": "([]);\n const [files2, setFiles2] = useState ([]);\n\n return ( Clear All Files ([]);\n\nreturn ( Upload Profile Picture Submit Application Documents Upload all required documents for your application Resume / CV * Supporting Documents Submit Application image/* .pdf,.doc default primary dashed Drop files here or click to browse FileUpload A versatile file upload component with drag-and-drop support. Allows users to select files by clicking or dragging. Basic Usage The default file upload with drag-and-drop support. Click or drag files to upload. With Custom Labels Customize the label and description text to guide users. Upload your documents Supported formats: PDF, DOC, DOCX up to 10MB Sizes Five size options from extra small to extra large. Extra Small Small Medium (Default) Medium Large Extra Large Variants Three visual variants: default, primary, and dashed. Default Variant Primary Variant Dashed Variant (Default) Multiple Files Enable multiple file selection with the multiple prop. Upload multiple files Select one or more files Image Upload Only Restrict file types using the accept prop. Upload images PNG, JPG, GIF up to 5MB PDF Documents Only Accept specific file extensions. .pdf Upload PDF documents PDF files only, max 10MB File Limit Limit the maximum number of files that can be uploaded. Upload up to 3 files Maximum 3 files allowed Disabled State Disable the upload area when needed. Upload disabled This upload area is disabled Controlled Component Control the file list state externally for full control. Controlled file upload Profile Picture Upload Example use case for uploading a profile picture. Choose a profile picture JPG or PNG, max 2MB Document Upload Form Example of a complete document upload form with multiple upload areas. .pdf,.doc,.docx Upload your resume PDF, DOC, or DOCX, max 5MB Upload additional documents Up to 5 files, max 10MB each use client onChange Callback fired when files are selected or dropped accept string Accepted file types (e.g., \"image/*\", \".pdf,.doc\") multiple boolean false Allow multiple file selection maxFiles number Maximum number of files allowed maxSize Maximum file size in bytes size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the upload area variant \"default\" | \"primary\" | \"dashed\" \"dashed\" Visual variant of the upload area disabled Whether the upload area is disabled label \"Drop files here or click to browse\" Custom label text description Description text shown below the label showFileList true Show list of selected files files File[] Current list of files (for controlled component) 500px Files: baukasten-ui flex column var(--bk-spacing-6) var(--bk-spacing-4) var(--bk-spacing-2) var(--bk-spacing-4) var(--bk-color-danger) var(--bk-color-background-hover) var(--bk-color-danger-foreground) var(--bk-color-foreground-muted) none var(--bk-radius-md) pointer not-allowed var(--bk-font-weight-medium) var(--bk-color-background-secondary) var(--bk-radius-lg) var(--bk-font-size-lg) var(--bk-font-weight-semibold) Profile picture: 600px var(--bk-spacing-2) var(--bk-font-size-sm) block Resume: Supporting docs: var(--bk-spacing-3) var(--bk-spacing-6) var(--bk-color-accent) var(--bk-color-accent-foreground) \n\n\n\n \n\n Accepted file types (e.g., ", + "path": "/components/fileupload", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "onchange", + "accept", + "multiple", + "maxfiles", + "maxsize", + "size", + "variant", + "disabled", + "label", + "description", + "showfilelist", + "files", + "button", + "form", + "list", + "text" + ] + }, + { + "id": "/components/forms", + "title": "Forms", + "description": "A comprehensive set of form components including FieldLabel, FormGroup, and FormHelper. These components work together to create accessible, well-structured forms following VSCode design patterns.", + "content": "Username Email Address Read-only Field // Required field (shows asterisk) // Disabled field Choose a unique username with 3-20 characters Please enter a valid email address Password strength: weak Username is available! Your API key will be encrypted at rest // Error message // Warning message // Success message // Info message Name Email We'll never share your email Bio Tell us about yourself (optional) Horizontal (VSCode-style - Default) Vertical (Stacked) // Vertical layout (traditional stacked) Full Name Enter your first and last name Password Password strength: medium. Add special characters to strengthen. Biography Country I agree to the terms and conditions Submit Cancel Password strength: medium Default Label Width (30%) Label Wide Label (40%) Very Long Label Name Narrow Label (20%) Short // Wide label (40%) // Narrow label (20%) Default Spacing Field 1 Field 2 Field 3 Compact Spacing // Compact spacing Component Relationships FieldLabel: Semantic <label> that links to form inputs via htmlFor FormHelper: Helper text displayed below form fields for guidance or validation FormGroup: Container that arranges FieldLabel and inputs in consistent layout Usage pattern: Wrap FieldLabel + Input/TextArea + FormHelper inside FormGroup for proper alignment Accessibility Uses semantic with to link to form controls Required indicator: Red asterisk has aria-label=\"required\" for screen readers FormHelper variants: Error messages are visually distinct with appropriate color coding Focus management: All form components support keyboard navigation and proper focus states Best Practices Always link labels: Use attribute to connect FieldLabel to form inputs Required fields: Mark required fields with the required prop on FieldLabel Helper text: Use FormHelper for hints, validation messages, and additional context Error messages: FormHelper variant=\"error\" with input error state for validation feedback Layout choice: Use horizontal for settings-style forms, vertical for traditional forms Input width: Always use fullWidth on inputs within FormGroup for proper alignment Helper + Input grouping: Wrap Input and FormHelper in a <div> when using FormGroup horizontal vertical 30% default error warning success info Forms A comprehensive set of form components including FieldLabel, FormGroup, and FormHelper. These components work together to create accessible, well-structured forms following VSCode design patterns. FieldLabel Component A simple, semantic label for form fields. Displays text above or beside form inputs. Shows a red asterisk for required fields. username email readonly FormHelper Component Displays helper text, hints, or validation messages below form fields. Supports different visual variants for various states. username1 email1 password1 username2 apiKey1 password apiKey FormGroup Component A flexible container for form fields that supports VSCode-style two-column layout where labels appear on the left and inputs on the right, creating consistent alignment across multiple form fields. name email2 bio FormGroup Orientations FormGroup supports horizontal (VSCode-style two-column) and vertical (traditional stacked) layouts. h-name h-email v-name v-email Complete Form Example A real-world example showing all form components working together in a registration form with validation. fullName email3 password2 bio2 country checkbox primary secondary FormGroup Label Width Customize the label width in horizontal orientation to accommodate different label lengths. default-field 40% wide-field 20% narrow-field field Use compact prop to reduce spacing between form groups for denser layouts. field1 field2 field3 field4 field5 field6 use client string ID of the form element this label is for boolean false Whether the field is required (shows red asterisk) disabled Whether the field is disabled orientation \"horizontal\" | \"vertical\" \"horizontal\" Layout orientation (horizontal: VSCode-style two-column, vertical: stacked) compact Whether to use compact spacing labelWidth \"30%\" Custom label width (only applies to horizontal orientation) variant \"default\" | \"error\" | \"warning\" | \"success\" | \"info\" \"default\" Visual variant of the helper text flex column var(--bk-spacing-4) 400px baukasten-ui var(--bk-spacing-5) var(--bk-spacing-6) var(--bk-spacing-3) var(--bk-font-size-sm) var(--bk-font-weight-medium) 600px United States United Kingdom Canada var(--bk-spacing-2) 8px var(--bk-spacing-8) var(--vscode-textBlockQuote-background) var(--bk-radius-md) var(--vscode-descriptionForeground) // Horizontal layout (VSCode-style - default)\n\n Name\n \n\n\n// Vertical layout (traditional stacked)\n\n Name\n \n // Default label width (30%)\n\n Label\n \n\n\n// Wide label (40%)\n\n Very Long Label Name\n \n\n\n// Narrow label (20%)\n\n Short\n \n // Default spacing\n\n Field 1\n \n\n\n Field 2\n \n\n\n// Compact spacing\n\n Field 1\n \n\n\n Field 2\n \n", + "path": "/components/forms", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "htmlfor", + "required", + "disabled", + "orientation", + "compact", + "labelwidth", + "variant", + "button", + "input", + "form", + "text", + "heading" + ] + }, + { + "id": "/components/hero", + "title": "Hero", + "description": "A full-width hero section component designed for creating beautiful, impactful headers. Features large typography with semantic design tokens, flexible sizing, and alignment options. Perfect for landing pages, section headers, or important announcements.", + "content": ");\n\n\n return ( // Medium (40vh - default) // Large (60vh) // Extra Large (80vh) // Full viewport (100vh) // Center aligned // Right aligned Get Started View Documentation Your content goes here. The hero component works great as a section divider\n or category header within your application. Your section content goes here... Semantic Typography Title: Rendered as <h1> with hero-specific typography tokens Description: <p> with hero description styling Responsive: Typography automatically scales with design system tokens Accessibility Title uses semantic element for proper document structure Background colors use semantic tokens that respect theme contrast requirements All text maintains proper color contrast ratios across light and dark themes Best Practices Size selection: Use full for landing pages, for major sections, for section headers Alignment: center left for content sections, right sparingly for visual interest Background: Use different backgrounds to create visual hierarchy and separate major sections CTA buttons: Place primary action first, limit to 1-3 buttons for clarity Title length: Keep titles concise - 3-8 words work best for hero sections Use description for context, but keep it brief (1-2 sentences max) default secondary tertiary elevated Hero A full-width hero section component designed for creating beautiful, impactful headers. Features large typography with semantic design tokens, flexible sizing, and alignment options. Perfect for landing pages, section headers, or important announcements. Basic Usage Create a hero section with a title and optional description. The component automatically uses large, impactful typography. Welcome to Baukasten Build beautiful VSCode extensions with React Sizes Five size options available: sm (20vh), md (40vh - default), lg (60vh), xl (80vh), and full (100vh). Size controls the minimum height of the hero section. Small Hero 20% of viewport height (20vh) Medium Hero 40% of viewport height (40vh) - Default size Large Hero 60% of viewport height (60vh) 20% of viewport height 40% of viewport height 60% of viewport height Extra Large Hero Full Viewport Hero Alignments Control text alignment within the hero: left (default), center, or right. Alignment affects title, description, and children. Left Aligned Hero This is the default alignment. Content flows naturally from the left side. Center Aligned Hero Centered alignment creates a balanced, symmetrical layout ideal for landing pages. Right Aligned Hero Right alignment can create visual interest and works well for specific designs. Content flows from the left Balanced, symmetrical layout Creates visual interest Backgrounds The background prop accepts semantic color tokens (default, secondary, tertiary, elevated) that automatically adapt to the VSCode theme. Default Background Uses the default editor background color from the theme Secondary Background Uses sidebar background - slightly different for visual separation Tertiary Background Uses panel background - another level of visual hierarchy Elevated Background Uses elevated widget background for prominent sections Default Secondary Tertiary Elevated With CTA Buttons Pass children (typically buttons or links) to create call-to-action sections. Perfect for landing pages and conversion-focused designs. Build beautiful, accessible VSCode webview UIs with our comprehensive React component library. Get started in minutes with our intuitive API and extensive documentation. primary Build beautiful, accessible VSCode webview UIs Title Only Hero component works beautifully with just a title. Omit the description prop for a minimal, focused design. Simple. Powerful. Beautiful. Section Header Usage Hero with size='sm' works well as a section header within your application, providing visual hierarchy and clear content separation. Components Explore our comprehensive collection of pre-built components Explore our collection use client title React.ReactNode Main hero title text description Optional description/subtitle text align \"left\" | \"center\" | \"right\" \"left\" Text alignment size \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\" \"md\" Hero height (sm=20vh, md=40vh, lg=60vh, xl=80vh, full=100vh) background \"default\" | \"secondary\" | \"tertiary\" | \"elevated\" \"default\" Background color using semantic tokens children Optional children rendered below title and description (e.g., CTA buttons) flex var(--bk-spacing-4) var(--bk-spacing-6) flex-end flex-start baukasten-ui 16px 24px var(--vscode-foreground) var(--vscode-textBlockQuote-background) var(--bk-radius-md) var(--bk-spacing-3) var(--bk-font-size-sm) var(--vscode-descriptionForeground) var(--bk-spacing-2) // Small (20vh)\n\n\n// Medium (40vh - default)\n\n\n// Large (60vh)\n\n\n// Extra Large (80vh)\n\n\n// Full viewport (100vh)\n // Left aligned (default)\n\n\n// Center aligned\n\n\n// Right aligned\n \n\n\n ", + "path": "/components/hero", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "title", + "description", + "align", + "size", + "background", + "children", + "button", + "text", + "heading" + ] + }, + { + "id": "/components/icon", + "title": "Icon", + "description": "A flexible icon component that uses VSCode", + "content": "))} XS Button SM Button MD Button LG Button XL Button Save // Icon-only circular buttons codicon- 2xl 3xl Icon A flexible icon component that uses VSCode's Codicon font library with 600+ icons. Icons automatically inherit size and color from their parent components. Basic Usage Icons automatically inherit font-size and color from their parent. No size prop needed! check Explicit Sizes Use the size prop for precise control regardless of parent size. xs (10px) sm (12px) md (16px) lg (20px) xl (24px) 2xl (28px) 3xl (32px) Semantic Colors Use design system color tokens for consistent theming. Info info var(--bk-color-info) Success var(--bk-color-success) Warning warning var(--bk-color-warning) Danger error var(--bk-color-danger) Primary star var(--bk-color-primary) Common Icons Frequently used icons throughout VSCode interfaces. close search chevron-right add edit trash save Rotation Rotate icons to any angle using the rotate prop. arrow-right 45° 90° 180° Spin Animation Use the spin prop for loading indicators and animated icons. loading sync gear With Buttons Icons automatically scale with button size without any size prop. File & Folder Icons Commonly used icons for file explorers and document interfaces. file file-code folder folder-opened new-file new-folder Status Icons Icons for status indicators, alerts, and notifications. bell bell-dot use client name CodiconName The codicon name (without the \"codicon-\" prefix). See https://microsoft.github.io/vscode-codicons for all available icons. size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\" Optional size override. When not provided, icons inherit font-size from their parent component. color string Optional color override (CSS color value). When not provided, icons inherit color from their parent component. spin boolean false Whether the icon should rotate/spin. Useful for loading indicators. rotate number Rotation angle in degrees. , alignItems: , gap: , color: , gridTemplateColumns: , width: ,\n\t\t\t\t\t\t\t\t\tflexDirection: ,\n\t\t\t\t\t\t\t\t\talignItems: ,\n\t\t\t\t\t\t\t\t\tgap: ,\n\t\t\t\t\t\t\t\t\tpadding: , textAlign: , flexDirection: , flexWrap: \n\n\n\n\n\n \n\n\n\n \n\n\n\n\n\n\n\n// ... and many more! \n\n // Icons inherit button size automatically\n\n\n// Icon-only circular buttons\n \n\n\n\n\n \n\n\n\n\n The codicon name (without the ", + "path": "/components/icon", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "name", + "size", + "color", + "spin", + "rotate", + "button", + "alert", + "notification", + "icon", + "text" + ] + }, + { + "id": "/components/input", + "title": "Input", + "description": "A text input component with size and error message support. Fully integrates with the design system tokens.", + "content": "void',\n description: 'Change event handler',\n },\n];\n\n\n return ( Default State With Error Disabled State Error State Only (boolean) Error with Message (string) Default Width (Inline) Full Width Login Form Form with Validation text Input A text input component with size and error message support. Fully integrates with the design system tokens. Basic Usage The default input with medium size. Enter text... Sizes Five size options from extra small to extra large. Extra Small Small Medium (Default) Large Extra Large Input Types Supports all standard HTML input types for various data formats. Text input email Email (you@example.com) password Password number Number tel Telephone url URL (https://...) States Input supports default, error, and disabled states. medium Enter your username you@example.com Please enter a valid email address This field is disabled Error Handling Error prop accepts boolean for styling only, or a string to display an error message. Email This field is required Width Options Control input width with fullWidth prop or use default inline width. Auto width This spans full width Form Examples Common form patterns using Input components. Username This email is already registered Password must be at least 8 characters use client size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the input error string | boolean undefined Error state or message. Pass true for error styling only, or a string to show error message below fullWidth boolean false Whether the input should take full width of its container type string \"text\" HTML input type (text, email, password, number, tel, url, etc.) placeholder Placeholder text shown when input is empty disabled Whether the input is disabled value Controlled input value onChange Change event handler baukasten-ui flex column var(--bk-spacing-3) 100% var(--bk-spacing-4) var(--bk-spacing-2) var(--bk-spacing-6)", + "path": "/components/input", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "size", + "error", + "fullwidth", + "type", + "placeholder", + "disabled", + "value", + "onchange", + "input", + "form", + "text", + "heading" + ] + }, + { + "id": "/components/label", + "title": "Label", + "description": "A versatile label wrapper for form components supporting three distinct variants: input (horizontal layout with prefix/suffix), textarea (vertical layout), and checkbox (simple flex layout).", + "content": "https:// .com USD Active Pro Beta Language: Region: Online https://api. .myapp.com/v1 Description Comments Feedback Message Optional Bio Max 500 chars Accept terms and conditions Subscribe to newsletter Enable notifications Dark mode Extra small label Small label Medium label (default) Large label Extra large label I have read and agree to the privacy policy, terms of service, and data processing agreement.\n I understand that my data will be processed according to GDPR regulations. I consent to receive marketing communications including newsletters, product updates, and special offers.\n I can unsubscribe at any time. I have read and agree to the privacy policy, terms of service, \n and data processing agreement. I understand that my data will be \n processed according to GDPR regulations. Username Required Website URL Email Address API Key Expired Tell us more I accept the terms and conditions input textarea checkbox Label A versatile label wrapper for form components supporting three distinct variants: input (horizontal layout with prefix/suffix), textarea (vertical layout), and checkbox (simple flex layout). Input Variant - Basic Usage The input variant wraps text inputs and selects with prefix or suffix text. The label acts as the container with borders and backgrounds, while the input inherits styling for a cohesive design. label example.com yourdomain number 0.00 Input Variant - With Icons Add icons to prefix or suffix positions using the Icon component wrapped in a span with className='label'. Icons automatically scale with the label size. search Search... mail email you@example.com lock password Password Input Variant - With Badges Combine inputs with badges for status indicators, feature flags, or contextual information. Badges work in both prefix and suffix positions. key success Advanced analytics info Premium feature warning Input Variant - Sizes Labels support five sizes (xs, sm, md, lg, xl). Always match the Label size prop with the child component's size prop for proper alignment. Input Variant - Error States Display validation errors by providing an error prop. The label border turns red and an error message appears below. This field is required Please enter a valid email address Price must be greater than 0 Input Variant - With Select The input variant works seamlessly with the Select component. Add prefix labels, icons, or badges just like with inputs. Choose language symbol-color Select theme Select region Input Variant - Complex Patterns Advanced patterns combining multiple inputs, buttons, and decorative elements. Useful for configuration UIs and admin panels. folder Select project ghost edit git-branch Select branch main git-pull-request sync env copy TextArea Variant The textarea variant uses vertical layout with label elements on top and the textarea below. Perfect for multi-line input fields with descriptive headers. Enter description... note Enter your comments... Your feedback... TextArea Variant - With Badges Add badges to the textarea header to indicate optional fields, character limits, or feature flags. Use marginLeft: 'auto' to pin badges to the right. Type your message here... Tell us about yourself... Checkbox Variant The checkbox variant provides simple flex layout for wrapping checkboxes, radio buttons, and switches. Label text automatically scales with the size prop. terms newsletter switch notifications dark-mode Checkbox Variant - Sizes Match the Label size with the Checkbox size for proper alignment. Label text automatically scales with the size prop. Checkbox Variant - Multiline Text Checkbox labels automatically handle multiline text with proper alignment. The checkbox stays at the first line while text wraps naturally. privacy marketing Form Example Complete form field pattern: text label positioned above the Label component containing the input and adornments. Shows required/optional indicators and various field types. username Invalid API key format sk_live_... error Enter details... use client variant \"input\" | \"textarea\" | \"checkbox\" \"input\" Visual variant determining layout and styling behavior size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size to match the form element inside. Should match child component size for proper alignment fullWidth boolean false Whether the label should take full width of its container string Error message displayed below the label with red border styling children React.ReactNode Content of the label - can include inputs, selects, textareas, checkboxes, and label spans flex column var(--bk-spacing-3) 300px baukasten-ui 350px , flexDirection: , gap: , width: , label: , maxWidth: , justifyContent: , alignItems: , marginBottom: , color: , fontSize: \n\n \n\n \n\n\n\n \n\n \n\n\n\n \n\n\n\n ", + "path": "/components/label", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "variant", + "size", + "fullwidth", + "error", + "children", + "button", + "input", + "form", + "notification", + "badge", + "icon", + "text" + ] + }, + { + "id": "/components/menu", + "title": "Menu", + "description": "A versatile menu component system for creating dropdown menus, context menus, and navigation menus. Supports keyboard navigation, icons, badges, and infinite nesting.", + "content": "Edit Copy Paste Delete );\n}\n\n\n return ( Extra Small New File Save Small Medium (Default) Large Keyboard Shortcuts Find With Badges Inbox Unread Done // With badges Disabled Items Copy (disabled) Paste (disabled) Selected Items Side Panel Status Bar Activity Bar // Selected items Icon Only With Dividers Small Size // With dividers // Small icon-only menu Horizontal with Text Home Search Messages Notifications Horizontal Icon-Only (Toolbar) // Horizontal icon-only (toolbar) Basic SubMenu project-1.txt project-2.txt project-3.txt Nested SubMenus Cut Uppercase Lowercase Title Case Zoom In Zoom Out Full Screen // Nested submenus Actions Duplicate Email Link Copy Link Make Public Profile Settings Sign Out File Menu Project A Project B Project C // Icon button dropdown Accessibility Keyboard Navigation: Use Arrow Keys to navigate between items, Enter Space to activate, End to jump to first/last item SubMenu Navigation: Arrow Right to open submenus, Arrow Left Escape to close Screen Readers: Menu items have proper role=\"menu\" and role=\"menuitem\" attributes Focus Management: Disabled items are not focusable ( vertical horizontal edit copy clippy trash Menu A versatile menu component system for creating dropdown menus, context menus, and navigation menus. Supports keyboard navigation, icons, badges, and infinite nesting. Basic Usage The Menu component contains MenuItem and MenuDivider components. Menu items can have icons and right-aligned content. Sizes Five size options: xs, sm, md (default), lg, and xl. The size affects padding, font size, and icon size for all menu items. file save With Right Content Menu items support rightContent for displaying keyboard shortcuts, badges, counts, or any React element. search inbox mail warning check States Menu items support disabled and selected states. Disabled items cannot be clicked or focused, while selected items indicate the current choice. layout-panel-left layout-statusbar layout-activitybar-left Icon-Only Menus Icon-only mode reduces horizontal padding, making menus more compact. Perfect for toolbars and side panels. home bell gear folder share Horizontal Menus Horizontal direction is perfect for navigation bars and toolbars. Works with both text and icon-only modes. bold italic SubMenus SubMenu component creates nested menus that expand on hover. They can be nested infinitely for complex hierarchies. Open Recent folder-opened discard Transform symbol-method View eye With Dropdown Menu works seamlessly with Dropdown to create complete dropdown menu solutions. The Menu handles content structure while Dropdown handles positioning and visibility. secondary ellipsis Share link globe ghost kebab-vertical person sign-out Interactive Example Menu items support onClick handlers for interactive behavior. Use the selected prop to highlight the active item. menu menuitem use client size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of all menu items iconOnly boolean false Whether the menu contains only icons (reduces horizontal padding) direction \"vertical\" | \"horizontal\" \"vertical\" Direction of the menu layout children React.ReactNode Menu items and dividers className string Additional CSS class name icon Icon to display before the label rightContent Content to display on the right side (badges, shortcuts, etc.) disabled Whether the menu item is disabled selected Whether the menu item is currently selected/active Menu item label (optional for icon-only menu items) onClick Click handler for the menu item label Label for the submenu trigger rightIcon Custom icon to display on the right (defaults to chevron) Whether the submenu is disabled Nested menu items paste delete baukasten-ui flex var(--bk-spacing-6) wrap flex-start var(--bk-font-size-xs) var(--bk-spacing-2) var(--vscode-descriptionForeground) column 100% var(--bk-spacing-4) react var(--bk-spacing-8) var(--vscode-textBlockQuote-background) 1px solid var(--vscode-textBlockQuote-border) var(--bk-radius-md) var(--bk-spacing-3) var(--bk-spacing-5)", + "path": "/components/menu", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "size", + "icononly", + "direction", + "children", + "classname", + "icon", + "rightcontent", + "disabled", + "selected", + "onclick", + "label", + "righticon", + "button", + "form", + "menu", + "notification", + "badge", + "text" + ] + }, + { + "id": "/components/modal", + "title": "Modal", + "description": "A dialog overlay component that displays content in a centered container with backdrop. Supports different sizes, fullscreen mode, backdrop variants, and composable structure.", + "content": "Open Modal Modal Title This is the modal content. You can put any content here. Try clicking outside, pressing ESC, or using the close button. Cancel Confirm Delete Item Confirm Delete Are you sure you want to delete this item? This action cannot be undone. Delete Contact Form Contact Us Name Email Message Send Message );\n}\n\n\n const [sizesModal, setSizesModal] = useState (null);\n const [backdropModal, setBackdropModal] = useState (null);\n const [fullscreenModal, setFullscreenModal] = useState(false);\n const [scrollModal, setScrollModal] = useState(false);\n const [simpleModal, setSimpleModal] = useState(false);\n const [requiredModal, setRequiredModal] = useState(false);\n\n return ( This is the modal content. Close ))} XS Modal Compact modal for simple messages. // Small (500px) - Good for confirmations SM Modal Small modal for confirmations. // Medium (600px) - Default MD Modal Default modal size. // Large (800px) - Good for forms LG Modal Large modal for forms. // Extra large (1000px) XL Modal Extra large modal for complex content. Open Fullscreen Modal Fullscreen Preview Fullscreen Modal This modal covers the entire viewport. Perfect for media previews or immersive content. Solid Backdrop Blur Backdrop Transparent This modal uses the backdrop variant. Solid : Dark semi-transparent Blur : Blurred with backdrop-filter : No visible backdrop Background Content Open the modals above to see how different backdrop styles affect this content. The blur backdrop will make this text appear blurred. Dark semi-transparent backdrop // Blur backdrop Blurred background effect // Transparent backdrop No visible backdrop (clicks still work) Send Open Scrollable Modal Terms and Conditions Decline Accept Open Simple Modal Simple Message This modal only has a body section. Got it Open Required Action Action Required This modal requires you to make a choice. You cannot close it by clicking outside or pressing ESC. Features & Behavior Portal Rendering: Modal renders to document.body using React portals, ensuring proper z-index stacking Focus Management: Automatically focuses modal on open and restores focus to the previously active element on close Scroll Locking: Prevents body scroll when modal is open to avoid background scrolling Keyboard Support: Press ESC to close (configurable with closeOnEscape Backdrop Click: Click outside modal to close (configurable with closeOnBackdropClick Composable Structure: Use ModalHeader ModalBody , and ModalFooter for consistent layout Accessibility ARIA Attributes: Uses role=\"dialog\" and aria-modal=\"true\" for screen readers Focus Trap: Modal automatically receives focus when opened Focus Restoration: Returns focus to trigger element when closed Close Button Label: Close button includes aria-label=\"Close modal\" fullscreen solid blur transparent secondary primary muted vertical name Your name error email your.email@example.com message Your message... Modal A dialog overlay component that displays content in a centered container with backdrop. Supports different sizes, fullscreen mode, backdrop variants, and composable structure. Basic Usage Modal is a composable component using ModalHeader, ModalBody, and ModalFooter. It renders to document.body using React portals and includes backdrop, keyboard navigation, and focus management. Sizes Six size options: xs (400px), sm (500px), md (600px - default), lg (800px), xl (1000px), and fullscreen. All sizes are responsive with 90% width on smaller screens. Fullscreen mode covers the entire viewport with no border radius. Perfect for media previews, image galleries, or immersive experiences. Backdrop Variants Three backdrop styles: solid (default dark overlay), blur (backdrop-filter blur effect), and transparent (no visible backdrop but still interactive). bold Confirmation Dialog Simple confirmation dialog for destructive actions. Small size works well for confirmations that require user acknowledgment. With Form Modal with form fields and validation. Large size provides enough space for multiple form fields and validation messages. Scrollable Content Modal body automatically handles overflow with scrolling. Header and footer remain fixed while the body scrolls. Simple Modal (Body Only) Minimal modal with only body content. No header or footer components needed for simple messages. Required Action Modal Modal that requires explicit user choice. Disables backdrop click and ESC key, and hides the close button to force users to make a decision. dialog true Close modal use client open boolean Whether the modal is open onClose Callback when the modal should close size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"fullscreen\" \"md\" Size of the modal backdropVariant \"solid\" | \"blur\" | \"transparent\" \"solid\" Visual style of the backdrop Whether clicking the backdrop closes the modal Whether pressing Escape closes the modal children React.ReactNode Modal content (use ModalHeader, ModalBody, ModalFooter) className string Additional CSS class name Header content (typically a title) showCloseButton Whether to show the close button Callback when close button is clicked Body content Footer content (typically action buttons) Item deleted Name is required Email is required Please enter a valid email Form submitted: flex column var(--bk-spacing-4) 100% var(--bk-padding-md) var(--bk-color-input-background) var(--bk-color-input-foreground) 1px solid var(--bk-color-input-border) var(--bk-radius-sm) inherit var(--bk-font-size-md) baukasten-ui var(--bk-spacing-3) wrap 400px 500px 600px 800px 1000px center var(--bk-spacing-5) 1px solid var(--vscode-textBlockQuote-border) var(--bk-radius-md) react var(--vscode-descriptionForeground) 1rem var(--bk-spacing-8) var(--bk-spacing-6) var(--vscode-textBlockQuote-background) var(--bk-spacing-2)", + "path": "/components/modal", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "open", + "onclose", + "size", + "backdropvariant", + "closeonbackdropclick", + "closeonescape", + "children", + "classname", + "showclosebutton", + "button", + "input", + "modal", + "form", + "dialog", + "icon", + "text", + "heading", + "paragraph" + ] + }, + { + "id": "/components/pagination", + "title": "Pagination", + "description": "A flexible pagination component for navigating through pages of data with smart controls and optional page size selection. Features intelligent ellipsis for large page counts, range display, and multiple size variants.", + "content": "Name Category Price ))} );\n}\n\n\n const [sizesPage, setSizesPage] = useState First Page (Previous Disabled) Middle Page Last Page (Next Disabled) Many Pages (with Ellipsis) Single Page Empty (No Items) // Last page (next disabled) // Many pages (shows ellipsis) // Single page (no navigation) // Empty state Default (7 visible pages) Limited (5 visible pages) Very Limited (3 visible pages) // Limited for mobile // Very limited Features & Behavior Smart Ellipsis: Automatically shows ellipsis (...) when there are more pages than maxVisiblePages Range Display: Shows \"X-Y of Z\" text to indicate current items being viewed Page Size Selector: Optional dropdown to change items per page, with customizable options Auto Reset: When page size changes, automatically resets to page 1 Disabled States: Previous button disabled on first page, next button disabled on last page Responsive: All size variants are designed to work across different screen sizes Accessibility ARIA Labels: Navigation buttons include aria-label for screen readers Current Page: Active page button has aria-current=\"page\" Keyboard Navigation: All buttons are keyboard accessible with Tab and Enter Disabled State: Disabled buttons have disabled attribute and cannot be interacted with X-Y of Z Pagination A flexible pagination component for navigating through pages of data with smart controls and optional page size selection. Features intelligent ellipsis for large page counts, range display, and multiple size variants. Basic Usage Pagination component requires totalItems, currentPage, pageSize, and onPageChange. It automatically calculates page numbers and displays range information. Sizes Five size variants (xs, sm, md, lg, xl) to match different contexts and visual hierarchies. The size affects padding, font size, and icon size. States Various pagination states including first page, middle page, last page, many pages with ellipsis, single page, and empty state. Compact Mode Compact variant without range text and page size selector. Perfect for space-constrained layouts like mobile views or sidebar navigation. Custom Page Sizes Customize the page size options to match your specific use case. The dropdown will display these options with a '/page' suffix. Limited Visible Pages Control the maximum number of visible page buttons with maxVisiblePages. Useful for mobile or narrow layouts. The component intelligently shows ellipsis when there are more pages. With Data Table Practical example integrating Pagination with a data table. The component handles page calculations while you manage the data slicing. page use client totalItems number Total number of items to paginate currentPage Current active page (1-indexed) pageSize Number of items displayed per page onPageChange Callback fired when the page changes pageSizeOptions number[] [10, 25, 50, 100] Available options for page size selector onPageSizeChange Callback fired when the page size changes showPageSizeSelector boolean true Whether to display the page size selector dropdown size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size variant of the pagination controls Maximum number of page buttons visible before using ellipsis showRangeText Whether to show the \"X-Y of Z\" range text className string Additional CSS class name Electronics Clothing Books Food flex column var(--bk-spacing-4) auto 100% collapse var(--bk-font-size-sm) 1px solid var(--vscode-textBlockQuote-border) var(--vscode-textBlockQuote-background) var(--bk-spacing-2) left right baukasten-ui var(--bk-spacing-6) var(--bk-font-size-xs) var(--vscode-descriptionForeground) Extra Small Small Medium (Default) Large Extra Large first middle last many single empty /page var(--bk-spacing-8) var(--bk-radius-md) var(--bk-spacing-3) var(--bk-spacing-5) Whether to show the ", + "path": "/components/pagination", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "totalitems", + "currentpage", + "pagesize", + "onpagechange", + "pagesizeoptions", + "onpagesizechange", + "showpagesizeselector", + "size", + "maxvisiblepages", + "showrangetext", + "classname", + "button", + "form", + "table", + "icon", + "text", + "heading", + "paragraph" + ] + }, + { + "id": "/components/progressbar", + "title": "ProgressBar", + "description": "A progress indicator component for showing task completion or loading states. Supports both determinate (with value) and indeterminate (loading) modes with VSCode-style shimmer animation.", + "content": "clearTimeout(timer);\n }\n }, [isUploading, progress]);\n\n const variant = progress === 100 ? 'success' : 'primary';\n\n return ( document.pdf );\n}\n\n\n return ( Default Primary Success Warning Danger Info Loading (default) Loading (primary) Loading (info) Thin (4px) - Subtle progress Default (8px) - Standard Medium (12px) - More prominent Thick (16px) - Very prominent Extra thick (24px) - Maximum visibility Primary with stripes Success with stripes Warning with stripes Animated stripes (processing) Success - Animated Warning - Animated clearTimeout(timer);\n }\n }, [isUploading, progress]);\n\n const variant = progress === 100 ? 'success' : 'primary';\n\n return ( Build Tasks Compiling TypeScript ✓ Complete Bundling assets 75% Running tests 45% Optimizing images Loading... Deploying to production Waiting... default primary success warning danger info 8px ProgressBar A progress indicator component for showing task completion or loading states. Supports both determinate (with value) and indeterminate (loading) modes with VSCode-style shimmer animation. Basic Usage ProgressBar displays progress from 0 to 100. Values are automatically clamped to this range. Use the value prop to set the current progress. Variants Six semantic variants to represent different states: default (neutral), primary (brand), success (positive), warning (caution), danger (error), and info (informational). With Labels Set showLabel to display the percentage value next to the progress bar. Labels are automatically hidden in indeterminate loading state. Indeterminate Loading When no value is provided, the progress bar shows an indeterminate loading state with a VSCode-style shimmer animation. Perfect for operations where progress cannot be determined. Custom Heights Customize the height using the height prop. Default is 8px which matches VSCode style. Use different heights for different visual emphasis. 4px 12px 16px 24px Striped Pattern Add a striped pattern with the striped prop for additional visual interest. The stripes are created using CSS gradients. Animated Stripes Animate the stripes with the animated prop (requires striped=true) to indicate active processing. The animation moves from right to left. File Upload Simulation Real-world example showing simulated file upload progress with state management. Demonstrates progress tracking, variant changes, and animated stripes during upload. Multiple Tasks Example showing multiple tasks at different stages of completion. Demonstrates various states including complete, in-progress, loading, and pending. use client value number Progress value from 0 to 100 (undefined for indeterminate loading state) variant \"default\" | \"primary\" | \"success\" | \"warning\" | \"danger\" | \"info\" \"default\" Visual variant of the progress bar height string \"8px\" Height of the progress bar showLabel boolean false Whether to show percentage label striped Whether to show striped pattern animated Whether to animate stripes (requires striped=true) className Additional CSS class name style React.CSSProperties Inline styles aria-label Accessible label for screen readers 600px var(--bk-spacing-4) var(--vscode-textBlockQuote-background) var(--bk-radius-md) flex space-between flex-start var(--bk-spacing-3) var(--bk-font-weight-semibold) var(--bk-spacing-1) var(--bk-font-size-sm) var(--vscode-descriptionForeground) Upload complete Uploading... Ready to upload Upload Again Start Upload column 100% baukasten-ui var(--bk-spacing-2) var(--bk-font-weight-medium) var(--bk-spacing-6) 1rem 700px var(--vscode-testing-iconPassed) // Indeterminate loading (no value)\n\n\n", + "path": "/components/progressbar", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "value", + "variant", + "height", + "showlabel", + "striped", + "animated", + "classname", + "style", + "button", + "form", + "icon", + "text", + "heading", + "paragraph" + ] + }, + { + "id": "/components/radio", + "title": "Radio", + "description": "Radio buttons for selecting a single option from a group. Use with the Label component for accessible labels, and RadioGroup for managing group state. Fully integrated with VSCode theme variables.", + "content": "Theme Preferences Light theme Dark theme Auto (system preference) Selected theme: Settings Notification Preferences All notifications Important only None Privacy Settings Public - Everyone can see Friends only Private - Only me Language English Spanish French Current settings: );\n}\n\n\n return ( Option 1 Option 2 Option 3 Extra Small Small Medium (default) Large Extra Large Default States Unchecked Checked Disabled States Disabled unchecked Disabled checked Free Plan - $0/month Pro Plan - $10/month Enterprise Plan - $50/month Medium Option 2 (pre-selected) Basic Plan Perfect for individuals. Includes 10GB storage and basic features. Pro Plan For professionals. Includes 100GB storage, priority support, and advanced features. Enterprise Plan For teams. Unlimited storage, dedicated support, and custom integrations. vertical horizontal theme-selection checkbox light dark auto notifications all important none privacy public friends private language english spanish french Radio Radio buttons for selecting a single option from a group. Use with the Label component for accessible labels, and RadioGroup for managing group state. Fully integrated with VSCode theme variables. Basic Usage Radio buttons must be wrapped in a Label component with variant='checkbox' for proper accessibility and alignment. Each radio needs a unique value and a shared name attribute. basic-example option1 option2 option3 options Sizes Radio buttons come in 5 sizes: xs, sm, md (default), lg, and xl. The Label component's size should match the Radio size for proper alignment. size-demo size States Radio buttons support checked and disabled states. Disabled radios are visually dimmed and not interactive. state-default unchecked checked state-disabled disabled RadioGroup - Controlled RadioGroup is the recommended way to manage radio button state. It provides shared name, value, and onChange to all Radio children via context, simplifying state management. theme RadioGroup - Uncontrolled RadioGroup supports uncontrolled mode with defaultValue. The component manages its own state internally. plan pro free enterprise Horizontal Orientation RadioGroup supports horizontal orientation for inline layouts. The default is vertical. size-h medium small large Disabled Group Set disabled on RadioGroup to disable all radios in the group at once. disabled-group Multiline Labels Radio labels can contain multiline text and rich formatting. The Label component automatically handles alignment. plan-multiline basic Settings Form Example Real-world example showing multiple RadioGroups in a settings form. Each group manages its own state independently, with both vertical and horizontal orientations. use client value string | number Value of the radio button (required for radio groups) \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the radio button boolean Whether the radio is checked (for controlled components) false Whether the radio is disabled name string Name attribute for the radio input (automatically provided by RadioGroup) onChange Callback when radio state changes className Additional CSS class name style React.CSSProperties Inline styles Name attribute for all radios in the group Currently selected value (for controlled mode) defaultValue Default value (for uncontrolled mode) Callback when selection changes Whether all radios in the group are disabled orientation \"vertical\" | \"horizontal\" \"vertical\" Layout orientation of the radio group children React.ReactNode Radio components wrapped in Labels 400px var(--bk-spacing-4) var(--vscode-textBlockQuote-background) var(--bk-radius-md) var(--bk-spacing-3) var(--vscode-input-background) var(--bk-radius-sm) var(--bk-font-size-sm) var(--vscode-descriptionForeground) var(--bk-spacing-1) 500px flex column var(--bk-spacing-5) var(--bk-font-weight-semibold) var(--bk-spacing-2) var(--bk-font-size-xs) var(--vscode-editor-font-family) baukasten-ui , flexDirection: , gap: ,\n fontWeight: ,\n marginBottom: , marginBottom: , color: ,\n privacy: ,\n language: \n\n\n\n \n \n \n \n \n \n \n \n", + "path": "/components/radio", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "value", + "size", + "checked", + "disabled", + "name", + "onchange", + "classname", + "style", + "defaultvalue", + "orientation", + "children", + "button", + "input", + "form", + "notification", + "text", + "heading", + "paragraph" + ] + }, + { + "id": "/components/select", + "title": "Select", + "description": "A custom select dropdown component with keyboard navigation, search functionality, auto-positioning, and contextual descriptions. Features a description panel, default/recommended labels, and fully integrates with VSCode theme variables.", + "content": "Developer Profile Primary Language * Country Experience Level Form Data: );\n}\n\n\n return ( Search matches against descriptions. Hover over options to see descriptions in the panel below. Default labels appear on the right in muted text With Icons With Status Colors // With status colors Disabled Select Error State With Disabled Options // Error state Selected value: );\n })()} Full Width Position: Bottom // Position variants Select an option... auto top bottom Search... 300px default recommended Select a language... Select a country... Select experience level... Select A custom select dropdown component with keyboard navigation, search functionality, auto-positioning, and contextual descriptions. Features a description panel, default/recommended labels, and fully integrates with VSCode theme variables. Basic Usage Select displays a dropdown menu of options. Each option requires a value and label. The component supports both controlled (value + onChange) and uncontrolled (defaultValue) modes. option2 Sizes Five size options available: xs, sm, md (default), lg, and xl. Options inside the dropdown scale accordingly. Extra Small Small Medium (default) Large Extra Large Searchable with Descriptions Enable search with the searchable prop. Search matches against the description field if provided, otherwise falls back to label. When options have descriptions, they are displayed in a panel at the bottom of the dropdown as you hover or navigate through options. Search programming languages... Try typing 'typed' or 'memory' Default Labels Options can have a defaultLabel property that displays right-aligned muted text (e.g., 'default', 'recommended'). This helps guide users toward preferred choices. Select your browser... chrome Custom Render with Icons Use renderOption and renderValue for complete control over appearance. You can add icons, badges, colors, or any custom JSX. Choose a language... symbol-method Select status... States Select supports various states: disabled (entire select), error (with error message), and disabled options (individual options can be disabled). This field is required Some options are disabled Controlled Select Control the select value with React state. Use the value prop and onChange callback for controlled behavior. Full Width & Positioning Use the fullWidth prop to make the select take 100% of its container width. Control dropdown position with the position prop: auto (default, calculates best position), top (always above), or bottom (always below). Full width select Always opens below Auto (default) Always opens above Form Example Example of using multiple Select components in a form with controlled state. Each select updates the form data independently. use client options SelectOption[] Array of options to display in the dropdown value Currently selected value (for controlled mode) defaultValue Default selected value (for uncontrolled mode) onChange Callback when value changes onOpen Callback when dropdown opens onClose Callback when dropdown closes placeholder string \"Select an option...\" Placeholder text when no value is selected size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the select position \"auto\" | \"top\" | \"bottom\" \"auto\" Dropdown position preference disabled boolean false Whether the select is disabled fullWidth Whether the select should take full width searchable Whether to show a search input searchPlaceholder \"Search...\" Placeholder for search input error Error message displayed below the select filterOption Custom filter function for searchable select renderOption Custom render function for options in the dropdown renderValue Custom render function for the selected value display maxDropdownHeight \"300px\" Maximum height for the dropdown menu showDescriptionPanel true Whether to show description panel at bottom of dropdown (only when descriptions exist) className Additional CSS class name The value of the option label The label displayed for the option description Optional description used for search filtering and displayed in description panel Whether the option is disabled defaultLabel Optional label shown on the right side (e.g., \"default\", \"recommended\") option1 Option 1 Option 2 option3 Option 3 option4 Option 4 option5 Option 5 JavaScript JavaScript - Dynamic scripting language TypeScript TypeScript - Typed superset of JavaScript Python Python - High-level general purpose language java Java Java - Object-oriented enterprise language cpp C++ C++ - Systems programming language Go - Concurrent programming language rust Rust Rust - Memory-safe systems language Available Option 1 Disabled Option Available Option 2 Also Disabled Available Option 3 United States United States of America United Kingdom United Kingdom of Great Britain Canada Germany Federal Republic of Germany France French Republic Japan Japan - Nippon junior Junior (0-2 years) mid Mid-level (3-5 years) senior Senior (6-10 years) lead Lead (10+ years) flex column var(--bk-spacing-4) var(--vscode-textBlockQuote-background) var(--bk-radius-md) 500px block var(--bk-spacing-1) var(--bk-font-size-sm) var(--bk-font-weight-medium) var(--bk-spacing-2) var(--bk-spacing-3) var(--vscode-input-background) var(--bk-radius-sm) var(--bk-font-size-xs) var(--vscode-editor-font-family) var(--bk-font-weight-semibold) baukasten-ui 350px typed memory var(--vscode-descriptionForeground) Google Chrome firefox Mozilla Firefox safari Safari edge Microsoft Edge brave Brave Browser center active Active pending Pending completed Completed #4caf50 #ff9800 #2196f3 8px 50% none react 100% --- SelectOption Interface: Optional label shown on the right side (e.g., ", + "path": "/components/select", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "options", + "value", + "defaultvalue", + "onchange", + "onopen", + "onclose", + "placeholder", + "size", + "position", + "disabled", + "fullwidth", + "searchable", + "searchplaceholder", + "error", + "filteroption", + "renderoption", + "rendervalue", + "maxdropdownheight", + "showdescriptionpanel", + "classname", + "label", + "description", + "defaultlabel", + "input", + "form", + "menu", + "badge", + "icon", + "text", + "heading" + ] + }, + { + "id": "/components/slider", + "title": "Slider", + "description": "A range slider component for selecting numeric values with customizable appearance and value display. Features size-responsive spacing, tick marks, and performance-optimized callbacks.", + "content": "Extra Small (xs) Small (sm) Medium (md) - Default Large (lg) Extra Large (xl) Temperature (-10 to 40°C) Price ($0-$1000) Volume Current volume: Marks at every step (step=10) Marks every 25 units // Marks every 25 units, but snaps every 5 Volume Control Current Volume: Performance Demo Drag the slider and watch the counters onChange updates onChangeCommitted commits Display Settings Brightness Slider A range slider component for selecting numeric values with customizable appearance and value display. Features size-responsive spacing, tick marks, and performance-optimized callbacks. Basic Usage The default slider with standard configuration. With Value Label Display the current value above the slider. With Min/Max Labels Show minimum and maximum values on either side of the slider. With All Labels Combine value and min/max labels for complete information. Sizes Five size options from extra small to extra large. Spacing between labels, track, and tick marks automatically scales with the slider size for optimal visual balance. Custom Range Configure custom minimum, maximum, and step values. Custom Formatter Use a custom formatter to display values with units or custom formatting. Controlled Component Use the slider as a controlled component with state management. Full Width Make the slider take the full width of its container. Disabled State Sliders can be disabled to prevent interaction. With Tick Marks Display visual tick marks to help users see increments. The slider automatically highlights marks before the current value. Labeled Tick Marks Add custom labels to specific tick marks for better context. Volume Control with Marks A practical example showing a volume slider with tick marks every 10 units. Performance Optimization Use onChangeCommitted for expensive operations like API calls. It only fires when dragging ends, while onChange fires continuously during drag. Settings Panel Example A practical example showing multiple sliders in a settings panel. use client size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the slider min number Minimum value max 100 Maximum value step Step increment value Current value (for controlled component) defaultValue Default value (for uncontrolled component) Callback fired during drag (use for real-time updates) Callback fired when drag ends (use for expensive operations) showMinMax boolean false Whether to show min/max labels showValue Whether to show current value label formatValue Custom formatter for value label fullWidth Whether the slider should take full width of its container disabled Whether the slider is disabled marks boolean | number | SliderMark[] Display tick marks on the slider. Pass true for marks at every step, a number for custom interval, or an array of marks with optional labels baukasten-ui flex column var(--bk-spacing-6) 400px var(--bk-spacing-2) var(--bk-font-size-sm) var(--bk-color-descriptionForeground) var(--bk-spacing-4) var(--bk-spacing-3) var(--bk-color-secondary) var(--bk-radius-md) 100% Off Low Medium High Max 450px var(--bk-radius-lg) var(--bk-font-size-base) var(--bk-font-weight-semibold) var(--bk-color-info) center 0 0 var(--bk-spacing-3) 0 0 0 var(--bk-spacing-4) 0 grid 1fr 1fr var(--bk-font-size-xs) var(--bk-font-weight-medium) var(--bk-spacing-1) var(--bk-font-size-xl) var(--bk-font-weight-bold) var(--bk-color-success) space-between }\n/> }\n fullWidth\n size=\"lg\"\n/>", + "path": "/components/slider", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "size", + "min", + "max", + "step", + "value", + "defaultvalue", + "onchange", + "onchangecommitted", + "showminmax", + "showvalue", + "formatvalue", + "fullwidth", + "disabled", + "marks", + "form", + "text" + ] + }, + { + "id": "/components/spinner", + "title": "Spinner", + "description": "A circular loading spinner component that follows VSCode design patterns. Uses a rotating border animation to indicate loading or processing states. Perfect for async operations, data fetching, and loading indicators.", + "content": "Data Fetcher Loading... ) : (\n 'Fetch Data'\n )} Fetching data... ) : data ? ( ) : ( Click the button to load data );\n}\n\n\n return ( Semantic Colors Primary Success Warning Danger Info Custom Colors #ff6600 #9333ea #06b6d4 // Custom hex colors Processing Save Loading data... Syncing... Connecting to server... Loading content... Please wait while we fetch your data... Processing your request... ) : (\n 'Fetch Data'\n )} Loading primary var(--vscode-button-foreground) Spinner A circular loading spinner component that follows VSCode design patterns. Uses a rotating border animation to indicate loading or processing states. Perfect for async operations, data fetching, and loading indicators. Basic Usage The Spinner displays a rotating circular animation to indicate loading states. By default, it uses the primary color and medium size. Sizes Five size options available: xs, sm, md (default), lg, and xl. The spinner automatically adjusts border width for larger sizes. Colors Spinners can use semantic color tokens for consistency or custom hex values for specific use cases. Semantic colors automatically adapt to theme changes. var(--vscode-charts-blue) var(--vscode-testing-iconPassed) var(--vscode-editorWarning-foreground) var(--vscode-testing-iconFailed) var(--vscode-charts-purple) In Buttons Spinners work well inside buttons to indicate loading states during async operations. Use xs or sm sizes for buttons and match the color to the button's text color. secondary ghost Standalone Loading States Use spinners with text labels to indicate loading states for specific operations. Centered Content Loading Display spinner in the center of a content area as a placeholder while data loads. Inline Loading Indicator Small xs spinners can be placed at the end of lines for subtle loading indicators. Loading Simulation Example Real-world example showing a spinner in a button during data fetching and in a content area as a placeholder. use client size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the spinner color string Custom color for the spinner (uses semantic token or CSS value) className Additional CSS class name style React.CSSProperties Inline styles aria-label \"Loading\" Accessible label for screen readers Data loaded successfully! 400px var(--bk-spacing-4) var(--vscode-textBlockQuote-background) var(--bk-radius-md) var(--bk-spacing-3) Fetch Data 100px flex center var(--bk-border-width-1) solid var(--vscode-panel-border) var(--bk-radius-sm) var(--vscode-input-background) var(--bk-spacing-2) var(--bk-font-size-sm) var(--vscode-descriptionForeground) var(--vscode-foreground) var(--bk-spacing-6) baukasten-ui var(--bk-spacing-8) wrap column var(--bk-font-size-xs) var(--bk-font-weight-medium) , gap: , flexWrap: , alignItems: , flexDirection: , color: ,\n alignItems: ,\n justifyContent: ,\n minHeight: ,\n border: ,\n borderRadius: ,\n backgroundColor: , fontSize: ,\n alignItems: ,\n justifyContent: ,\n minHeight: ,\n display: ,\n alignItems: ,\n justifyContent: // Semantic colors\n\n\n\n\n\n// Custom hex colors\n\n\n \n\n\n\n", + "path": "/components/spinner", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "size", + "color", + "classname", + "style", + "button", + "input", + "icon", + "text", + "heading" + ] + }, + { + "id": "/components/splitpane", + "title": "SplitPane", + "description": "A resizable split pane component for creating dynamic layouts. Perfect for VSCode-style editor groups, sidebars, and panels with draggable dividers that highlight on interaction.", + "content": "📁 src 📄 App.tsx 📄 index.tsx 📄 main.tsx 📁 components 📄 Button.tsx 📄 Input.tsx 📁 styles 📄 main.css App.tsx Hello World SplitPane.tsx (\"} No problems detected. );\n}\n\n\n return ( Left Pane Drag the divider → Right Pane Left Pane Content Right Pane Content Horizontal (default) Left Right Vertical Top Bottom // Vertical (top-bottom) Pane 1 Pane 2 Pane 3 Min 200px Try to make me smaller! 150px - 400px I have both min and max! 150px - 400px range 200px initial 70% initial (preferredSize: 0.7) Top Left Top Right Bottom Panel App.tsx content... SplitPane.tsx content... SplitPane.Pane Props required ))} Behavior & Interaction Draggable Dividers: Click and drag the divider between panes to resize them Hover State: Dividers highlight after a 200ms delay (VSCode-like behavior) to reduce visual noise Active State: Dividers turn blue while being dragged Cursor Feedback: Cursor changes to resize cursor when hovering over dividers Constraint Enforcement: Panes respect minSize and maxSize during resizing Responsive Sizing: Panes resize proportionally when the container size changes Nested Support: SplitPane components can be nested infinitely for complex layouts Use Cases Code Editors: Create VSCode-style layouts with sidebars, editor groups, and panels File Explorers: Split view for directory tree and file preview Data Viewers: Side-by-side comparison views or master-detail layouts Dashboard Panels: Resizable dashboard sections for customizable layouts Documentation: Split view for documentation and live examples horizontal vertical 600px EXPLORER import React from 'react'; return (

Hello World

PROBLEMS SplitPane A resizable split pane component for creating dynamic layouts. Perfect for VSCode-style editor groups, sidebars, and panels with draggable dividers that highlight on interaction. Basic Usage SplitPane divides space between two or more panes with draggable dividers. Use SplitPane.Pane for each section. Drag the divider to resize the panes. color-mix(in srgb, var(--vscode-button-background) 20%, transparent) color-mix(in srgb, var(--vscode-button-secondaryBackground) 40%, transparent) Orientations SplitPane supports two orientations: horizontal (left-right split) and vertical (top-bottom split). 300px color-mix(in srgb, var(--vscode-charts-orange) 30%, transparent) color-mix(in srgb, var(--vscode-charts-red) 30%, transparent) Multiple Panes Add more than two panes to create complex layouts. Each adjacent pair of panes gets its own draggable divider. Size Constraints Control pane sizes with minSize and maxSize props. Panes cannot be resized beyond these constraints. Preferred Sizes Set initial sizes with preferredSize. Use pixels for fixed sizes or values between 0-1 for proportional sizing (e.g., 0.3 = 30% of available space). Nested Split Panes Nest SplitPane components to create complex layouts like VSCode's editor groups with sidebars and panels. VSCode-Style Layout Complete VSCode-style layout with resizable sidebar, split editor groups, and bottom panel. All dividers are draggable and highlight in blue during interaction. use client orientation \"horizontal\" | \"vertical\" \"horizontal\" Orientation of the split panes (horizontal: left-right, vertical: top-bottom) minSize number Default minimum size in pixels for all panes (can be overridden per pane) children React.ReactNode Should be SplitPane.Pane components boolean false Deprecated: Use orientation=\"vertical\" instead Minimum size in pixels for this pane maxSize Maximum size in pixels for this pane preferredSize Preferred/initial size in pixels or as a fraction (0-1 for proportional sizing) Content to display in the pane 100% flex column center var(--vscode-foreground) var(--bk-font-size-md) var(--bk-font-weight-medium) var(--bk-spacing-4) auto border-box var(--vscode-editor-background) var(--vscode-editor-font-family) var(--vscode-editor-font-size) var(--vscode-editor-foreground) var(--vscode-sideBar-background) var(--vscode-sideBar-foreground) 1px solid var(--vscode-sideBar-border) 0 0 var(--bk-spacing-3) 0 var(--bk-font-size-sm) var(--bk-font-weight-semibold) uppercase 0.05em var(--vscode-panel-background) var(--vscode-panel-foreground) 1px solid var(--vscode-panel-border) var(--bk-spacing-2) 500px var(--bk-radius-md) hidden var(--vscode-descriptionForeground) react baukasten-ui var(--bk-spacing-5) ,\n backgroundColor: ,\n borderRadius: , gap: , alignItems: , marginBottom: ,\n fontFamily: ,\n color: ,\n color: ,\n fontWeight: ,\n fontFamily: ,\n color: ,\n marginBottom: ,\n padding: ,\n backgroundColor: ,\n borderRadius: ,\n lineHeight: 1.6,\n color: ,\n marginLeft: // Horizontal (left-right)\n\n Left\n Right\n\n\n// Vertical (top-bottom)\n\n Top\n Bottom\n \n \n
Pane 1
\n
\n \n
Pane 2
\n
\n \n
Pane 3
\n
\n
Deprecated: Use orientation=", + "path": "/components/splitpane", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "orientation", + "minsize", + "children", + "vertical", + "maxsize", + "preferredsize", + "button", + "input", + "form", + "text", + "heading" + ] + }, + { + "id": "/components/statusbar", + "title": "StatusBar", + "description": "A bottom status bar component for displaying contextual information, similar to VSCode", + "content": "Click on status bar items to interact! Branch: | Errors: |\n Warnings: | Position: UTF-8 TypeScript ('problems');\n\n return ( Problems Output Terminal Debug Console Editor Window const greeting = \"Hello, World!\"; console.log(greeting); return a + b; main No Issues Ln 3, Col 8 Click on status bar items to open dropdowns (upward positioning) |\n Encoding: |\n Language: develop feature/new Create New Branch... Ln 10, Col 5 UTF-16 ASCII JavaScript Python );\n}\n\n\n return ( Default Error Warning Info Success 12 Errors 34 Warnings SSH: server.local Ln 42, Col 15 Spaces: 2 TypeScript React Accessibility Clickable items have role=\"button\" and Keyboard support: Enter Space to activate clickable items Tooltips use native title attribute for screen reader support Color variants use semantic colors that work with VSCode themes Best Practices Position: Use as a fixed bottom bar or at the bottom of a container Left Section: Display contextual information (git branch, errors, warnings, connection status) Right Section: Display editor/file information (cursor position, encoding, language, line endings) Tooltips: Always add tooltips to items for clarity Dropdowns: Use placement=\"top-start\" \"top-end\" for status bar dropdowns Variants: Use semantic colors sparingly to highlight important information left right default error warning info success git-branch Click to switch branch Click to cycle errors Click to cycle warnings Click to increment position output terminal debug-console Hello, World! pass Line 3, Column 8 top-start Switch Branch add Line 10, Column 5 top-end Select Encoding Select Language Mode symbol-keyword StatusBar A bottom status bar component for displaying contextual information, similar to VSCode's status bar. Organize items using StatusBarSection for left/right alignment, and StatusBarItem for individual elements. Supports icons, semantic color variants, click handlers, and tooltips. Basic Usage StatusBar displays contextual information at the bottom of your application. Use StatusBarSection to organize items with left or right alignment, and StatusBarItem for individual pieces of information. Color Variants StatusBarItem supports semantic color variants to convey meaning: default, error, warning, info, and success. Use these to highlight important information. Interactive Items Add onClick handlers to make status bar items interactive. Items become clickable with hover states and support keyboard navigation. Click items to see state changes! Active States Use the active prop to highlight the currently selected item. Perfect for indicating which panel or view is active. With Badges Combine status bar items with badges to show counts or status indicators. Great for notifications, sync status, and error/warning counts. sync bell In Editor Context StatusBar positioned at the bottom of an editor window, demonstrating typical usage in an application layout. With Dropdowns Status bar items can trigger dropdowns that open upward using placement='top-start' or 'top-end'. Essential for status bars at the bottom of the screen. Click items to open menus. VSCode-Style Complete A comprehensive VSCode-style status bar with remote connection, git status, errors/warnings, cursor position, file settings, and notifications. remote Connected to Remote Synchronize Changes arrow-up arrow-down 2 Errors 4 Warnings Go to Line/Column Indent Using Spaces Select End of Line Sequence feedback Send Feedback Notifications button use client children React.ReactNode StatusBarSection components className string Additional CSS class name style React.CSSProperties Additional inline styles align \"left\" | \"right\" \"left\" Alignment of items in this section StatusBarItem components icon Icon to display before the text Content to display variant \"default\" | \"error\" | \"warning\" | \"info\" | \"success\" \"default\" Visual variant for semantic colors onClick Click handler - makes the item clickable active boolean false Whether the item is in an active/selected state tooltip Tooltip text (uses native title attribute) 100% var(--bk-spacing-3) var(--vscode-textBlockQuote-background) var(--bk-radius-sm) var(--bk-font-size-sm) var(--bk-spacing-1) var(--vscode-descriptionForeground) problems debug flex column 400px 1px solid var(--vscode-panel-border) var(--bk-radius-md) hidden var(--vscode-editor-background) var(--bk-font-size-md) var(--bk-spacing-4) var(--vscode-editor-font-family) var(--vscode-editor-font-size) auto 300px var(--bk-spacing-2) , flexDirection: , height: );\n const [selectedEncoding, setSelectedEncoding] = useState( , type: , description: ,\n padding: ,\n backgroundColor: ,\n borderRadius: ,\n lineHeight: 1.6,\n color: ,\n marginLeft: StatusBarSection Props: StatusBarItem Props:", + "path": "/components/statusbar", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "children", + "classname", + "style", + "align", + "icon", + "variant", + "onclick", + "active", + "tooltip", + "button", + "form", + "menu", + "notification", + "badge", + "text", + "heading" + ] + }, + { + "id": "/components/table", + "title": "Table", + "description": "A feature-rich table component with support for various styles, sizes, sorting, sticky headers, and loading/empty states. Fully integrates with the Baukasten design system.", + "content": "('name');\n const [sortDir, setSortDir] = useState bVal ? 1 : 0;\n return sortDir === 'asc' ? compare : -compare;\n });\n\n return ( Name Email Role ))} );\n}\n\n\n return ( Default Zebra (Alternating Rows) // Zebra variant (alternating row colors) John Doe john@example.com Admin Status Actions Edit Active Jane Smith jane@example.com Editor Bob Johnson bob@example.com Viewer (No Hover) Loading State Empty State // Empty state Product Quantity Price Widget A $50.00 Widget B $75.00 Total $125.00 Accessibility Uses semantic HTML: <table> <thead> <tbody> <tfoot> Table headers have scope=\"col\" for screen readers Sortable columns have role=\"button\" , and aria-sort Keyboard support: Enter and Space to activate sorting Use caption prop for accessible table descriptions Best Practices Variants: Use zebra variant for tables with many rows Alignment: Right-align numbers, center-align status indicators Sticky Headers: Use with maxHeight for long tables Loading/Empty: Always show feedback when data is loading or empty Captions: Add descriptive captions for better accessibility default zebra top bottom Table A feature-rich table component with support for various styles, sizes, sorting, sticky headers, and loading/empty states. Fully integrates with the Baukasten design system. Basic Usage Table uses a composable API with Table.Head, Table.Body, Table.Row, Table.Cell, and Table.HeaderCell components. This provides full flexibility while maintaining consistent styling. Variants Two visual variants: default (standard borders) and zebra (alternating row colors for better readability). Sizes Five size options: xs, sm, md (default), lg, and xl. Affects padding and font size of cells. Sortable Columns Add sorting functionality to columns using sortable, sortDirection, and onSort props. Click column headers to sort! Column Alignment Align cell content using the align prop: left (default), center, or right. Useful for numbers, actions, and status indicators. center right success Selected & Hoverable Rows Highlight selected rows and control hover effects. Rows are hoverable by default. Loading & Empty States Table.Body supports loading and empty states with customizable messages. Fetching users... No users found Sticky Headers Enable sticky headers that remain visible when scrolling. Requires maxHeight on the Table. With Footer Add table footers for summaries, totals, or additional information. col button use client variant \"default\" | \"zebra\" \"default\" Visual variant (zebra adds alternating row colors) size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of table cells bordered boolean true Whether to show borders fullWidth Whether table should take full width number | string Max height for scrollable table (enables sticky headers) React.ReactNode Table caption for accessibility captionSide \"top\" | \"bottom\" \"top\" Position of caption active Viewer inactive name asc desc email role baukasten-ui flex column var(--bk-spacing-5) var(--bk-spacing-2) var(--bk-font-size-sm) var(--bk-font-weight-medium) var(--bk-spacing-4) (default) react var(--bk-spacing-6) var(--vscode-textBlockQuote-background) var(--bk-radius-md) var(--bk-spacing-3) var(--vscode-descriptionForeground) \n \n \n Name\n Status\n Actions\n \n \n \n \n John Doe\n \n Active\n \n \n \n \n \n \n
", + "path": "/components/table", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "variant", + "size", + "bordered", + "fullwidth", + "maxheight", + "caption", + "captionside", + "button", + "form", + "table", + "badge", + "icon", + "text", + "heading" + ] + }, + { + "id": "/components/tabs", + "title": "Tabs", + "description": "A tabbed interface component following VSCode design patterns. Supports horizontal and vertical orientations, icons, closable tabs, and both controlled and uncontrolled modes. Perfect for organizing content into separate views.", + "content": "All tabs closed. Refresh to reset. );\n }\n\n return ( ))} External controls: Previous Next Step 1 Step 2 Step 3 Step 1: Basic Information Enter your basic information to get started. Full Name Step 2: Contact Details Provide your contact information. Email Step 3: Complete Review and submit your information. Submit );\n}\n\n\n return ( Tab 1 Tab 2 Tab 3 Content for Tab 1 Content for Tab 2 Content for Tab 3 Line (Default) - VSCode Style Overview Details Settings Clean line indicator at the bottom. Perfect for professional interfaces. Default variant with subtle active state. Lifted - Classic Tabbed Interface Active tab has a border that connects to content area. Creates a \"lifted\" effect. Classic tabbed interface style. Pills - Modern Tag Style No borders, just subtle rounded corners. Active tab has a filled background. Modern, clean appearance. // Lifted variant (classic tabs) // Pills variant (modern style) Horizontal (Default) Home Profile Home Content This is the home tab content with horizontal orientation. Profile Content User profile information goes here. Settings Content Application settings and preferences. Vertical Dashboard Analytics Reports Users Overview of your application metrics. Detailed analytics and insights. Generate and view reports. User management and permissions. // Vertical orientation index.tsx styles.css config.json utils.ts // index.tsx import React from 'react'; /* styles.css */ padding: 20px; \"name\": \"my-app\", \"version\": \"1.0.0\" // utils.ts return date.toISOString(); File 1 content File 2 content File 3 content Available Disabled Tab Another Available Locked Available Content This tab is clickable and accessible. This content is not accessible. Another Available Tab This tab is also clickable. This content is locked. Horizontal - Indicator at End (Bottom - Default) Indicator at the bottom (most common) Content 2 Content 3 Horizontal - Indicator at Start (Top) Indicator at the top // Indicator at top Next Step Step 1 content Step 2 content Step 3 content General Appearance Editor General Settings Enable auto-save Show welcome screen on startup Enable telemetry Font Family Font Size Editor Settings Show line numbers Word wrap Tab Size Behavior & Implementation Controlled vs Uncontrolled: Use defaultValue for uncontrolled mode (component manages state) or value onChange for controlled mode (you manage state) Tab Selection: Only the panel matching the active tab value is rendered. Use the same value for Tab and TabPanel to link them Close Behavior: When implementing closable tabs, handle the onClose callback to update your tabs array and manage active tab switching Context-based: Uses React Context internally to share state between components. All sub-components must be used within a Tabs wrapper Accessibility TabList has role=\"tablist\" and appropriate aria-orientation Each Tab has role=\"tab\" with aria-selected indicating active state Each TabPanel has role=\"tabpanel\" aria-hidden for inactive panels Active tabs have , inactive tabs have Disabled tabs have aria-disabled=\"true\" and cannot receive focus Best Practices Variants: Use line variant for professional interfaces, lifted for classic tabs, pills for modern designs Orientation: Use horizontal for content sections and vertical for navigation sidebars Icons: Add icons to provide visual context, especially for file tabs or categorized content Closable Tabs: Use for editor-like interfaces where users can open/close documents Controlled Mode: Use when you need to control tab state externally (wizards, forms, URL-based routing) Tab Labels: Keep tab labels concise. Use 1-2 words when possible horizontal vertical line lifted pills start end primary step1 circle-large-filled step2 circle-large-outline step3 full-name John Doe email john@example.com Tabs A tabbed interface component following VSCode design patterns. Supports horizontal and vertical orientations, icons, closable tabs, and both controlled and uncontrolled modes. Perfect for organizing content into separate views. Basic Usage Tabs use a composable API with Tabs, TabList, Tab, TabPanels, and TabPanel components. This provides full flexibility while maintaining consistent styling. tab1 tab2 tab3 Variants Three visual variants available: line (VSCode-style with indicator line), lifted (classic tabbed interface with borders), and pills (modern filled pills). Orientations Tabs support both horizontal (default) and vertical orientations. Horizontal tabs are common for content sections, while vertical tabs work well for navigation menus. home profile settings dashboard analytics reports users Sizes Five size options available: xs, sm, md (default), lg, and xl. Sizes affect padding, font size, and min-height. With Icons Tabs can include VSCode Codicons to provide visual context. Perfect for file editors, document types, or categorized content. file1 file file2 file3 file4 symbol-method name my-app version 1.0.0 Closable Tabs Closable tabs with close buttons that appear on hover (VSCode editor style). Click the × button to close a tab. Proper state management is needed when closing tabs. Disabled Tabs Tabs can be disabled to prevent interaction. Disabled tabs have reduced opacity and are not clickable. available disabled1 another disabled2 lock disabled locked Indicator Position Control where the active indicator appears: start (top for horizontal, left for vertical) or end (bottom for horizontal, right for vertical). Works with all variants. Controlled Tabs Tabs can be controlled externally using the value and onChange props. This is useful for wizards, multi-step forms, or when you need to manage tab state outside the component. Settings Panel Example A real-world example showing tabs in a settings panel with forms and interactive content. general settings-gear appearance symbol-color editor edit checkbox font-family Consolas, Monaco, monospace font-size number tab-size tablist tab tabpanel true use client string Currently active tab value (controlled mode) Default active tab value (uncontrolled mode) Callback when active tab changes orientation \"horizontal\" | \"vertical\" \"horizontal\" Orientation of the tabs variant \"line\" | \"lifted\" | \"pills\" \"line\" Visual variant of the tabs indicatorPosition \"start\" | \"end\" \"end\" Position of the active indicator (start: top/left, end: bottom/right) size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the tabs Unique value identifying this tab children React.ReactNode Tab label content icon CodiconName Optional VSCode Codicon name closable boolean false Whether the tab can be closed Callback when close button is clicked Whether the tab is disabled App.tsx var(--bk-spacing-8) center var(--vscode-descriptionForeground) var(--bk-spacing-2) var(--bk-spacing-3) flex var(--bk-font-size-sm) baukasten-ui column var(--bk-spacing-5) var(--bk-font-weight-medium) 300px var(--bk-spacing-4) (default) monospace react ./App var(--bk-spacing-6) var(--vscode-textBlockQuote-background) var(--bk-radius-md) \n \n index.tsx\n styles.css\n utils.ts\n \n \n File 1 content\n File 2 content\n File 3 content\n \n", + "path": "/components/tabs", + "category": "Components", + "keywords": [ + "react", + "component", + "ui", + "widget", + "value", + "defaultvalue", + "onchange", + "orientation", + "variant", + "indicatorposition", + "size", + "children", + "icon", + "closable", + "onclose", + "disabled", + "button", + "input", + "form", + "list", + "menu", + "text", + "heading" + ] + }, + { + "id": "/components/textarea", + "title": "TextArea", + "description": "A multi-line text input component with size, resize, and error message support. Fully integrates with the design system tokens for consistent theming.", + "content": "))} No Resize Vertical Resize (Default) Horizontal Resize Both Directions 2 Rows (Compact) 4 Rows (Default) 8 Rows (Tall) Default State With Error Message Disabled State Disabled with Error // With error message // Disabled state // Disabled with error Default Width (Inline) Full Width Multiple Full Width TextAreas // Full width // Stack multiple full width textareas Feedback Form Blog Post Editor Form with Validation // Blog post editor // Form with validation Error Handling String error: Displays the error message below the textarea and shows error border styling Boolean error: Only shows error border styling, no message displayed With FormHelper: Use boolean error for border, then add FormHelper component for more control over error display Accessibility Uses native <textarea> element for full browser support and accessibility Supports all standard textarea attributes: name value onChange , etc. Error messages are automatically associated with the textarea for screen readers Use with FieldLabel and htmlFor attribute to connect labels to textareas Best Practices Row count: Use 2-3 rows for short inputs, 4-6 for medium content, 8+ for long form content Resize: Use resize=\"vertical\" (default) for most cases. Use resize=\"none\" for fixed-height fields like titles Full width: Always use fullWidth in form layouts for consistent sizing Placeholder: Use clear, concise placeholder text that describes the expected input Labels: Always pair with or use aria-label for accessibility Error messages: Provide specific, actionable error messages that help users fix validation issues none vertical horizontal both TextArea A multi-line text input component with size, resize, and error message support. Fully integrates with the design system tokens for consistent theming. Basic Usage Simple textarea with placeholder text. By default, textareas have 4 rows and vertical resize enabled. Enter your message here... Sizes Five size options available: xs, sm, md (default), lg, and xl. Size affects font size, padding, and line height. Extra small Small Medium (default) Large Extra large Resize Options Control how users can resize the textarea: none (fixed size), vertical (height only, default), horizontal (width only), or both (width and height). Cannot be resized Drag bottom edge to resize vertically Drag right edge to resize horizontally Drag corner to resize in any direction Fixed size Vertical only (default) Horizontal only Both directions Row Options Control the initial visible height using the rows prop. Default is 4 rows. Users can resize vertically if resize is enabled. Short textarea with 2 rows Default textarea with 4 rows Tall textarea with 8 rows Compact Default Tall States TextArea supports default, error, and disabled states. Error state shows a red border and optional error message. Disabled state prevents interaction. Enter description... Description must be at least 10 characters This field is disabled Disabled with error This field has an error Enter your message... Disabled Error message Width Options By default, textareas have auto width. Use fullWidth to make the textarea span the full width of its container. Useful for form layouts. Auto width This spans full width Summary Description Notes Full width Form Examples Common form patterns using TextArea. Combine different props to create various form layouts. Subject Your feedback... Title Write your post content here... Tags (comma separated) Product name Product description Description must be at least 50 characters Additional notes (optional) Write your post... Tags Notes (optional) use client size \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" \"md\" Size of the textarea error string | boolean Error state or message. String displays error below, boolean only shows error border boolean false Whether the textarea should take full width of its container resize \"none\" | \"vertical\" | \"horizontal\" | \"both\" \"vertical\" Resize behavior for the textarea rows number Number of visible text rows placeholder string Placeholder text shown when textarea is empty disabled Whether the textarea is disabled baukasten-ui flex column var(--bk-spacing-4) var(--bk-spacing-2) var(--bk-font-size-sm) var(--bk-font-weight-medium) (default) var(--bk-spacing-5) 100% 8px var(--bk-spacing-6) var(--bk-spacing-3) var(--bk-font-size-base) var(--bk-font-weight-semibold) 12px var(--vscode-textBlockQuote-background) var(--bk-radius-md) var(--vscode-descriptionForeground)