=============== LIBRARY RULES =============== From library maintainers: - Use Svelte 5 runes ($props, $state, $derived, $effect) for reactivity - Import enums from '@requify/requify-design-system' for type-safe variants and sizes - Always use TypeScript strict mode with comprehensive type definitions - Follow existing component patterns for consistency - Use CSS custom properties for theming, never hardcode colors - Ensure all interactive elements are keyboard accessible - Provide proper ARIA attributes for screen readers - Use snippets for flexible content composition - Test components in both light and dark modes - Wrap bits-ui primitives with custom styling and theming - Follow WCAG AA/AAA accessibility guidelines - Use cn() utility for merging Tailwind classes - Bind values with $bindable() for two-way data flow ### DropdownDivider Installation and Example Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Shows the Svelte installation for DropdownDivider and an example demonstrating its use as a visual separator between dropdown items. ```svelte Action 1 Action 2 ``` -------------------------------- ### DropdownLink Installation and Example Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Explains the Svelte installation for DropdownLink and shows an example of creating clickable links within a dropdown menu. ```svelte Settings Profile ``` -------------------------------- ### DropdownItem Installation and Example Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Provides the Svelte installation code for DropdownItem and an example of its usage with click handlers and custom classes. ```svelte Edit Delete ``` -------------------------------- ### DropdownHeader Installation and Example Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Details the Svelte installation for DropdownHeader and provides an example of its usage to group related dropdown items under a section title. ```svelte Actions Edit Delete ``` -------------------------------- ### Dropdown: Installation Example (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Shows the necessary import statements for using the Dropdown component and its related sub-components (DropdownItem, DropdownDivider, DropdownHeader, DropdownLink) from the 'requify-design-system' library in Svelte. ```svelte ``` -------------------------------- ### Setup Tailwind CSS and Typography Plugin Source: https://github.com/requify-app/requify-design-system/blob/main/README.md Installs Tailwind CSS and the @tailwindcss/typography plugin, essential for styling and component rendering. This step is crucial for the design system's functionality. ```bash npm install -D tailwindcss @tailwindcss/typography ``` -------------------------------- ### Implement Keyboard Accessibility with Shortcuts (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/usage-guides.md Shows how to ensure keyboard accessibility by adding keyboard shortcuts. This example uses Svelte's `onMount` lifecycle function to add a global keydown event listener that triggers a modal when '⌘K' or 'Ctrl+K' is pressed. ```svelte

Press ⌘K to open

``` -------------------------------- ### Create Responsive Design with Size Variants (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/usage-guides.md Demonstrates how to implement responsive design by using different size variants for components based on screen size. This example applies different sizes to a button using Tailwind CSS utility classes that target specific breakpoints (md, lg). ```svelte ``` -------------------------------- ### Input Component Basic Usage and Sizing Examples Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/foundation.md Demonstrates the basic usage of the Input component and how to apply different size variants (XS, SM, MD, LG, XL). These examples require no external dependencies beyond the Input component itself. ```svelte ``` ```svelte ``` -------------------------------- ### Requify Design System Development Commands Source: https://github.com/requify-app/requify-design-system/blob/main/README.md Provides essential commands for developing with the Requify Design System, including installing dependencies, starting the development server, building for production, type checking, and formatting code. ```bash # Install dependencies bun install # Start development server bun run dev # Build for production bun run build # Type check bun run check # Format code bun run format ``` -------------------------------- ### Accordion Component Basic Setup (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Illustrates the fundamental setup for using the Accordion component in Svelte. It shows how to import and use `Accordion` and `AccordionItem` components, demonstrating a collapsible content panel structure. ```svelte ``` -------------------------------- ### Popover Installation Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/feedback.md Illustrates the basic import statement required to use the Popover component within a Svelte application. This setup is necessary before utilizing the Popover's functionality. ```svelte ``` -------------------------------- ### Svelte Theme Switching Example Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/usage-guides.md A Svelte component demonstrating how to dynamically switch between themes ('light', 'dark', 'brand') by updating a state variable and setting a data attribute on the document's root element. ```svelte ``` -------------------------------- ### TableHead Example (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md A basic Svelte example demonstrating the usage of the TableHead component with TableHeadCell children. ```svelte Name Email ``` -------------------------------- ### Example Svelte Component Using Requify Components Source: https://github.com/requify-app/requify-design-system/blob/main/README.md Shows a practical example of using Requify Design System components like Card, Label, Input, and Button within a Svelte component. It demonstrates binding input values and setting component variants and sizes. ```svelte

Example Card

This is a sample card component.

``` -------------------------------- ### Install Table Component - Svelte Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md Demonstrates how to import and use the Table component and its related sub-components from the 'requify-design-system' package in a Svelte application. This is the initial setup for utilizing the table component. ```svelte ``` -------------------------------- ### SidebarItem Installation - Svelte Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Shows how to install and import the `SidebarItem` component from the 'requify-design-system' package. ```svelte ``` -------------------------------- ### StepIndicator Basic Installation Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md Shows how to import and install the StepIndicator component from the requify-design-system package for use in multi-step workflows. ```svelte ``` -------------------------------- ### Install Requify Search Component Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/forms.md Demonstrates how to import and use the Search component from the 'requify-design-system' package in a Svelte application. This is the initial setup required before utilizing the component's features. ```svelte ``` -------------------------------- ### Basic Table Example - Svelte Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md Provides a fundamental example of the Table component in Svelte, showcasing how to structure table headers and body with data. This illustrates the basic rendering of tabular data. ```svelte Name Email Status John Doe john@example.com Active Jane Smith jane@example.com Active
``` -------------------------------- ### TableHeadCell Example (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md A basic Svelte example demonstrating the usage of the TableHeadCell component for table headers. ```svelte Name ``` -------------------------------- ### Implement Navigation with Sidebar, SidebarGroup, SidebarItem, SidebarDropdown Svelte Components Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/usage-guides.md This Svelte component example showcases the implementation of a sidebar navigation menu using components from '@requify/requify-design-system'. It demonstrates structuring navigation into groups, individual items with icons, and dropdown menus for hierarchical organization. ```svelte {#snippet icon()} {/snippet} Dashboard {#snippet icon()} {/snippet} Analytics {#snippet icon()} {/snippet} Settings {#snippet icon()} {/snippet} Website {#snippet icon()} {/snippet} Mobile App Documentation Support Help Center ``` -------------------------------- ### Sidebar Installation - Svelte Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Demonstrates how to install and import the Sidebar component and its related sub-components from the 'requify-design-system' package. ```svelte ``` -------------------------------- ### Listgroup Component Examples (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md Illustrates how to use the Listgroup and ListgroupItem components in Svelte for organizing lists of content. Examples cover basic list creation, applying custom styling, incorporating icons, and showing an active list item state. ```svelte select('item1')}>Item 1 select('item2')}>Item 2 select('item3')}>Item 3 ``` ```svelte Item 1 Item 2 ``` ```svelte Profile Settings ``` ```svelte Active Item Other Item ``` -------------------------------- ### Product Card Example Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/foundation.md An example of a Card component used to display product information, including an image, name, and price. It utilizes the `hoverable` prop for an interactive effect. ```svelte Product

Product Name

$99.99

``` -------------------------------- ### Install Requify Design System Package Source: https://github.com/requify-app/requify-design-system/blob/main/README.md Installs the Requify Design System package using npm, yarn, or bun. This is the first step to integrating the design system into your project. ```bash npm install @requify/requify-design-system # or yarn add @requify/requify-design-system # or bun add @requify/requify-design-system ``` -------------------------------- ### Blockquote Component Examples (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/typography.md Demonstrates the Blockquote component for displaying quoted text. Includes examples of a basic blockquote and a blockquote with a citation, showcasing proper semantic markup and styling for testimonials or highlighted text. ```svelte ``` ```svelte
This is a quoted text block for testimonials or citations.
``` ```svelte

"Design is not just what it looks like and feels like. Design is how it works."

— Steve Jobs
``` -------------------------------- ### ListgroupItem Installation and Basic Usage Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md Provides instructions for installing the ListgroupItem component from the requify-design-system package and demonstrates its basic usage with a click handler. ```svelte Item ``` -------------------------------- ### TableBodyRow Example (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md A Svelte example demonstrating the TableBodyRow component with an 'onclick' handler and TableBodyCell children. ```svelte Data ``` -------------------------------- ### Button Installation - Svelte Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/foundation.md Demonstrates how to import the Button component and its associated types from the 'requify-design-system' package. ```svelte ``` -------------------------------- ### TabsList Component Example Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Demonstrates the basic usage of the TabsList component within a Tabs structure. ```svelte Tab 1 Tab 2 Content ``` -------------------------------- ### TabsContent Component Installation and Example (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md The TabsContent component displays the content for a specific tab. It needs to be imported and used with a 'value' prop that matches the corresponding TabsTrigger. The 'children' prop holds the content to be displayed when the tab is active. Additional CSS classes can be applied using the 'class' prop. ```svelte

Profile Settings

Configure your profile preferences

``` -------------------------------- ### Progressbar Installation (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md Instructions for installing the Progressbar component in a Svelte project. It requires importing 'Progressbar', 'ProgressbarVariant', and 'ComponentSize' from 'requify-design-system'. ```svelte ``` -------------------------------- ### Install Select Component - Svelte Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/forms.md Demonstrates how to import and install the Select component from the 'requify-design-system' library in a Svelte project. This is the initial step before using the component in your application. ```svelte ``` -------------------------------- ### StepIndicator Basic 3-Step Example Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md A fundamental example of the StepIndicator component, displaying a basic 3-step process with labels and setting the current step. ```svelte ``` -------------------------------- ### CloseButton Basic Usage and Integration Examples (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/foundation.md Provides examples of using the CloseButton component. This includes basic integration with an `onclick` handler, use within a Modal header, and custom positioning using absolute CSS. ```svelte ``` ```svelte ``` ```svelte

Content

``` ```svelte

This is an alert with a close button

``` -------------------------------- ### TableBody Example (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/data-display.md A Svelte example showcasing the TableBody component containing TableBodyRow and TableBodyCell components. ```svelte John Doe ``` -------------------------------- ### AccordionItem: Basic Usage Example (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Provides a simple example of how to use the AccordionItem component. It requires a 'value' and 'title' prop, and its content is placed between the opening and closing tags. ```svelte

Answer goes here

``` -------------------------------- ### Warning Message Alert Example (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/feedback.md Presents an example of the Alert component used for warning messages, employing the 'warning' variant to alert users of potential issues. ```svelte

Your session will expire in 5 minutes

``` -------------------------------- ### Success Message Alert Example (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/feedback.md Provides a specific example of using the Alert component for success messages. It utilizes the 'success' variant for clear visual feedback. ```svelte

Profile updated successfully!

``` -------------------------------- ### TabsList Component Installation Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Shows how to import the TabsList component from the requify-design-system. ```svelte ``` -------------------------------- ### Tooltip with All Sides Example Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/feedback.md Provides examples of the Tooltip component placed on all four sides ('top', 'right', 'bottom', 'left') relative to the trigger button. This showcases the versatility of the 'side' prop. ```svelte ``` -------------------------------- ### Accordion: Rich Content Example (Svelte) Source: https://github.com/requify-app/requify-design-system/blob/main/src/docs/components/navigation.md Demonstrates using the Accordion component with complex content inside its panels. This example shows the inclusion of form elements like Input, Switch, and Select within an AccordionItem. ```svelte
Dark mode Enter your work email address Password must be at least 8 characters Format: (555) 123-4567