Native component library
All 64 catalog entries, with native behavior, runnable examples, and copyable source.
Every component is available from import SwiftCN. Each page has a complete usage example, native behavior notes, and the actual editable source. The native gallery runs those same examples:
swift run SwiftCNComponentGalleryEach gallery screen shows the complete example, including import SwiftCN, with a copy button. Run it on an iPhone simulator:
python3 Scripts/run-ios-component-gallery.pyOpen swiftcn-component-gallery in Xcode Device Hub or Simulator after launch. The script uses a dedicated simulator.
Styling lives in .tw recipes. Custom SwiftUI surfaces compose native layout, buttons, bindings, focus, and accessibility. The dropdown uses a styled popover, and the calendar uses a styled month grid. These components adapt the shadcn catalog to SwiftUI.
| Component | Native API |
|---|---|
| Accordion | CNAccordion |
| Alert | CNAlert |
| Alert Dialog | CNAlertDialog |
| Aspect Ratio | CNAspectRatio |
| Attachment | CNAttachment |
| Avatar | CNAvatar |
| Badge | CNBadge |
| Breadcrumb | CNBreadcrumb |
| Bubble | CNBubble |
| Button | CNButton |
| Button Group | CNButtonGroup |
| Calendar | CNCalendar |
| Card | CNCard |
| Carousel | CNCarousel |
| Chart | CNChart |
| Checkbox | CNCheckbox |
| Collapsible | CNCollapsible |
| Combobox | CNCombobox |
| Command | CNCommand |
| Context Menu | CNContextMenu |
| Data Table | CNDataTable |
| Date Picker | CNDatePicker |
| Dialog | CNDialog |
| Direction | CNDirection |
| Drawer | CNDrawer |
| Dropdown Menu | CNDropdownMenu |
| Empty | CNEmpty |
| Field | CNField |
| Hover Card | CNHoverCard |
| Input | CNInput |
| Input Group | CNInputGroup |
| Input OTP | CNInputOTP |
| Item | CNItem |
| Kbd | CNKbd |
| Label | CNLabel |
| Marker | CNMarker |
| Menubar | CNMenubar |
| Message | CNMessage |
| Message Scroller | CNMessageScroller |
| Native Select | CNNativeSelect |
| Navigation Menu | CNNavigationMenu |
| Pagination | CNPagination |
| Popover | CNPopover |
| Progress | CNProgress |
| Questionnaire | CNQuestionnaire |
| Radio Group | CNRadioGroup |
| Resizable | CNResizable |
| Scroll Area | CNScrollArea |
| Select | CNSelect |
| Separator | CNSeparator |
| Sheet | CNSheet |
| Sidebar | CNSidebar |
| Skeleton | CNSkeleton |
| Slider | CNSlider |
| Spinner | CNSpinner |
| Switch | CNSwitch |
| Table | CNTable |
| Tabs | CNTabs |
| Textarea | CNTextarea |
| Toast | CNToastHost |
| Toggle | CNToggle |
| Toggle Group | CNToggleGroup |
| Tooltip | CNTooltip |
| Typography | CNTypography |