file: docs/changelog.mdx meta: { "title": "Changelog", "description": "Latest updates to the Twistail UI library.", "full": false } ## v0.11.0 (2025/03/30) * New component: [ProgressCircle](/docs/components/progress-circle) component. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.10.0 (2025/03/30) * New component: [ProgressBar](/docs/components/progress-bar) component. * Updated fumadocs to v5.2.0. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.9.0 (2025/03/29) * New component: [BarList](/docs/components/bar-list) component. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.8.2 (2025/03/28) * Changes: use `hideArrow` props instead of `showArrow` on [Tooltip](/docs/components/tooltip) component. * Minor fixes on documentation command navigation. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.8.1 (2025/03/28) * Fix [Tracker](/docs/components/tracker) component to hide arrow. * Changes: use `hideArrow` props instead of `showArrow` on [Tracker](/docs/components/tracker) component. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.8.0 (2025/03/28) * New component: [Tracker](/docs/components/tracker) component (adopted from Tremor). **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.7.0 (2025/03/27) * New component: [Datetime Picker](/docs/components/datetime-picker) component. * Changes: [Input](/docs/components/input) component use `containerClassName` instead of `className` * Fixes: improved styling for [Calendar](/docs/components/calendar) component. **Contributors:** [@riipandi](https://github.com/riipandi) **Credits:** * [datetime-picker](https://shadcnui-expansions.typeart.cc/docs/datetime-picker) by [shadcn-ui expansions](https://shadcnui-expansions.typeart.cc). * [shadcn-datetime-picker](https://github.com/huybuidac/shadcn-datetime-picker) by [Bui Dac Huy](https://github.com/huybuidac). *** ## v0.6.0 (2025/03/27) * New component: [Blockquote](/docs/components/blockquote) component. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.5.5 (2025/03/27) * Changes: auto resize [Textarea](/docs/components/textarea) height based on content. **Contributors:** [@riipandi](https://github.com/riipandi) **Credits:** [shadcnui-expansions](https://shadcnui-expansions.typeart.cc/docs/autosize-textarea) *** ## v0.5.4 (2025/03/27) * Updated license information for [twistail-react](https://www.npmjs.com/package/twistail-react) package. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.5.3 (2025/03/27) * Changes: split [Sidebar](/docs/components/sidebar) component files. * Move sidebar width variables to CSS variables. * Move sidebar cookies parameters to SidebarProvider props. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.5.2 (2025/03/26) * Changes: add `compact` variant to [Dialog](/docs/components/dialog) component. * Changes: add `DialogDivider` variant to [Dialog](/docs/components/dialog) component. * Changes: add `compact` variant to [Alert Dialog](/docs/components/alert-dialog) component. * Changes: add `DialogDivider` variant to [Alert Dialog](/docs/components/alert-dialog) component. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.5.1 (2025/03/26) * Refactor [Card](/docs/components/card) component composition. ```tsx ``` **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.5.0 (2025/03/26) * New component: [Description List](/docs/components/description-list) component. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.4.0 (2025/03/26) * New component: [Split Pane](/docs/components/split-pane) component. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.3.0 (2025/03/25) * New component: [Calendar](/docs/components/calendar) component. * Changes: add `hideChevrons` props to [Listbox](/docs/components/listbox) component. * Changes: remove `clx` from [Kbd](/docs/components/kbd) component. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.2.1 (2025/03/24) * Fix missing export form Form component in `twistail-react` **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.2.0 (2025/03/24) * Add [Form](/docs/components/form) component (preview). * Docs: reorginize component stories (storybook). * Docs: change imports based on component name. Form component is still in preview. It may change in the future. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.1.2 (2025/03/22) * Add `info` variant to [Badge](/docs/components/badge) component. * Set default variant to [Badge](/docs/components/badge) component to `neutral`. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.1.1 (2025/03/22) Minor updates: exporting `ToasterProps` from [Toast](/docs/components/toast) component. **Contributors:** [@riipandi](https://github.com/riipandi) *** ## v0.1.0 (2025/03/21) This is the initial release of the Twistail UI library. It includes the following components: * `Accordion` (based on Tremor) * `AlertDialog` (based on shadcn/ui) * `AspectRatio` (based on shadcn/ui) * `Avatar` (based on shadcn/ui) * `Badge` (based on Tremor) * `Button` (based on Tremor) * `Breadcrumb` (based on shadcn/ui) * `Callout` (based on Tremor) * `Card` (based on Tremor) * `Checkbox` (based on Tremor) * `Collapsible` (based on shadcn/ui) * `Combobox` (based on shadcn/ui) * `Command` (based on shadcn/ui) * `ContextMenu` (based on shadcn/ui) * `Dialog` (based on Tremor) * `Divider` (based on Tremor) * `Drawer` (based on Tremor and shadcn/ui) * `DropdownMenu` (based on Tremor) * `Heading` (adapted from Catalyst) * `HoverCard` (based on shadcn/ui) * `Input` (based on Tremor) * `InputPin` (based on Tremor) * `Kbd` (based on Wedges) * `Label` (based on Tremor) * `Listbox` (based on Tremor) * `Menubar` (based on shadcn/ui) * `MultiSelect` (based on sersavan/shadcn-multi-select-component) * `Navigation Menu` (based on shadcn/ui) * `Pagination` (based on shadcn/ui) * `Popover` (based on Tremor) * `RadioCardGroup` (based on Tremor) * `Radiogroup` (based on Tremor) * `ScrollArea` (based on shadcn/ui) * `Select` (based on Tremor) * `Sidebar` (based on shadcn/ui) * `Skeleton` (based on shadcn/ui) * `Slider` (based on Tremor) * `Switch` (based on Tremor) * `Table` (based on Tremor) * `TabNavigation` (based on Tremor) * `Tabs` (based on Tremor) * `Text` (adapted from Catalyst) * `Textarea` (based on Tremor) * `Toast` (based on shadcn/ui Sonner) * `Toggle` (based on Tremor) * `Tooltip` (based on Tremor and shadcn/ui) file: docs/index.mdx meta: { "title": "Introduction", "full": false } This documentation is still in progress. Some components may not be fully documented yet. Twistail is a thoughtfully crafted component library designed for modern React applications. Built on the foundation of Radix UI Primitives, Tailwind CSS v4, Tailwind Variants, and TypeScript, it offers a comprehensive suite of accessible, customizable, and type-safe components to streamline your development process. ## Core Principles * **Tailwind Variants** - Leveraging the power of Tailwind Variants for advanced styling control * **Accessibility First** - Every component adheres to WCAG guidelines and WAI-ARIA patterns * **Developer Experience** - Intuitive APIs with comprehensive TypeScript definitions * **Design Flexibility** - Easily adapt components to match your unique design system * **Separation of Concerns** - CSS files are separated from component logic for improved maintainability and readability ## Why Twistail? Twistail stands out from other component libraries like shadcn/ui by fully embracing [**Tailwind Variants**](https://www.tailwind-variants.org/) - a powerful utility that combines Tailwind's flexibility with a first-class variant API. This key difference provides: * **Superior Variant Management** - Create complex component states with a clean, declarative API * **Responsive Variants** - Easily define different styles across breakpoints * **Slot-based Styling** - Apply styles to specific parts of components with precision * **Conflict Resolution** - Automatic handling of conflicting Tailwind classes * **Type Safety** - Full TypeScript integration for autocomplete and error prevention Quick setup guide to integrate Twistail into your project. Learn how to customize and extend component styles with Tailwind Variants. Browse our component library with usage examples. Learn how to contribute to the Twistail project. ## Design Philosophy Twistail follows a component architecture that maximizes the benefits of Tailwind Variants while separating styling from logic. This approach offers: * **Improved Readability** - Cleaner component files with variant definitions clearly separated * **Enhanced Maintainability** - Style variants can be modified without affecting component logic * **Better Collaboration** - Designers can work on style variants while developers focus on functionality * **Simplified Theming** - Create theme variants with minimal code duplication * **Consistent API** - Uniform pattern for handling component variations across the library This architecture creates a more sustainable and flexible codebase that scales with your project's complexity. ## FAQs Twistail is licensed under a dual license: [Apache License 2.0](https://www.tldrlegal.com/license/apache-license-2-0-apache-2-0) and [MIT license](https://www.tldrlegal.com/license/mit-license). This means you can choose either license based on your project's needs. The dual licensing provides flexibility for both commercial and open-source projects. Copyrights in the project are retained by their contributors. For more details, you can refer to the [LICENSE-APACHE](https://github.com/riipandi/twistail/blob/main/LICENSE-APACHE) and [LICENSE-MIT](https://github.com/riipandi/twistail/blob/main/LICENSE-MIT) files in the repository. The key difference is our integration of Tailwind Variants. While `shadcn/ui` uses [Class Variance Authority](https://cva.style/docs), Twistail leverages Tailwind Variants to provide a more powerful, type-safe API for component styling. This allows for more complex variant combinations, better handling of responsive styles, and cleaner component code. Additionally, our separation of styling from component logic creates a more maintainable architecture. Tailwind Variants enhances the Tailwind experience by providing a first-class variant API. This means you can define component variants (like size, color, state) in a structured way with TypeScript support. It efficiently handles class merging, prevents style conflicts, and enables slot-based styling for complex components. The result is cleaner code, better developer experience, and more maintainable styling. Separating CSS from component logic improves maintainability and readability of the codebase. This approach makes it easier to update styles without touching component logic, simplifies debugging of styling issues, and creates a cleaner development experience. When combined with Tailwind Variants, this separation becomes even more powerful, allowing for sophisticated styling patterns without cluttering component files. Yes! Twistail is designed to work seamlessly with existing Tailwind CSS projects. Our components use Tailwind Variants which is compatible with standard Tailwind configurations. You can gradually adopt Twistail components alongside your existing UI elements and even leverage Tailwind Variants for your custom components. Twistail is primarily designed and optimized for Tailwind CSS v4. While it can be used with Tailwind CSS v3, some adjustments may be necessary, and you might encounter styling issues due to breaking changes introduced in Tailwind CSS v4. For the best experience and to avoid potential styling problems, we recommend using Twistail with Tailwind CSS v4. If you're using Tailwind CSS v3, be prepared to make some adaptations to ensure proper component rendering. Absolutely. Twistail is built with production use cases in mind. Our components are thoroughly tested for accessibility, performance, and cross-browser compatibility. Even better, Twistail components are designed to be highly customizable. The use of Tailwind Variants also ensures consistent styling behavior across different environments and browsers. ## Acknowledgements Twistail is a thoughtful blend of design philosophies from two exceptional UI libraries: * **[Tremor](https://tremor.so/)**: Many of Twistail's foundational components draw heavy inspiration from Tremor's well-crafted designs. We've reimagined these components with our own architectural approach while respecting Tremor's excellent work. * **[shadcn/ui](https://ui.shadcn.com/)**: Twistail incorporates design patterns and component structures from shadcn/ui, adapting them to fit seamlessly with the Twistail ecosystem. Key differences that set Twistail apart include: * Separation of style files for each component, improving organization and customization * Use of [Lucide icons](https://lucide.dev/) instead of Remix Icons (used by Tremor) * Integration of Tailwind Variants for enhanced styling capabilities * A carefully curated blend of design elements from both inspirational libraries We're grateful to these projects for their contributions to the React and Tailwind ecosystem, and for providing the foundation upon which Twistail builds its unique identity. ## Join the Community Twistail is more than just a component library - it's a growing community of developers building better user interfaces with modern tools like Tailwind Variants. Connect with us: * Star our [GitHub repository](https://github.com/riipandi/twistail) * Follow us for updates and announcements * Share your projects built with Twistail We're excited to see what you create! file: docs/theming.mdx meta: { "title": "Theming", "full": false } Learn how to customize the look and feel of your app. This documentation not available yet. Please check back later. file: docs/cli/index.mdx meta: { "title": "Twistail CLI", "full": false } A CLI for managing UI components in your project. This utility is still in development. ```package-install npm install -g twistail ``` file: docs/components/accordion.mdx meta: { "title": "Accordion", "full": false } A vertically stacked set of interactive headings that each reveal a section of content. Storybook Radix UI Docs Source *** import Demo from '#/demo/accordion/preview' ```tsx 'use client' import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from 'twistail-react/accordion' export default function AccordionDemo() { return ( In the app
  1. Step 1: Tap the Inbox icon and then tap Add receipts.
  2. Step 2: Tap the + symbol to attach a photo or PDF of the receipt for our system to match.
Via browser extension
  1. Step 1:{' '} Download the browser extension for Chrome or Safari. (Firefox support is coming soon.)
  2. Step 2: Click the extension icon at the top of your browser. Under the Receipts tab, upload an image or click Screenshot current tab to automatically attach the receipt to the expense.
Via email forwarding Yes! You can animate the Accordion with CSS or JavaScript.
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add accordion ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/accordion/accordion.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/accordion/accordion.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/accordion/accordion.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/accordion/accordion.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/accordion/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/accordion/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '#/components/accordion' ``` ```tsx import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from 'twistail-react/accordion' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-accordion--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/alert-dialog.mdx meta: { "title": "Alert Dialog", "full": false } A modal dialog that interrupts the user with important content and expects a response. Storybook Radix UI Docs Source *** import Demo from '#/demo/alert-dialog/preview' ```tsx 'use client' import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from 'twistail-react/alert-dialog' export default function AlertDialogDemo() { return ( Show Dialog Are you absolutely sure? This action cannot be undone. This will permanently delete your account and remove your data from our servers. Cancel Continue ) } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add alert-dialog ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/alert-dialog/alert-dialog.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/alert-dialog/alert-dialog.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/alert-dialog/alert-dialog.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/alert-dialog/alert-dialog.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/alert-dialog/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/alert-dialog/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { AlertDialog, AlertDialogPortal, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, AlertDialogDivider, } from '#/components/alert-dialog' ``` ```tsx import { AlertDialog, AlertDialogPortal, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, AlertDialogDivider, } from 'twistail-react/alert-dialog' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-alert-dialog--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/area-chart.mdx meta: { "title": "Area Chart", "full": false } A chart that displays quantitative data using a filled area below a line, useful for showing volume or cumulative values over time. Storybook Recharts Docs Source *** import Demo from '#/demo/area-chart/preview' ```tsx 'use client' // import { AreaChart } from 'twistail-react/area-chart' export default function Demo() { return null } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add area-chart ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/area-chart/area-chart.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/area-chart/area-chart.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/area-chart/area-chart.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/area-chart/area-chart.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/area-chart/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/area-chart/index.ts\"" } } ``` ## Usage ### Imports ```tsx import {} from '#/components/area-chart' ``` ```tsx import {} from 'twistail-react/area-chart' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/visualizations-area-chart--default) for more examples. ## Anatomy ```tsx // WIP ``` file: docs/components/aspect-ratio.mdx meta: { "title": "Aspect Ratio", "full": false } Maintains a consistent width-to-height ratio for content as it resizes. Storybook Radix UI Docs Source *** import Demo from '#/demo/aspect-ratio/preview' ```tsx 'use client' import Image from 'next/image' import { AspectRatio } from 'twistail-react/aspect-ratio' export default function AspectRatioDemo() { return (
Pict by Alvaro Pinot
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add aspect-ratio ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/aspect-ratio/aspect-ratio.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/aspect-ratio/aspect-ratio.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/aspect-ratio/aspect-ratio.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/aspect-ratio/aspect-ratio.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/aspect-ratio/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/aspect-ratio/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { AspectRatio } from '#/components/aspect-ratio' ``` ```tsx import { AspectRatio } from 'twistail-react/aspect-ratio' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-aspect-ratio--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/avatar.mdx meta: { "title": "Avatar", "full": false } An image element with a fallback for representing the user. Storybook Radix UI Docs Source *** import Demo from '#/demo/avatar/preview' ```tsx 'use client' import { Avatar, AvatarFallback, AvatarGroup, AvatarImage } from 'twistail-react/avatar' import { getInitials } from 'twistail-utils' const users = [ { name: 'Robert Wilson', role: 'Designer', image: 'https://api.dicebear.com/9.x/adventurer/svg?seed=Robert&backgroundColor=ffdfbf', }, { name: 'Jocelyn Davis', role: 'Developer', image: 'https://api.dicebear.com/9.x/adventurer/svg?seed=Jocelyn&backgroundColor=ffdfbf', }, { name: 'Jack Brown', role: 'Manager', image: 'https://api.dicebear.com/9.x/adventurer/svg?seed=Jack&backgroundColor=ffdfbf', }, { name: 'Liliana Johnson', role: 'Marketing', }, ] export default function AvatarDemo() { return ( {users.map((user) => ( {getInitials(user.name)} ))} ) } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add avatar ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/avatar/avatar.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/avatar/avatar.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/avatar/avatar.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/avatar/avatar.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/avatar/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/avatar/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Avatar, AvatarImage, AvatarFallback, AvatarGroup } from '#/components/avatar' ``` ```tsx import { Avatar, AvatarImage, AvatarFallback, AvatarGroup } from 'twistail-react/avatar' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-avatar--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/badge.mdx meta: { "title": "Badge", "full": false } A small visual indicator for highlighting status, categories, or labels. Storybook Radix UI Docs Source *** import Demo from '#/demo/badge/preview' ```tsx 'use client' import { Badge } from 'twistail-react/badge' export default function BadgeDemo() { return (
Default Primary Success Error Warning Info
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add badge ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/badge/badge.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/badge/badge.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/badge/badge.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/badge/badge.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/badge/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/badge/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Badge } from '#/components/badge' ``` ```tsx import { Badge } from 'twistail-react/badge' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-badge--docs) for more examples. file: docs/components/bar-chart.mdx meta: { "title": "Bar Chart", "full": false } A chart that presents categorical data with rectangular bars proportional to the values they represent. Storybook Recharts Docs Source *** import Demo from '#/demo/bar-chart/preview' ```tsx 'use client' // import { BarChart } from 'twistail-react/bar-chart' export default function Demo() { return null } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add bar-chart ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/bar-chart/bar-chart.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/bar-chart/bar-chart.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/bar-chart/bar-chart.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/bar-chart/bar-chart.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/bar-chart/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/bar-chart/index.ts\"" } } ``` ## Usage ### Imports ```tsx import {} from '#/components/bar-chart' ``` ```tsx import {} from 'twistail-react/bar-chart' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/visualizations-bar-chart--default) for more examples. ## Anatomy ```tsx // WIP ``` file: docs/components/bar-list.mdx meta: { "title": "Bar List (preview)", "full": false } A component that combines a list with horizontal bars to visualize comparative values across categories. Storybook Recharts Docs Source *** import Demo from '#/demo/bar-list/preview' ```tsx 'use client' import { BarList } from 'twistail-react/bar-list' export default function BarListDemo() { const basicData = [ { title: '/home', value: 843, maxValue: 1000 }, { title: '/imprint', value: 46, maxValue: 1000 }, { title: '/cancellation', value: 3, maxValue: 1000 }, { title: '/blocks', value: 108, maxValue: 1000 }, { title: '/documentation', value: 384, maxValue: 1000 }, ] const dataWithSubtitles = basicData.map((item) => ({ ...item, subtitle: `${Math.round((item.value / item.maxValue) * 100)}% of total traffic`, })) return (
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add bar-list ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/bar-list/bar-list.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/bar-list/bar-list.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/bar-list/bar-list.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/bar-list/bar-list.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/bar-list/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/bar-list/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { BarList } from '#/components/bar-list' ``` ```tsx import { BarList } from 'twistail-react/bar-list' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/visualizations-bar-list--docs) for more examples. ## Props ### BarListProps string', default: undefined, }, onValueChange: { description: 'Callback function when an item is clicked', type: '(item: BarItemProps) => void', default: undefined, }, sortOrder: { description: 'Sort order for the data', type: 'ascending | descending | none', default: 'none', }, showAnimation: { description: 'Whether to show animation when the component mounts', type: 'boolean', default: 'false', }, className: { description: 'Additional CSS class for the bar list container', type: 'string', default: undefined, }, }} /> ### BarItemProps string', default: undefined, }, onClick: { description: 'Callback function when the item is clicked', type: '() => void', default: undefined, }, href: { description: 'URL to navigate to when the item title is clicked', type: 'string', default: undefined, }, }} /> file: docs/components/blockquote.mdx meta: { "title": "Blockquote", "full": false } A styled container for quoting content from another source, typically used for testimonials or citations. Storybook Radix UI Docs Source *** import Demo from '#/demo/blockquote/preview' ```tsx 'use client' import { Blockquote, BlockquoteAuthor } from 'twistail-react/blockquote' export default function BlockquoteDemo() { return (
The science of operations, as derived from mathematics more especially, is a science of itself, and has its own abstract truth and value. Ada Lovelace
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add blockquote ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/blockquote/blockquote.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/blockquote/blockquote.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/blockquote/blockquote.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/blockquote/blockquote.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/blockquote/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/blockquote/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Blockquote, BlockquoteAuthor } from '#/components/blockquote' ``` ```tsx import { Blockquote, BlockquoteAuthor } from 'twistail-react/blockquote' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-blockquote--docs) for more examples. file: docs/components/breadcrumb.mdx meta: { "title": "Breadcrumb", "full": false } A navigation aid that helps users understand their location within a website hierarchy. Storybook Radix UI Docs Source *** import Demo from '#/demo/breadcrumb/preview' ```tsx 'use client' import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from 'twistail-react/breadcrumb' export default function BreadcrumbDemo() { return ( Dashboard Settings Account Security ) } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add breadcrumb ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/breadcrumb/breadcrumb.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/breadcrumb/breadcrumb.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/breadcrumb/breadcrumb.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/breadcrumb/breadcrumb.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/breadcrumb/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/breadcrumb/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, } from '#/components/breadcrumb' ``` ```tsx import { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, } from 'twistail-react/breadcrumb' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-breadcrumb--docs) for more examples. file: docs/components/button.mdx meta: { "title": "Button", "full": false } An interactive element that triggers an action when clicked or pressed. Storybook Radix UI Docs Source *** import Demo from '#/demo/button/preview' ```tsx 'use client' import { Button } from 'twistail-react/button' export default function ButtonDemo() { return (
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add button ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/button/button.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/button/button.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/button/button.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/button/button.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/button/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/button/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Button } from '#/components/button' ``` ```tsx import { Button } from 'twistail-react/button' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-button--docs) for more examples. ## Props file: docs/components/calendar.mdx meta: { "title": "Calendar", "full": false } A foundational date display component that serves as the basis for building date pickers, allowing users to navigate and select dates or date ranges. Storybook React Daypicker Source *** import Demo from '#/demo/calendar/preview' ```tsx 'use client' import * as React from 'react' import { Calendar } from 'twistail-react/calendar' export default function CalendarDemo() { const [date, setDate] = React.useState(undefined) return (
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add calendar ``` */} ## Manual Installation Twistail Calendar component is built on [React DayPicker v9](https://daypicker.dev/upgrading), offering enhanced functionality and improved performance compared to the [shadcn/ui Calendar](https://ui.shadcn.com/docs/components/calendar) and [Tremor Calendar](https://tremor.so/docs/inputs/calendar) component which uses the older React DayPicker v8. This newer implementation maintains full compatibility with our design system while leveraging the latest features from the DayPicker library. ### Install dependencies ```package-install npm install radix-ui tailwind-variants lucide-react date-fns react-day-picker ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/calendar/calendar.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/calendar/calendar.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/calendar/calendar.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/calendar/calendar.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/calendar/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/calendar/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Calendar } from '#/components/calendar' ``` ```tsx import { Calendar } from 'twistail-react/calendar' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-calendar--docs) for more examples. file: docs/components/callout.mdx meta: { "title": "Calllout", "full": false } A highlighted message that attracts attention to important information. Storybook Radix UI Docs Source *** import Demo from '#/demo/callout/preview' ```tsx 'use client' import * as Lucide from 'lucide-react' import { Callout } from 'twistail-react/callout' export default function CalloutDemo() { return ( } > System Update: Enhanced Salesforce and Dynamics 365 integration now delivers key sales performance metrics directly to your dashboard for improved target achievement. ) } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add callout ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/callout/callout.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/callout/callout.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/callout/callout.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/callout/callout.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/callout/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/callout/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Callout } from '#/components/callout' ``` ```tsx import { Callout } from 'twistail-react/callout' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-callout--docs) for more examples. file: docs/components/card.mdx meta: { "title": "Card", "full": false } A flexible container for grouping related content and actions. Storybook Radix UI Docs Source *** import Demo from '#/demo/card/preview' ```tsx 'use client' import { Button } from 'twistail-react/button' import { Card, CardContent, CardDescription, CardDivider, CardFooter, CardHeader, CardTitle, } from 'twistail-react/card' import { Text } from 'twistail-react/text' export default function CardDemo() { return ( Compact Card This card uses compact spacing for all sections The compact spacing variant reduces padding in all card sections, making it more suitable for dense UIs or when space is limited. ) } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add card ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/card/card.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/card/card.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/card/card.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/card/card.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/card/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/card/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, CardDivider } from '#/components/card' ``` ```tsx import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, CardDivider } from 'twistail-react/card' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-card--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/category-bar.mdx meta: { "title": "Category Bar", "full": false } A component for displaying categorized data with visual indicators of distribution or proportion. Storybook Recharts Docs Source *** import Demo from '#/demo/category-bar/preview' ```tsx 'use client' // import { CategoryBar } from 'twistail-react/category-bar' export default function Demo() { return null } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add category-bar ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/category-bar/category-bar.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/category-bar/category-bar.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/category-bar/category-bar.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/category-bar/category-bar.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/category-bar/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/category-bar/index.ts\"" } } ``` ## Usage ### Imports ```tsx import {} from '#/components/category-bar' ``` ```tsx import {} from 'twistail-react/category-bar' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/visualizations-category-bar--default) for more examples. ## Anatomy ```tsx // WIP ``` file: docs/components/checkbox.mdx meta: { "title": "Checkbox", "full": false } A control that allows users to select multiple options from a set. Storybook Radix UI Docs Source *** import Demo from '#/demo/checkbox/preview' ```tsx 'use client' import { Checkbox } from 'twistail-react/checkbox' import { Label } from 'twistail-react/label' export default function CheckboxDemo() { return (
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add checkbox ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/checkbox/checkbox.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/checkbox/checkbox.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/checkbox/checkbox.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/checkbox/checkbox.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/checkbox/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/checkbox/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Checkbox } from '#/components/checkbox' ``` ```tsx import { Checkbox } from 'twistail-react/checkbox' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-checkbox--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/collapsible.mdx meta: { "title": "Collapsible", "full": false } A component that can be expanded or collapsed to show or hide content. Storybook Radix UI Docs Source *** import Demo from '#/demo/collapsible/preview' ```tsx 'use client' import * as Lucide from 'lucide-react' import { Button } from 'twistail-react/button' import { Collapsible, CollapsibleContent, CollapsibleTrigger } from 'twistail-react/collapsible' export default function CollapsibleDemo() { return (

@riipandi starred 3 repositories

@radix-ui/primitives
@radix-ui/colors
@stitches/react
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add collapsible ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/collapsible/collapsible.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/collapsible/collapsible.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/collapsible/collapsible.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/collapsible/collapsible.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/collapsible/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/collapsible/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '#/components/collapsible' ``` ```tsx import { Collapsible, CollapsibleTrigger, CollapsibleContent } from 'twistail-react/collapsible' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-collapsible--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/combo-chart.mdx meta: { "title": "Combo Chart", "full": false } A hybrid chart that combines multiple chart types (like bar and line) to compare different data series with different scales. Storybook Recharts Docs Source *** import Demo from '#/demo/combo-chart/preview' ```tsx 'use client' // import { ComboChart } from 'twistail-react/combo-chart' export default function Demo() { return null } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add combo-chart ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/combo-chart/combo-chart.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/combo-chart/combo-chart.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/combo-chart/combo-chart.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/combo-chart/combo-chart.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/combo-chart/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/combo-chart/index.ts\"" } } ``` ## Usage ### Imports ```tsx import {} from '#/components/combo-chart' ``` ```tsx import {} from 'twistail-react/combo-chart' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/visualizations-combo-chart--default) for more examples. ## Anatomy ```tsx // WIP ``` file: docs/components/combobox.mdx meta: { "title": "Combobox", "full": false } A combination of a text input and a dropdown list for selecting from predefined options. Storybook Radix UI Docs Source *** import Demo from '#/demo/combobox/preview' ```tsx 'use client' import { useState } from 'react' import { Combobox } from 'twistail-react/combobox' const frameworks = [ { value: 'next.js', label: 'Next.js' }, { value: 'remix', label: 'Remix' }, { value: 'astro', label: 'Astro', disabled: true }, { value: 'react', label: 'React' }, { value: 'vue', label: 'Vue' }, { value: 'solid', label: 'Solid' }, ] export default function ComboboxDemo() { const [value, setValue] = useState('') return (
Selected value: {value || 'none'}
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add combobox ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/combobox/combobox.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/combobox/combobox.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/combobox/combobox.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/combobox/combobox.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/combobox/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/combobox/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Combobox } from '#/components/combobox' ``` ```tsx import { Combobox } from 'twistail-react/combobox' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-combobox--docs) for more examples. file: docs/components/command.mdx meta: { "title": "Command", "full": false } A keyboard-centric interface for navigating and taking actions quickly. Storybook Radix UI Docs Source *** import Demo from '#/demo/command/preview' ```tsx 'use client' import * as Lucide from 'lucide-react' import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from 'twistail-react/command' export default function CommandDemo() { return ( No results found. Calendar Search Emoji Calculator Profile ⌘P Billing ⌘B Settings ⌘S ) } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add command ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui cmdk ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/command/command.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/command/command.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/command/command.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/command/command.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/command/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/command/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, } from '#/components/command' ``` ```tsx import { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, } from 'twistail-react/command' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-command--docs) for more examples. file: docs/components/context-menu.mdx meta: { "title": "Context Menu", "full": false } A menu that appears upon user interaction, typically right-clicking, providing contextual actions. Storybook Radix UI Docs Source *** import Demo from '#/demo/context-menu/preview' ```tsx 'use client' import * as Lucide from 'lucide-react' import { useState } from 'react' import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSubMenu, ContextMenuSubMenuContent, ContextMenuSubMenuTrigger, ContextMenuTrigger, } from 'twistail-react/context-menu' export default function ContextMenuDemo() { const [position, setPosition] = useState('bottom') const [showStatusBar, setShowStatusBar] = useState(true) const [showActivityBar, setShowActivityBar] = useState(false) const [showPanel, setShowPanel] = useState(false) return ( Right click here Account Settings Manage workspace Invite users Email Message Whatsapp Telegram Discord Slack More... Alphabetical Reverse Alphabetical Created at Public Private Restricted Support Sign out ) } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add context-menu ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/context-menu/context-menu.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/context-menu/context-menu.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/context-menu/context-menu.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/context-menu/context-menu.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/context-menu/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/context-menu/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuIconWrapper, ContextMenuGroup, ContextMenuPortal, ContextMenuSubMenu, ContextMenuSubMenuContent, ContextMenuSubMenuTrigger, ContextMenuRadioGroup, } from '#/components/context-menu' ``` ```tsx import { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuIconWrapper, ContextMenuGroup, ContextMenuPortal, ContextMenuSubMenu, ContextMenuSubMenuContent, ContextMenuSubMenuTrigger, ContextMenuRadioGroup, } from 'twistail-react/context-menu' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/layout-components-context-menu--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/datetime-picker.mdx meta: { "title": "Datetime Picker", "full": false } A component that allows users to select both date and time values through an intuitive interface, supporting various formats and time zones. Storybook React Daypicker Source *** ## Single Datetime Picker import DemoSingle from '#/demo/datetime-picker/preview-single' ```tsx 'use client' import { SingleDatePicker } from 'twistail-react/datetime-picker' export default function SingleDatePickerDemo() { return } ``` ## Range Datetime Picker import DemoRange from '#/demo/datetime-picker/preview-range' ```tsx 'use client' import { RangeDatePicker } from 'twistail-react/datetime-picker' export default function RangeDatePickerDemo() { return } ``` ## Time Picker import DemoTimePicker from '#/demo/datetime-picker/preview-time' ```tsx 'use client' import * as React from 'react' import { TimePicker } from 'twistail-react/datetime-picker' export default function TimePickerDemo() { const [date, setDate] = React.useState(new Date()) const handleDateChange = (newDate: Date | undefined) => { if (newDate) { setDate(newDate) } } return (
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add datetime-picker ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui lucide-react date-fns react-day-picker ``` ### Date Picker Component ```json doc-gen:file { "file": "../packages/ui-react/src/components/datetime-picker/single-datepicker.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/datetime-picker/single-datepicker.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/datetime-picker/range-datepicker.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/datetime-picker/range-datepicker.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/datetime-picker/datetime-picker.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/datetime-picker/datetime-picker.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/datetime-picker/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/datetime-picker/index.ts\"" } } ``` ### Time Picker Component ```json doc-gen:file { "file": "../packages/ui-react/src/components/datetime-picker/time-picker.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/datetime-picker/time-picker.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/datetime-picker/time-utils.ts", "codeblock": { "lang": "tsx", "meta": "title=\"components/datetime-picker/time-utils.ts\"" } } ``` ## Usage ### Imports ```tsx import { RangeDatePicker, SingleDatePicker, TimePicker } from '#/components/datetime-picker' ``` ```tsx import { RangeDatePicker, SingleDatePicker, TimePicker } from 'twistail-react/datetime-picker' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-datetime-picker) for more examples. ## Credits * [datetime-picker](https://shadcnui-expansions.typeart.cc/docs/datetime-picker) by [shadcn-ui expansions](https://shadcnui-expansions.typeart.cc), licensed under [MIT License](https://github.com/hsuanyi-chou/shadcn-ui-expansions/blob/main/LICENSE.md). * [shadcn-datetime-picker](https://github.com/huybuidac/shadcn-datetime-picker) by [Bui Dac Huy](https://github.com/huybuidac). file: docs/components/description-list.mdx meta: { "title": "Description List", "full": false } A component for displaying name-value pairs in a structured format. Storybook Radix UI Docs Source *** import Demo from '#/demo/description-list/preview' ```tsx 'use client' import { DescriptionDetails, DescriptionList, DescriptionTerm, } from 'twistail-react/description-list' export default function DescriptionListDemo() { return ( Name John Doe Email john.doe@example.com Position Software Engineer Department Engineering Location San Francisco, CA ) } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add description-list ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/description-list/description-list.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/description-list/description-list.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/description-list/description-list.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/description-list/description-list.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/description-list/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/description-list/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { DescriptionList, DescriptionTerm, DescriptionDetails, } from '#/components/description-list' ``` ```tsx import { DescriptionList, DescriptionTerm, DescriptionDetails, } from 'twistail-react/description-list' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-description-list--docs) for more examples. ## Props file: docs/components/dialog.mdx meta: { "title": "Dialog", "full": false } A modal window that appears in front of app content to provide critical information or request user input. Storybook Radix UI Docs Source *** import Demo from '#/demo/dialog/preview' ```tsx 'use client' import { Button } from 'twistail-react/button' import { Dialog, DialogClose, DialogContent, DialogDescription, DialogDivider, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } from 'twistail-react/dialog' export default function DialogDemo() { return ( Terms of Service Please read our terms and conditions carefully before proceeding.

By accessing or using our services, you agree to be bound by these Terms of Service. If you do not agree to these terms, please do not use our services.

We reserve the right to modify these terms at any time. Your continued use of our services following any changes constitutes your acceptance of the new Terms of Service.

) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add dialog ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/dialog/dialog.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/dialog/dialog.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/dialog/dialog.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/dialog/dialog.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/dialog/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/dialog/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, DialogDivider, } from '#/components/dialog' ``` ```tsx import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, DialogDivider, } from 'twistail-react/dialog' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-dialog--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/divider.mdx meta: { "title": "Divider", "full": false } A visual separator used to create a division between content sections. Storybook Radix UI Docs Source *** import Demo from '#/demo/divider/preview' ```tsx 'use client' import { Divider } from 'twistail-react/divider' export default function DividerDemo() { return (

Radix Primitives

An open-source UI component library.

Blog
Docs
Source
) } ```
## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add divider ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/divider/divider.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/divider/divider.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/divider/divider.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/divider/divider.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/divider/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/divider/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Divider } from '#/components/divider' ``` ```tsx import { Divider } from 'twistail-react/divider' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-divider--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/donut-chart.mdx meta: { "title": "Donut Chart", "full": false } A circular chart with a hole in the center that shows the proportional composition of a dataset. Storybook Recharts Docs Source *** import Demo from '#/demo/donut-chart/preview' ```tsx 'use client' // import { DonutChart } from 'twistail-react/donut-chart' export default function Demo() { return null } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add donut-chart ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/donut-chart/donut-chart.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/donut-chart/donut-chart.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/donut-chart/donut-chart.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/donut-chart/donut-chart.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/donut-chart/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/donut-chart/index.ts\"" } } ``` ## Usage ### Imports ```tsx import {} from '#/components/donut-chart' ``` ```tsx import {} from 'twistail-react/donut-chart' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/visualizations-donut-chart--default) for more examples. ## Anatomy ```tsx // WIP ``` file: docs/components/drawer.mdx meta: { "title": "Drawer", "full": false } A panel that slides in from the edge of the screen, typically containing navigation or supplementary content. Storybook Radix UI Docs Source *** import Demo from '#/demo/drawer/preview' ```tsx 'use client' import { Button } from 'twistail-react/button' import { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, } from 'twistail-react/drawer' export default function DrawerDemo() { return ( Account Created Successfully Your account has been created successfully. You can now login to your account. For more information, please contact us. This is they body of the drawer, content goes here. ) } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add drawer ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/drawer/drawer.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/drawer/drawer.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/drawer/drawer.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/drawer/drawer.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/drawer/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/drawer/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPortal, DrawerTitle, DrawerTrigger, } from '#/components/drawer' ``` ```tsx import { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPortal, DrawerTitle, DrawerTrigger, } from 'twistail-react/drawer' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-drawer--docs) for more examples. file: docs/components/dropdown-menu.mdx meta: { "title": "Dropdown Menu", "full": false } A toggleable menu that displays a list of actions or options. Storybook Radix UI Docs Source *** import Demo from '#/demo/dropdown-menu/preview' ```tsx 'use client' import { Button } from 'twistail-react/button' import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuSubMenu, DropdownMenuSubMenuContent, DropdownMenuSubMenuTrigger, DropdownMenuTrigger, } from 'twistail-react/dropdown-menu' export default function DropdownMenuDemo() { return ( My Account Profile Billing Settings Shortcuts Team Invite users Email Message More... New Team ) } ``` ## Automatic Installation This method is still working on progress, please use manual installation for now. {/* ```package-install npx twistail add dropdown-menu ``` */} ## Manual Installation ### Install dependencies ```package-install npm install radix-ui ``` ### Copy the code ```json doc-gen:file { "file": "../packages/ui-react/src/components/dropdown-menu/dropdown-menu.tsx", "codeblock": { "lang": "tsx", "meta": "title=\"components/dropdown-menu/dropdown-menu.tsx\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/dropdown-menu/dropdown-menu.css.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/dropdown-menu/dropdown-menu.css.ts\"" } } ``` ```json doc-gen:file { "file": "../packages/ui-react/src/components/dropdown-menu/index.ts", "codeblock": { "lang": "ts", "meta": "title=\"components/dropdown-menu/index.ts\"" } } ``` ## Usage ### Imports ```tsx import { DropdownMenu, DropdownMenuTrigger, DropdownMenuSubMenuTrigger, DropdownMenuSubMenu, DropdownMenuSubMenuContent, DropdownMenuGroup, DropdownMenuContent, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuCheckboxItem, DropdownMenuIconWrapper, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuPortal, } from '#/components/dropdown-menu' ``` ```tsx import { DropdownMenu, DropdownMenuTrigger, DropdownMenuSubMenuTrigger, DropdownMenuSubMenu, DropdownMenuSubMenuContent, DropdownMenuGroup, DropdownMenuContent, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuCheckboxItem, DropdownMenuIconWrapper, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuPortal, } from 'twistail-react/dropdown-menu' ``` ### Example Browse the [Storybook](https://storybook.twistail.com/?path=/docs/base-components-dropdown-menu--docs) for more examples. ## Anatomy ```tsx ``` file: docs/components/form.mdx meta: { "title": "Form (preview)", "full": false } Build forms with the Radix UI Form component, supports built-in validation and custom validation. Storybook Radix UI Docs Source *** import Demo from '#/demo/form/preview' ```tsx 'use client' import { Form, FormControl, FormField, FormLabel, FormMessage, FormSubmit, } from 'twistail-react/form' export default function FormDemo() { return (

Contact Us

Full Name Please enter your name Email Address Please enter your email Please provide a valid email Subject Please select a subject Message