swiftcnearly preview
Component library

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 SwiftCNComponentGallery

Each 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.py

Open 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.

ComponentNative API
AccordionCNAccordion
AlertCNAlert
Alert DialogCNAlertDialog
Aspect RatioCNAspectRatio
AttachmentCNAttachment
AvatarCNAvatar
BadgeCNBadge
BreadcrumbCNBreadcrumb
BubbleCNBubble
ButtonCNButton
Button GroupCNButtonGroup
CalendarCNCalendar
CardCNCard
CarouselCNCarousel
ChartCNChart
CheckboxCNCheckbox
CollapsibleCNCollapsible
ComboboxCNCombobox
CommandCNCommand
Context MenuCNContextMenu
Data TableCNDataTable
Date PickerCNDatePicker
DialogCNDialog
DirectionCNDirection
DrawerCNDrawer
Dropdown MenuCNDropdownMenu
EmptyCNEmpty
FieldCNField
Hover CardCNHoverCard
InputCNInput
Input GroupCNInputGroup
Input OTPCNInputOTP
ItemCNItem
KbdCNKbd
LabelCNLabel
MarkerCNMarker
MenubarCNMenubar
MessageCNMessage
Message ScrollerCNMessageScroller
Native SelectCNNativeSelect
Navigation MenuCNNavigationMenu
PaginationCNPagination
PopoverCNPopover
ProgressCNProgress
QuestionnaireCNQuestionnaire
Radio GroupCNRadioGroup
ResizableCNResizable
Scroll AreaCNScrollArea
SelectCNSelect
SeparatorCNSeparator
SheetCNSheet
SidebarCNSidebar
SkeletonCNSkeleton
SliderCNSlider
SpinnerCNSpinner
SwitchCNSwitch
TableCNTable
TabsCNTabs
TextareaCNTextarea
ToastCNToastHost
ToggleCNToggle
Toggle GroupCNToggleGroup
TooltipCNTooltip
TypographyCNTypography