Package information
@hls-downloader/design-systemsrc/design-system/src/components/dist/design-system.jsCore components
Button
A flexible button component with multiple variants and sizes. Location:src/design-system/src/components/ui/button.tsx:43
Button style variant
default- Primary button with solid backgrounddestructive- Red destructive action buttonoutline- Button with border, transparent backgroundsecondary- Secondary button with muted colorsghost- Transparent button that shows on hoverlink- Text button styled as a link
Button size preset
default- Standard height (h-9, px-4, py-2)sm- Small button (h-8, px-3)lg- Large button (h-10, px-8)icon- Square icon button (h-9, w-9)
Render as child element using Radix Slot
Badge
Display small status indicators or labels. Location:src/design-system/src/components/ui/badge.tsx:30
Badge color scheme
default- Primary colored badgesecondary- Muted secondary badgedestructive- Red warning/error badgeoutline- Transparent with border
Input
Standard text input field with consistent styling. Location:src/design-system/src/components/ui/input.tsx:8
HTML input type attribute
Additional CSS classes to merge with defaults
Progress
Displays progress indicator for async operations. Location:src/design-system/src/components/ui/progress.tsx:6
Progress value between 0 and 100
Additional CSS classes
Card
Container component for grouping related content. Location:src/design-system/src/components/ui/card.tsx:8
Enable hover effects and cursor pointer for clickable cards
Additional CSS classes
Switch
Toggle switch for boolean settings. Location:src/design-system/src/components/ui/switch.tsx:6
Built on @radix-ui/react-switch, accepts all Radix Switch.Root props.
Select
Dropdown select component with rich features. Location:src/design-system/src/components/ui/select.tsx:7
Composed of multiple sub-components:
Select
Root select component (Radix Select.Root)
SelectTrigger
Button that opens the dropdown
SelectContent
Dropdown container with animations
SelectItem
Individual selectable option
SelectValue
Displays the selected value
SelectGroup
Groups related options
SelectLabel
Label for option groups
SelectSeparator
Visual separator between options
Tabs
Tabbed interface for organizing content. Location:src/design-system/src/components/ui/tabs.tsx:6
Built on Radix UI Tabs primitive with custom styling.
ScrollArea
Scrollable container with custom styled scrollbars. Location:src/design-system/src/components/ui/scroll-area.tsx
Slider
Range input slider for numeric values. Location:src/design-system/src/components/ui/slider.tsx:6
Current slider value(s)
Callback when value changes
Minimum value
Maximum value
Step increment
Separator
Visual divider between content sections. Location:src/design-system/src/components/ui/separator.tsx:6
Direction of the separator
horizontal- Horizontal line (1px height, full width)vertical- Vertical line (full height, 1px width)
Whether separator is purely decorative (affects accessibility)
HoverCard
Displays rich content on hover. Location:src/design-system/src/components/ui/hover-card.tsx:6
Composed of sub-components:
HoverCard- Root componentHoverCardTrigger- Element that triggers the hoverHoverCardContent- Content shown on hover
AspectRatio
Maintains aspect ratio for responsive media. Location:src/design-system/src/components/ui/aspect-ratio.tsx:3
Width to height ratio (e.g., 16/9 for widescreen)
Hooks
useLocalStorage
Custom hook for persisting state to localStorage with automatic JSON serialization. Location:src/design-system/src/hooks/use-localstorage.ts:3
localStorage key to store the value under
Default value if no stored value exists
[storedValue, setValue] - Tuple similar to useState
useTheme
Detects and applies browser color scheme preference (light/dark mode). Location:src/design-system/src/hooks/use-theme.ts:9
Returns: { theme: "light" | "dark" }
Automatically applies the dark class to document.documentElement when dark mode is preferred and keeps it synchronized with system preference changes.
Utilities
cn (className merge)
Location:src/design-system/src/lib/utils.ts
Utility function for merging Tailwind CSS classes with conflict resolution.
Dependencies
The design system is built on:- React 18.3.1 - UI library
- Radix UI - Accessible component primitives
- Tailwind CSS 3.4.14 - Utility-first CSS framework
- class-variance-authority - Component variant management
- Lucide React - Icon library
Development
- Build
- Watch mode
- Test
All components use two-space indentation. Add Storybook stories for new components.