Developers
Start building
Themes/Theme SDK/Modules/ui/Types: ButtonProps to SheetTitleProps

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.

valuestring

The chosen value, when the parent controls it.

defaultValuestring

The value chosen at first, when the select keeps its own state.

onValueChange(value: string) => void

Called with the new value when the shopper picks an item.

openboolean

Whether the select is open, when the parent controls it.

defaultOpenboolean

Whether the select starts open.

onOpenChange(open: boolean) => void

Called when the list opens or closes.

disabledboolean

Stops the shopper from changing the value.

namestring

The field name submitted with a form.

requiredboolean

Marks the field as required in a form.

childrenReactNode

The trigger and the list of items.

SelectTriggerProps

Props of SelectTrigger.

type SelectTriggerProps = ComponentPropsWithoutRef<'button'>

SelectValueProps

Props of SelectValue.

placeholderReactNode

The text shown while nothing is chosen.

classNamestring

Classes added to the value.

childrenReactNode

Replaces the chosen item's text.

SelectContentProps

Props of SelectContent.

classNamestring

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

childrenReactNode

The {@link SelectItem} elements.

SelectItemProps

Props of SelectItem.

valuerequiredstring

The value the select takes when this item is picked; never an empty string.

disabledboolean

Stops the shopper from picking the item.

textValuestring

The text used for typeahead and shown in the trigger, when the children are not plain text.

classNamestring

Classes added to the item.

childrenReactNode

The item's label.

DialogProps

Props of Dialog.

openboolean

Whether it is open, when you hold that state.

defaultOpenboolean

Whether it starts open, when it holds that state itself.

onOpenChange(open: boolean) => void

Called with the new state when the shopper opens or closes it.

childrenReactNode

Its {@link DialogContent}.

DialogContentProps

Props of DialogContent.

showCloseButtonboolean

Whether 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>

Props of DropdownMenu.

openboolean

Whether it is open, when you hold that state.

defaultOpenboolean

Whether it starts open, when it holds that state itself.

onOpenChange(open: boolean) => void

Called with the new state when the shopper opens or closes it.

childrenReactNode

Its {@link DropdownMenuTrigger} and {@link DropdownMenuContent}.

Props of DropdownMenuTrigger.

asChildboolean

Makes its one child, such as your own `<button>`, the trigger instead of a button around it.

Props of DropdownMenuContent.

align'start' | 'center' | 'end'

Which edge of the button it lines up with; defaults to `center`.

sideOffsetnumber

The gap from the button in pixels; defaults to 4.

Props of DropdownMenuItem.

type DropdownMenuItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> & {
    onSelect?: (event: Event) => void;
    disabled?: boolean;
    asChild?: boolean;
}

SheetProps

Props of Sheet.

openboolean

Whether it is open, when you hold that state.

defaultOpenboolean

Whether it starts open, when it holds that state itself.

onOpenChange(open: boolean) => void

Called with the new state when the shopper opens or closes it.

modalboolean

Keeps focus inside and dims the page while open; true when omitted.

childrenReactNode

Its {@link SheetContent}.

SheetContentProps

Props of SheetContent.

side'top' | 'right' | 'bottom' | 'left'

The edge it slides in from; defaults to `right`.

showCloseButtonboolean

Whether 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>
Last updated