/// import { NAME, recipe, schema, str, UI } from "commontools"; const model = schema({ type: "object", properties: {}, default: {}, }); export default recipe(model, model, () => { return { [NAME]: str`Common UI v2 Components Showcase`, [UI]: (

Common UI v2 Components Showcase

{/* Button Component */}

1. Button Component

Various button styles and sizes

Default Secondary Destructive Outline Ghost Link
Small Default Size Large 🎯 Disabled
{/* Input Component */}

2. Input Component

Various input types and states

Text Input
Email Input
Password Input
Number Input
{/* Textarea Component */}

3. Textarea Component

Text areas with different configurations

Basic Textarea
Auto-resize Textarea
{/* Card Component */}

4. Card Component

Card layouts and styles

Card Title

Card description goes here

This is the card content. Cards can contain any type of content.

Action

Simple Card

Cards don't require all slots to be filled.

{/* Badge Component */}

5. Badge Component

Badge variations

Default Secondary Destructive Outline
{/* Alert Component */}

6. Alert Component

Alert messages

Default Alert - This is a default alert message.
Destructive Alert - This action cannot be undone.
{/* Checkbox Component */}

7. Checkbox Component

Checkbox states

Unchecked by default
Checked by default
Disabled checkbox
{/* Switch Component */}

8. Switch Component

Toggle switches

Enable notifications
Dark mode (on by default)
Disabled switch
{/* Slider Component */}

9. Slider Component

Range sliders

Volume
Temperature
{/* Progress Component */}

10. Progress Component

Progress indicators

{/* Tabs Component */}

11. Tabs Component

Tabbed interface

Account Password Settings

Account Information

Manage your account details and preferences here.

Password Settings

Update your password and security settings.

General Settings

Configure your application preferences.

{/* Accordion Component */}

12. Accordion Component

Collapsible content panels

What is Common UI?
Common UI is a collection of web components that follow modern design principles.
How do I use these components?
Simply import the components and use them as custom HTML elements in your markup.
Are they framework agnostic?
Yes! These web components work with any framework or vanilla JavaScript.
{/* Separator Component */}

13. Separator Component

Visual separators

Content above separator
Content below separator
Left content
Right content
{/* Toggle Component */}

14. Toggle & Toggle Group Components

Toggle buttons and groups

Bold Italic Underline
Left Center Right
{/* Radio Component */}

15. Radio & Radio Group Components

Radio buttons with grouping

Option 1
Option 2
Option 3
{/* Collapsible Component */}

16. Collapsible Component

Expandable content area

Toggle Content

This content can be toggled open and closed.

It's useful for showing/hiding additional information.

{/* Skeleton Component */}

17. Skeleton Component

Loading placeholders

{/* Form Component */}

18. Form Component

Form wrapper with validation

Name
Email
Message
Submit Form
{/* Input OTP Component */}

19. Input OTP Component

One-time password input

Enter verification code
{/* Aspect Ratio Component */}

20. Aspect Ratio Component

Maintain aspect ratios

16:9 Aspect Ratio
1:1 Square
{/* Scroll Area Component */}

21. Scroll Area Component

Custom scrollable area

Scrollable Content

This is a custom scroll area component.

It provides custom styling for scrollbars.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco.

Laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit.

Esse cillum dolore eu fugiat nulla pariatur.

{/* Resizable Panels Component */}

22. Resizable Panels Component

Resizable panel layout

Left Panel (30%)
Right Panel (70%)
), }; });