Types: ButtonProps to SheetTitleProps
The types of @poltura/theme-sdk/ui, ButtonProps to SheetTitleProps.
On this page
import { … } from '@poltura/theme-sdk/ui';ButtonProps
Props of Button.
type ButtonProps = ComponentPropsWithoutRef<'button'> & {
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
size?: 'default' | 'sm' | 'lg' | 'icon';
asChild?: boolean;
}BadgeProps
Props of Badge.
variant'default' | 'secondary' | 'destructive' | 'outline'The look of the badge; defaults to `default`.
CardProps
Props of Card.
type CardProps = HTMLAttributes<HTMLDivElement>CardHeaderProps
Props of CardHeader.
type CardHeaderProps = HTMLAttributes<HTMLDivElement>CardTitleProps
Props of CardTitle.
type CardTitleProps = HTMLAttributes<HTMLHeadingElement>CardDescriptionProps
Props of CardDescription.
type CardDescriptionProps = HTMLAttributes<HTMLParagraphElement>CardContentProps
Props of CardContent.
type CardContentProps = HTMLAttributes<HTMLDivElement>CardFooterProps
Props of CardFooter.
type CardFooterProps = HTMLAttributes<HTMLDivElement>InputProps
Props of Input.
type InputProps = ComponentPropsWithoutRef<'input'>LabelProps
Props of Label.
type LabelProps = ComponentPropsWithoutRef<'label'>TextareaProps
Props of Textarea.
type TextareaProps = ComponentPropsWithoutRef<'textarea'>CheckboxProps
Props of Checkbox.
type CheckboxProps = Omit<ComponentPropsWithoutRef<'button'>, 'checked' | 'defaultChecked' | 'onChange' | 'value'> & {
checked?: boolean;
defaultChecked?: boolean;
onCheckedChange?: (checked: boolean) => void;
required?: boolean;
}SelectProps
Props of Select.
valuestringThe chosen value, when the parent controls it.
defaultValuestringThe value chosen at first, when the select keeps its own state.
onValueChange(value: string) => voidCalled with the new value when the shopper picks an item.
openbooleanWhether the select is open, when the parent controls it.
defaultOpenbooleanWhether the select starts open.
onOpenChange(open: boolean) => voidCalled when the list opens or closes.
disabledbooleanStops the shopper from changing the value.
namestringThe field name submitted with a form.
requiredbooleanMarks the field as required in a form.
childrenReactNodeThe trigger and the list of items.
SelectTriggerProps
Props of SelectTrigger.
type SelectTriggerProps = ComponentPropsWithoutRef<'button'>SelectValueProps
Props of SelectValue.
placeholderReactNodeThe text shown while nothing is chosen.
classNamestringClasses added to the value.
childrenReactNodeReplaces the chosen item's text.
SelectContentProps
Props of SelectContent.
classNamestringClasses added to the list.
position'item-aligned' | 'popper'Opens the list over the trigger (`item-aligned`) or beside it (`popper`, the default).
side'top' | 'right' | 'bottom' | 'left'The preferred side of the trigger to open on.
align'start' | 'center' | 'end'The alignment against the trigger.
childrenReactNodeThe {@link SelectItem} elements.
SelectItemProps
Props of SelectItem.
valuerequiredstringThe value the select takes when this item is picked; never an empty string.
disabledbooleanStops the shopper from picking the item.
textValuestringThe text used for typeahead and shown in the trigger, when the children are not plain text.
classNamestringClasses added to the item.
childrenReactNodeThe item's label.
DialogProps
Props of Dialog.
openbooleanWhether it is open, when you hold that state.
defaultOpenbooleanWhether it starts open, when it holds that state itself.
onOpenChange(open: boolean) => voidCalled with the new state when the shopper opens or closes it.
childrenReactNodeIts {@link DialogContent}.
DialogContentProps
Props of DialogContent.
showCloseButtonbooleanWhether the close button sits in the corner; true when omitted.
DialogHeaderProps
Props of DialogHeader.
type DialogHeaderProps = HTMLAttributes<HTMLDivElement>DialogFooterProps
Props of DialogFooter.
type DialogFooterProps = HTMLAttributes<HTMLDivElement>DialogTitleProps
Props of DialogTitle.
type DialogTitleProps = HTMLAttributes<HTMLHeadingElement>DialogDescriptionProps
Props of DialogDescription.
type DialogDescriptionProps = HTMLAttributes<HTMLParagraphElement>DropdownMenuProps
Props of DropdownMenu.
openbooleanWhether it is open, when you hold that state.
defaultOpenbooleanWhether it starts open, when it holds that state itself.
onOpenChange(open: boolean) => voidCalled with the new state when the shopper opens or closes it.
childrenReactNodeIts {@link DropdownMenuTrigger} and {@link DropdownMenuContent}.
DropdownMenuTriggerProps
Props of DropdownMenuTrigger.
asChildbooleanMakes its one child, such as your own `<button>`, the trigger instead of a button around it.
DropdownMenuContentProps
Props of DropdownMenuContent.
align'start' | 'center' | 'end'Which edge of the button it lines up with; defaults to `center`.
sideOffsetnumberThe gap from the button in pixels; defaults to 4.
DropdownMenuItemProps
Props of DropdownMenuItem.
type DropdownMenuItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> & {
onSelect?: (event: Event) => void;
disabled?: boolean;
asChild?: boolean;
}SheetProps
Props of Sheet.
openbooleanWhether it is open, when you hold that state.
defaultOpenbooleanWhether it starts open, when it holds that state itself.
onOpenChange(open: boolean) => voidCalled with the new state when the shopper opens or closes it.
modalbooleanKeeps focus inside and dims the page while open; true when omitted.
childrenReactNodeIts {@link SheetContent}.
SheetContentProps
Props of SheetContent.
side'top' | 'right' | 'bottom' | 'left'The edge it slides in from; defaults to `right`.
showCloseButtonbooleanWhether the close button sits in the corner; true when omitted.
SheetHeaderProps
Props of SheetHeader.
type SheetHeaderProps = HTMLAttributes<HTMLDivElement>SheetTitleProps
Props of SheetTitle.
type SheetTitleProps = HTMLAttributes<HTMLHeadingElement>