namespace shadcn
Namespaces
Records
- Accordion
- AccordionItem
- Alert
- AlertDialog
- AspectRatio
- Attachment
- AttachmentAction
- AttachmentGroup
- Avatar
- AvatarGroup
- Badge
- Breadcrumb
- Bubble
- BubbleGroup
- BubbleReactions
- Button
- ButtonGroup
- ButtonMetrics
- Calendar
- Card
- Carousel
- Chart
- ChartSeries
- Checkbox
- Collapsible
- Combobox
- Command
- ContextMenu
- CubicBezier
- DataTable
- DatePicker
- Dialog
- DirectionProvider
- Drawer
- DropdownMenu
- Empty
- Field
- Form
- Heatmap
- HeatmapDay
- HoverCard
- Input
- InputGroup
- InputOTP
- Item
- ItemGroup
- Kbd
- KbdGroup
- Label
- ListView
- Marker
- Menubar
- Message
- MessageAvatar
- MessageFooter
- MessageGroup
- MessageHeader
- MessageScroller
- MessageScrollerButton
- MessageScrollerItem
- NativeSelect
- NavigationMenu
- Oklch
- Pagination
- Popover
- Progress
- Prose
- Questionnaire
- RadioGroup
- RadioGroupItem
- ResizableHandle
- ResizablePanel
- ResizablePanelGroup
- Rgba
- RowDelegate
- RowDensity
- ScrollArea
- Select
- Separator
- Sheet
- Sidebar
- SidebarInset
- SidebarProvider
- SidebarTrigger
- Skeleton
- Slider
- Sonner
- Spinner
- Style
- Switch
- Table
- Tabs
- Textarea
- Theme
- Toast
- Toggle
- ToggleGroup
- Tooltip
- TreeView
- VideoPlayer
Functions
button_metrics
ButtonMetrics button_metrics(ButtonSize size)
install
void install(QApplication & app, Theme theme, MotionPolicy motion, int fontPixels)
Install the theme and bundled Geist font on the application's GUI thread. Passing zero or a negative fontPixels preserves the application's current font size.
make_child
T & make_child(QWidget & parent, Args &&... args)
rowData
QVariant rowData(const QModelIndex & index, RowRole role)
to_srgb
std::expected<Rgba, ValueError> to_srgb(Oklch color)
Convert OKLCH to sRGB and clip channels outside the gamut. CSS gamut mapping is not implemented.
progress_fraction
std::expected<double, ValueError> progress_fraction(double value, double minimum, double maximum)
Reject NaN, infinity, reversed ranges and values outside the range.
transition_easing
double transition_easing(double progress)
Tailwind's default transition curve, cubic-bezier(0.4, 0, 0.2, 1).
pulse_opacity
double pulse_opacity(double seconds)
Tailwind pulse opacity. One cycle is 2 seconds, with opacity 0.5 halfway.
Enums
Side
Values:
TopRightBottomLeft
Variant
Values:
DefaultDestructiveOutlineSecondaryGhostLink
Button appearances.
ButtonSize
Values:
DefaultXsSmLgIconIconXsIconSmIconLg
Button sizes, including all four sizes for icons.
ColorMode
Values:
LightDark
MotionPolicy
Values:
FullReduced
RowRole
Values:
DescriptionLeadingTrailingTrailingTextProgressHeading
The data a themed view reads for one row.
A caller supplies data, not widgets, so a large set costs only the rows on screen. The title comes from Qt::DisplayRole, so a model that fills nothing else still produces a readable row.
ToggleVariant
Values:
DefaultOutline
ToggleSize
Values:
DefaultSmLg
ToggleGroupMode
Values:
SingleMultiple
ToastType
Values:
DefaultSuccessInfoWarningErrorLoading
AlertVariant
Values:
DefaultDestructive
ToastPosition
Values:
TopTopRightTopLeftBottomBottomRightBottomLeft
AvatarSize
Values:
DefaultSmLg
InputGroupAlign
Values:
InlineStartInlineEndBlockStartBlockEnd
InputGroupButtonSize
Values:
XsSmIconXsIconSm
Direction
Values:
LeftToRightRightToLeft
Direction context translated to Qt's layout direction.
ItemVariant
Values:
DefaultOutlineMuted
ItemSize
Values:
DefaultSmXs
ItemMediaVariant
Values:
DefaultIconImage
ValueError
Values:
NonFiniteOutOfRangeEmptyRange
Role
Values:
BackgroundForegroundCardCardForegroundPopoverPopoverForegroundPrimaryPrimaryForegroundSecondarySecondaryForegroundMutedMutedForegroundAccentAccentForegroundDestructiveBorderInputRingChart1Chart2Chart3Chart4Chart5SidebarSidebarForegroundSidebarPrimarySidebarPrimaryForegroundSidebarAccentSidebarAccentForegroundSidebarBorderSidebarRingCount
Semantic roles from shadcn's neutral theme, including chart and sidebar roles.
AttachmentState
Values:
IdleUploadingProcessingErrorDone
TabsListVariant
Values:
DefaultLine
AttachmentSize
Values:
DefaultSmXs
AttachmentOrientation
Values:
HorizontalVertical
SwitchSize
Values:
DefaultSm
BubbleVariant
Values:
DefaultSecondaryMutedTintedOutlineGhostDestructive
BubbleAlign
Values:
StartEnd
SidebarSide
Values:
LeftRight
SidebarCollapsible
Values:
NoneOffcanvasIcon
SidebarVariant
Values:
SidebarFloatingInset
SidebarMenuSize
Values:
DefaultSmLg
SidebarMenuVariant
Values:
DefaultOutline
MessageAlign
Values:
StartEnd
ChartType
Values:
LineAreaBarPie
QuestionnaireType
Values:
SingleMultiple
MarkerVariant
Values:
DefaultSeparatorBorder