🍜 miso.ui

A miso component library built with Tailwind, ShadCN, Basecoat and TweakCN.




Components

A collection of all the components available in miso.ui


Accordion

A vertically stacked set of interactive headings that each reveal a section of content.

Accordion


Is it accessible?

Yes. It adheres to the WAI-ARIA design pattern.

Is it styled?

Yes. It comes with default styles that match other component aesthetic.

Is it animated?

Yes. It's animated by default, but you can disable it if you prefer.

Props API

-- | Props for 'accordion_'
data AccordionProps model action
  = AccordionProps
  { accordionMultiple :: Bool
    -- ^ Allow several sections open at once (@data-multiple@)
  , accordionClasses :: [MisoString]
    -- ^ Extra classes appended to the root @section.accordion@
  , accordionAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: exclusive expand
defaultAccordionProps :: AccordionProps model action
defaultAccordionProps
  = AccordionProps
  { accordionMultiple = False
  , accordionClasses = []
  , accordionAttrs = []
  }
-----------------------------------------------------------------------------
-- | Props for 'accordionSection_'
data AccordionItemProps model action
  = AccordionItemProps
  { accordionItemOpen :: Bool
    -- ^ Section expanded initially
  , accordionItemDisabled :: Bool
    -- ^ Renders with @aria-disabled@
  , accordionItemClasses :: [MisoString]
  , accordionItemAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: collapsed, enabled
defaultAccordionItemProps :: AccordionItemProps model action
defaultAccordionItemProps
  = AccordionItemProps
  { accordionItemOpen = False
  , accordionItemDisabled = False
  , accordionItemClasses = []
  , accordionItemAttrs = []
  }


Alert

Displays a callout for user attention.

Alert


Success!

Congratulations this is a successful alert !

Warning!

Something bad happened :( you're getting a destructive alert!

Props API

-- | Props for 'alert_'
data AlertProps model action
  = AlertProps
  { alertVariant :: Variant
    -- ^ 'Primary' (default) or 'Destructive'
  , alertClasses :: [MisoString]
    -- ^ Extra classes appended to the alert
  , alertAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: default (success-styled) alert
defaultAlertProps :: AlertProps model action
defaultAlertProps
  = AlertProps
  { alertVariant = Primary
  , alertClasses = []
  , alertAttrs = []
  }


Alert Dialog

A modal dialog that interrupts the user with important content and expects a response.

Alert Dialog


Are you absolutely sure?

This action cannot be undone. This will permanently delete your account and remove your data from our servers.

Props API

-- | Props for 'alertDialogComponent'. These live in the @props@ slot of the
-- miso 'Component' and are supplied at mount time via 'mountWithProps_'.
data AlertDialogProps
  = AlertDialogProps
  { alertDialogId :: MisoString
  , alertDialogTrigger :: MisoString
    -- ^ Label of the trigger button
  , alertDialogTitle :: MisoString
  , alertDialogDescription :: MisoString
  , alertDialogCancelLabel :: MisoString
  , alertDialogActionLabel :: MisoString
  } deriving (Show, Eq)
-----------------------------------------------------------------------------
-- | Smart constructor: destructive-action confirmation
defaultAlertDialogProps :: AlertDialogProps
defaultAlertDialogProps
  = AlertDialogProps
  { alertDialogId = "alert-dialog-demo"
  , alertDialogTrigger = "Open alert dialog"
  , alertDialogTitle = "Are you absolutely sure?"
  , alertDialogDescription =
      "This action cannot be undone. This will permanently delete your \
      \account and remove your data from our servers."
  , alertDialogCancelLabel = "Cancel"
  , alertDialogActionLabel = "Continue"
  }


Avatar

An image element with a fallback for representing the user.

Avatar


@dmjioCN@dmjio@dmjio
@dmjio@shadcn@adamwathan@hunvreus
@dmjio@shadcn@adamwathan@hunvreus
@dmjio@shadcn@adamwathan@hunvreus

Props API

-- | Props for 'avatar_'
data AvatarProps model action
  = AvatarProps
  { avatarSrc :: MisoString
  , avatarAlt :: MisoString
  , avatarSize :: Size
    -- ^ 'DefaultSize' (@size-8@) or 'Large' (@size-12@)
  , avatarSquare :: Bool
    -- ^ @rounded-lg@ instead of @rounded-full@
  , avatarClasses :: [MisoString]
    -- ^ Extra classes appended to the @img@
  , avatarAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: small round avatar
defaultAvatarProps :: AvatarProps model action
defaultAvatarProps
  = AvatarProps
  { avatarSrc = ""
  , avatarAlt = ""
  , avatarSize = DefaultSize
  , avatarSquare = False
  , avatarClasses = []
  , avatarAttrs = []
  }


Badge

Displays a badge or a component that looks like a badge.

Badge


PrimarySecondaryOutlineDestructive89920+

Props API

-- | Props for 'badge_'
data BadgeProps model action
  = BadgeProps
  { badgeVariant :: Variant
    -- ^ 'Primary', 'Secondary', 'Destructive' or 'Outline'
  , badgeRounded :: Bool
    -- ^ Pill badge (@rounded-full@), typically for counters
  , badgeHref :: Maybe MisoString
    -- ^ When set, renders as a link (an anchor element)
  , badgeClasses :: [MisoString]
    -- ^ Extra classes appended to the computed basecoat class
  , badgeAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: primary variant, not rounded
defaultBadgeProps :: BadgeProps model action
defaultBadgeProps
  = BadgeProps
  { badgeVariant = Primary
  , badgeRounded = False
  , badgeHref = Nothing
  , badgeClasses = []
  , badgeAttrs = []
  }


Breadcrumb

Displays the path to the current resource using a hierarchy of links.

Breadcrumb


  1. Home
  2. Components
  3. Breadcrumb

Props API

-- | Props for 'breadcrumb_'
data BreadcrumbProps model action
  = BreadcrumbProps
  { breadcrumbClasses :: [MisoString]
    -- ^ Extra classes appended to the @ol@
  , breadcrumbAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultBreadcrumbProps :: BreadcrumbProps model action
defaultBreadcrumbProps
  = BreadcrumbProps
  { breadcrumbClasses = []
  , breadcrumbAttrs = []
  }


Button

Displays a button or a component that looks like a button.

Button


Props API

-- | Props for 'button'
data ButtonProps model action
  = ButtonProps
  { buttonVariant :: Variant
    -- ^ 'Primary', 'Secondary', 'Destructive', 'Outline', 'Ghost' or 'Link'
  , buttonSize :: Size
    -- ^ 'DefaultSize', 'Small' or 'Large'
  , buttonIcon :: Bool
    -- ^ Square icon-only button (e.g. @btn-icon-outline@)
  , buttonDisabled :: Bool
  , buttonClasses :: [MisoString]
    -- ^ Extra classes appended to the computed basecoat class
  , buttonAttrs :: [Attribute model action]
    -- ^ Extra attributes (e.g. @onClick@)
  }
-----------------------------------------------------------------------------
-- | Smart constructor: primary variant, default size
defaultButtonProps :: ButtonProps model action
defaultButtonProps
  = ButtonProps
  { buttonVariant = Primary
  , buttonSize = DefaultSize
  , buttonIcon = False
  , buttonDisabled = False
  , buttonClasses = []
  , buttonAttrs = []
  }


Button Group

A container that groups related buttons together.

Button Group


Props API

-- | Props for 'buttonGroup_'
data ButtonGroupProps model action
  = ButtonGroupProps
  { buttonGroupClasses :: [MisoString]
    -- ^ Extra classes appended to @div.button-group@
  , buttonGroupAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultButtonGroupProps :: ButtonGroupProps model action
defaultButtonGroupProps
  = ButtonGroupProps
  { buttonGroupClasses = []
  , buttonGroupAttrs = []
  }


Card

Displays a card with header, content, and footer.

Card


Login to your account

Enter your details below to login to your account

Don't have an account? Sign up

Content Only

Header Only

This is a card with a header and a description.

Header and Content

This is a card with a header and a content.

Content only.
Footer Only

Header + Footer

This is a card with a header and a footer.

Footer
Content
Footer

Header + Content + Footer

This is a card with a header, content and footer.

Content
Footer

Props API

-- | Props for 'card_'. Title, description and footer nest other views.
data CardProps context model action
  = CardProps
  { cardTitle :: Maybe (View context model action)
    -- ^ Heading shown in the card header
  , cardDescription :: Maybe (View context model action)
    -- ^ Sub-heading shown under the title
  , cardFooter :: Maybe [View context model action]
    -- ^ Footer content
  , cardFooterClasses :: [MisoString]
  , cardClasses :: [MisoString]
    -- ^ Extra classes appended to @div.card@ (e.g. @w-full max-w-sm@)
  , cardAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: bare card
defaultCardProps :: CardProps context model action
defaultCardProps
  = CardProps
  { cardTitle = Nothing
  , cardDescription = Nothing
  , cardFooter = Nothing
  , cardFooterClasses = []
  , cardClasses = []
  , cardAttrs = []
  }


Checkbox

A control that allows the user to toggle between checked and not checked.

Checkbox


By clicking this checkbox, you agree to the terms and conditions.

Props API

-- | Props for 'checkbox_'
data CheckboxProps model action
  = CheckboxProps
  { checkboxId :: Maybe MisoString
  , checkboxName :: Maybe MisoString
  , checkboxValue :: Maybe MisoString
  , checkboxChecked :: Bool
  , checkboxDisabled :: Bool
  , checkboxClasses :: [MisoString]
    -- ^ Extra classes appended to the @input@
  , checkboxLabelClasses :: [MisoString]
    -- ^ Extra classes appended to the wrapping @label@
  , checkboxAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: unchecked, enabled
defaultCheckboxProps :: CheckboxProps model action
defaultCheckboxProps
  = CheckboxProps
  { checkboxId = Nothing
  , checkboxName = Nothing
  , checkboxValue = Nothing
  , checkboxChecked = False
  , checkboxDisabled = False
  , checkboxClasses = []
  , checkboxLabelClasses = []
  , checkboxAttrs = []
  }


Combobox

Autocomplete input and command palette with a list of suggestions.

Combobox


Props API

-- | Props for 'combobox_'
data ComboboxProps context model action
  = ComboboxProps
  { comboboxId :: MisoString
    -- ^ Base id; trigger\/popover\/listbox ids are derived from it (required)
  , comboboxLabel :: [View context model action]
    -- ^ Content of the trigger button (current selection)
  , comboboxValue :: MisoString
    -- ^ Currently selected value (kept in a hidden input)
  , comboboxSearchPlaceholder :: MisoString
  , comboboxEmptyText :: MisoString
    -- ^ Shown when the search yields nothing (@data-empty@)
  , comboboxPopoverClasses :: [MisoString]
    -- ^ Extra classes for the popover (e.g. @w-48@)
  , comboboxTriggerClasses :: [MisoString]
    -- ^ Extra classes for the trigger button
  , comboboxAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultComboboxProps :: ComboboxProps context model action
defaultComboboxProps
  = ComboboxProps
  { comboboxId = "combobox"
  , comboboxLabel = []
  , comboboxValue = ""
  , comboboxSearchPlaceholder = "Search entries..."
  , comboboxEmptyText = "No results found."
  , comboboxPopoverClasses = [ "w-48" ]
  , comboboxTriggerClasses = []
  , comboboxAttrs = []
  }


Command Menu

Fast, composable command menu, opened with a keyboard shortcut.

Command Menu




Dialog

A window overlaid on either the primary window or another dialog window.

Dialog


Edit profile

Make changes to your profile here. Click save when you're done.

Scrollable Content

This is a dialog with scrollable content.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Props API

-- | Props for 'dialog_' (the native @dialog@ element)
data DialogProps model action
  = DialogProps
  { dialogId :: MisoString
    -- ^ id of the dialog; @-title@ \/ @-description@ ids derive from it
  , dialogClasses :: [MisoString]
    -- ^ Extra classes appended to @dialog.dialog@
  , dialogAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultDialogProps :: DialogProps model action
defaultDialogProps
  = DialogProps
  { dialogId = "dialog"
  , dialogClasses = [ "w-full", "sm:max-w-[425px]", "max-h-[612px]" ]
  , dialogAttrs = []
  }


Dropdown Menu

Displays a menu to the user, triggered by a button.

Dropdown Menu


Props API

-- | Props for 'dropdownMenu_'
data DropdownMenuProps context model action
  = DropdownMenuProps
  { dropdownMenuId :: MisoString
    -- ^ Base id; trigger\/popover\/menu ids are derived from it (required)
  , dropdownMenuTrigger :: [View context model action]
    -- ^ Content of the trigger button (nests other views)
  , dropdownMenuTriggerClasses :: [MisoString]
    -- ^ Classes of the trigger button (defaults to @btn-outline@)
  , dropdownMenuAlign :: Align
    -- ^ Popover alignment (@data-align@)
  , dropdownMenuPopoverClasses :: [MisoString]
    -- ^ Extra classes for the popover (e.g. @min-w-56@)
  , dropdownMenuAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: outline trigger button, no alignment override
defaultDropdownMenuProps :: DropdownMenuProps context model action
defaultDropdownMenuProps
  = DropdownMenuProps
  { dropdownMenuId = "dropdown-menu"
  , dropdownMenuTrigger = []
  , dropdownMenuTriggerClasses = [ "btn-outline" ]
  , dropdownMenuAlign = CenterAlign
  , dropdownMenuPopoverClasses = [ "min-w-56" ]
  , dropdownMenuAttrs = []
  }


Empty

A placeholder shown when there is no content to display.

Empty


No Projects Yet

You haven't created any projects yet. Get started by creating your first project.

Learn More

Props API

-- | Props for 'empty_'. Icon, title and description nest other views.
data EmptyProps context model action
  = EmptyProps
  { emptyIcon :: Maybe (View context model action)
    -- ^ Icon shown in the header medallion
  , emptyTitle :: Maybe (View context model action)
  , emptyDescription :: Maybe (View context model action)
  , emptyFooter :: [View context model action]
    -- ^ Content under the actions (e.g. a \"learn more\" link)
  , emptyClasses :: [MisoString]
  , emptyAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: bare empty state
defaultEmptyProps :: EmptyProps context model action
defaultEmptyProps
  = EmptyProps
  { emptyIcon = Nothing
  , emptyTitle = Nothing
  , emptyDescription = Nothing
  , emptyFooter = []
  , emptyClasses = []
  , emptyAttrs = []
  }


Form

Building forms with labelled, described fields.

Form


This is your public display name.

You can manage email addresses in your email settings.

You can @mention other users and organizations.

You can manage your mobile notifications in the mobile settings page.

Email Notifications

Receive emails about new products, features, and more.

Receive emails about new products, features, and more.

Props API

-- | Props for 'form_'
data FormProps model action
  = FormProps
  { formClasses :: [MisoString]
    -- ^ Extra classes appended to @form.form@ (e.g. @grid gap-6@)
  , formAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: vertical form grid
defaultFormProps :: FormProps model action
defaultFormProps
  = FormProps
  { formClasses = [ "grid", "gap-6" ]
  , formAttrs = []
  }
-----------------------------------------------------------------------------
-- | Props for 'field_': label + control + description stack
data FieldProps context model action
  = FieldProps
  { fieldId :: Maybe MisoString
    -- ^ id of the labelled control (@for@ on the label)
  , fieldLabel :: Maybe (View context model action)
  , fieldDescription :: Maybe (View context model action)
  , fieldClasses :: [MisoString]
  , fieldAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultFieldProps :: FieldProps context model action
defaultFieldProps
  = FieldProps
  { fieldId = Nothing
  , fieldLabel = Nothing
  , fieldDescription = Nothing
  , fieldClasses = []
  , fieldAttrs = []
  }


Input

Displays a form input field or a component that looks like an input field.

Input


Props API

-- | Props for 'input_'
data InputProps model action
  = InputProps
  { inputType :: MisoString
    -- ^ @type@ attribute (@text@, @email@, @password@, @date@, ...)
  , inputId :: Maybe MisoString
  , inputPlaceholder :: Maybe MisoString
  , inputValue :: Maybe MisoString
  , inputDisabled :: Bool
  , inputInvalid :: Bool
    -- ^ Renders with @aria-invalid@ (error styling)
  , inputClasses :: [MisoString]
    -- ^ Extra classes appended to @input@
  , inputAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: text input, enabled, no placeholder
defaultInputProps :: InputProps model action
defaultInputProps
  = InputProps
  { inputType = "text"
  , inputId = Nothing
  , inputPlaceholder = Nothing
  , inputValue = Nothing
  , inputDisabled = False
  , inputInvalid = False
  , inputClasses = []
  , inputAttrs = []
  }


Input Group

A control with pinned header and footer rows.

Input Group


script.js
Line 1, Column 1

Props API

-- | Props for 'inputGroup_'. Header and footer overlay the wrapped control.
data InputGroupProps context model action
  = InputGroupProps
  { inputGroupHeader :: [View context model action]
    -- ^ Content pinned to the top of the group
  , inputGroupFooter :: [View context model action]
    -- ^ Content pinned to the bottom of the group
  , inputGroupClasses :: [MisoString]
  , inputGroupAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultInputGroupProps :: InputGroupProps context model action
defaultInputGroupProps
  = InputGroupProps
  { inputGroupHeader = []
  , inputGroupFooter = []
  , inputGroupClasses = []
  , inputGroupAttrs = []
  }


Kbd

Displays keyboard input or shortcuts.

Kbd


Ctrl+B

Props API

-- | Props for 'kbd_'
data KbdProps model action
  = KbdProps
  { kbdClasses :: [MisoString]
    -- ^ Extra classes appended to @kbd@
  , kbdAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultKbdProps :: KbdProps model action
defaultKbdProps
  = KbdProps
  { kbdClasses = []
  , kbdAttrs = []
  }


Label

Renders an accessible label associated with controls.

Label


Props API

-- | Props for 'label_'
data LabelProps model action
  = LabelProps
  { labelFor :: Maybe MisoString
    -- ^ @for@ attribute (id of the labelled control)
  , labelClasses :: [MisoString]
    -- ^ Extra classes appended to @label@
  , labelAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultLabelProps :: LabelProps model action
defaultLabelProps
  = LabelProps
  { labelFor = Nothing
  , labelClasses = []
  , labelAttrs = []
  }


Pagination

Pagination with page navigation, next and previous links.

Pagination


Props API

-- | Props for 'pagination_'
data PaginationProps model action
  = PaginationProps
  { paginationClasses :: [MisoString]
    -- ^ Extra classes appended to the @nav@
  , paginationAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultPaginationProps :: PaginationProps model action
defaultPaginationProps
  = PaginationProps
  { paginationClasses = []
  , paginationAttrs = []
  }


Popover

Displays rich content in a portal, triggered by a button.

Popover


Props API

-- | Props for 'popover_'
data PopoverProps context model action
  = PopoverProps
  { popoverId :: MisoString
    -- ^ Base id; trigger\/popover ids are derived from it (required)
  , popoverTrigger :: [View context model action]
    -- ^ Content of the trigger button (nests other views)
  , popoverTriggerClasses :: [MisoString]
    -- ^ Classes of the trigger button (defaults to @btn-outline@)
  , popoverClasses :: [MisoString]
    -- ^ Extra classes for the popover (e.g. @w-80@)
  , popoverSide :: Side
    -- ^ Placement side (@data-side@)
  , popoverAlign :: Align
    -- ^ Placement alignment (@data-align@)
  , popoverAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: outline trigger, bottom placement
defaultPopoverProps :: PopoverProps context model action
defaultPopoverProps
  = PopoverProps
  { popoverId = "popover"
  , popoverTrigger = []
  , popoverTriggerClasses = [ "btn-outline" ]
  , popoverClasses = [ "w-80" ]
  , popoverSide = BottomSide
  , popoverAlign = CenterAlign
  , popoverAttrs = []
  }


Progress

Displays an indicator showing the completion progress of a task.

Progress


Props API

-- | Props for 'progress_'
data ProgressProps model action
  = ProgressProps
  { progressValue :: Int
    -- ^ Percentage complete (0-100)
  , progressClasses :: [MisoString]
    -- ^ Extra classes appended to the track
  , progressAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: empty bar
defaultProgressProps :: ProgressProps model action
defaultProgressProps
  = ProgressProps
  { progressValue = 0
  , progressClasses = []
  , progressAttrs = []
  }


Radio Group

A set of checkable buttons where only one can be checked at a time.

Radio Group


Props API

-- | Props for 'radioGroup_'
data RadioGroupProps model action
  = RadioGroupProps
  { radioGroupClasses :: [MisoString]
    -- ^ Extra classes appended to the @fieldset@
  , radioGroupAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultRadioGroupProps :: RadioGroupProps model action
defaultRadioGroupProps
  = RadioGroupProps
  { radioGroupClasses = []
  , radioGroupAttrs = []
  }
-----------------------------------------------------------------------------
-- | Props for a single 'radio_' inside a group
data RadioProps model action
  = RadioProps
  { radioName :: MisoString
    -- ^ Groups radios together (required)
  , radioValue :: MisoString
  , radioChecked :: Bool
  , radioDisabled :: Bool
  , radioClasses :: [MisoString]
    -- ^ Extra classes appended to the @input@
  , radioLabelClasses :: [MisoString]
    -- ^ Extra classes appended to the wrapping @label@
  , radioAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: unchecked, enabled
defaultRadioProps :: RadioProps model action
defaultRadioProps
  = RadioProps
  { radioName = "radio-group"
  , radioValue = ""
  , radioChecked = False
  , radioDisabled = False
  , radioClasses = []
  , radioLabelClasses = []
  , radioAttrs = []
  }


Select

Displays a list of options for the user to pick from.

Select


Props API

-- | Props for the native 'select_'
data SelectProps model action
  = SelectProps
  { selectId :: Maybe MisoString
  , selectDisabled :: Bool
  , selectClasses :: [MisoString]
    -- ^ Extra classes appended to @select@ (e.g. @w-[180px]@)
  , selectAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor for the native select
defaultSelectProps :: SelectProps model action
defaultSelectProps
  = SelectProps
  { selectId = Nothing
  , selectDisabled = False
  , selectClasses = [ "w-[180px]" ]
  , selectAttrs = []
  }
-----------------------------------------------------------------------------
-- | Props for the popover-based 'selectMenu_' (basecoat JS select)
data SelectMenuProps context model action
  = SelectMenuProps
  { selectMenuId :: MisoString
    -- ^ Base id; trigger\/popover\/listbox ids are derived from it (required)
  , selectMenuLabel :: [View context model action]
    -- ^ Content of the trigger button (current selection)
  , selectMenuValue :: MisoString
    -- ^ Currently selected value (kept in a hidden input)
  , selectMenuDisabled :: Bool
  , selectMenuScrollable :: Bool
    -- ^ Constrain the listbox height and scroll (@max-h-64@)
  , selectMenuTriggerClasses :: [MisoString]
    -- ^ Extra classes for the trigger button
  , selectMenuAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor for the JS select
defaultSelectMenuProps :: SelectMenuProps context model action
defaultSelectMenuProps
  = SelectMenuProps
  { selectMenuId = "select-menu"
  , selectMenuLabel = []
  , selectMenuValue = ""
  , selectMenuDisabled = False
  , selectMenuScrollable = False
  , selectMenuTriggerClasses = [ "w-[180px]" ]
  , selectMenuAttrs = []
  }


Skeleton

Use to show a placeholder while content is loading.

Skeleton


Props API

-- | Props for 'skeleton_'
data SkeletonProps model action
  = SkeletonProps
  { skeletonCircle :: Bool
    -- ^ Round skeleton (e.g. avatar placeholder) instead of rounded rectangle
  , skeletonClasses :: [MisoString]
    -- ^ Size the skeleton with utility classes (e.g. @h-4 w-[150px]@)
  , skeletonAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: rounded rectangle
defaultSkeletonProps :: SkeletonProps model action
defaultSkeletonProps
  = SkeletonProps
  { skeletonCircle = False
  , skeletonClasses = []
  , skeletonAttrs = []
  }


Slider

An input where the user selects a value from within a given range.

Slider


Props API

-- | Props for 'slider_'
data SliderProps model action
  = SliderProps
  { sliderMin :: MisoString
  , sliderMax :: MisoString
  , sliderStep :: MisoString
  , sliderValue :: MisoString
  , sliderPercent :: MisoString
    -- ^ Initial track fill, sets the @--slider-value@ CSS variable (e.g. @\"75%\"@)
  , sliderClasses :: [MisoString]
    -- ^ Extra classes appended to the @input@
  , sliderAttrs :: [Attribute model action]
    -- ^ Extra attributes; basecoat's slider JS needs
    -- @onCreatedWith@ \/ @onBeforeDestroyedWith@ hooks passed here
  }
-----------------------------------------------------------------------------
-- | Smart constructor: 0-100, starts at 50
defaultSliderProps :: SliderProps model action
defaultSliderProps
  = SliderProps
  { sliderMin = "0"
  , sliderMax = "100"
  , sliderStep = "1"
  , sliderValue = "50"
  , sliderPercent = "50%"
  , sliderClasses = [ "w-full" ]
  , sliderAttrs = []
  }


Spinner

An indicator that can be used to show a loading state.

Spinner


Downloading...

129 MB / 1000 MB

Props API

-- | Props for 'spinner_'
data SpinnerProps model action
  = SpinnerProps
  { spinnerLabel :: MisoString
    -- ^ @aria-label@ for screen readers
  , spinnerClasses :: [MisoString]
    -- ^ Extra classes (e.g. @size-4@)
  , spinnerAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultSpinnerProps :: SpinnerProps model action
defaultSpinnerProps
  = SpinnerProps
  { spinnerLabel = "Loading"
  , spinnerClasses = [ "size-4" ]
  , spinnerAttrs = []
  }


Switch

A control that allows the user to toggle between on and off.

Switch


Props API

-- | Props for 'switch_'
data SwitchProps model action
  = SwitchProps
  { switchId :: Maybe MisoString
  , switchName :: MisoString
  , switchChecked :: Bool
  , switchDisabled :: Bool
  , switchClasses :: [MisoString]
    -- ^ Extra classes appended to the @input@ (e.g. @checked:bg-blue-500@)
  , switchLabelClasses :: [MisoString]
    -- ^ Extra classes appended to the wrapping @label@
  , switchAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: unchecked, enabled
defaultSwitchProps :: SwitchProps model action
defaultSwitchProps
  = SwitchProps
  { switchId = Nothing
  , switchName = "switch"
  , switchChecked = False
  , switchDisabled = False
  , switchClasses = []
  , switchLabelClasses = []
  , switchAttrs = []
  }


Table

A responsive table component.

Table


A list of your recent invoices.
InvoiceStatusMethodAmount
INV001PaidCredit Card$250.00
INV002PendingPayPal$150.00
INV003UnpaidBank Transfer$350.00
INV004PaidPaypal$450.00
INV005PaidCredit Card$550.00
INV006PendingBank Transfer$200.00
INV007UnpaidCredit Card$300.00
Total$2,500.00

Props API

-- | Props for 'table_'
data TableProps model action
  = TableProps
  { tableClasses :: [MisoString]
    -- ^ Extra classes appended to the @table@
  , tableWrapperClasses :: [MisoString]
    -- ^ Extra classes appended to the scrollable wrapper
  , tableAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultTableProps :: TableProps model action
defaultTableProps
  = TableProps
  { tableClasses = []
  , tableWrapperClasses = []
  , tableAttrs = []
  }


Tabs

A set of layered sections of content displayed one at a time.

Tabs


Account

Make changes to your account here. Click save when you're done.

Props API

-- | Props for 'tabs_'
data TabsProps model action
  = TabsProps
  { tabsId :: MisoString
    -- ^ id of the tabs root (basecoat JS keys off it; required)
  , tabsClasses :: [MisoString]
    -- ^ Extra classes appended to @div.tabs@
  , tabsAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor
defaultTabsProps :: TabsProps model action
defaultTabsProps
  = TabsProps
  { tabsId = "tabs"
  , tabsClasses = [ "w-full" ]
  , tabsAttrs = []
  }
-----------------------------------------------------------------------------
-- | Props for 'tabButton_'
data TabButtonProps model action
  = TabButtonProps
  { tabButtonId :: MisoString
    -- ^ id of this tab button (matched by the panel's @aria-labelledby@)
  , tabButtonControls :: MisoString
    -- ^ id of the controlled panel
  , tabButtonSelected :: Bool
  , tabButtonDisabled :: Bool
  , tabButtonAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: unselected tab
defaultTabButtonProps :: TabButtonProps model action
defaultTabButtonProps
  = TabButtonProps
  { tabButtonId = ""
  , tabButtonControls = ""
  , tabButtonSelected = False
  , tabButtonDisabled = False
  , tabButtonAttrs = []
  }
-----------------------------------------------------------------------------
-- | Props for 'tab_' (a tab panel)
data TabPanelProps model action
  = TabPanelProps
  { tabPanelId :: MisoString
    -- ^ id of the panel (matched by the button's @aria-controls@)
  , tabPanelLabelledBy :: MisoString
    -- ^ id of the button labelling this panel
  , tabPanelSelected :: Bool
  , tabPanelAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: hidden panel
defaultTabPanelProps :: TabPanelProps model action
defaultTabPanelProps
  = TabPanelProps
  { tabPanelId = ""
  , tabPanelLabelledBy = ""
  , tabPanelSelected = False
  , tabPanelAttrs = []
  }


Textarea

Displays a form textarea or a component that looks like a textarea.

Textarea


Type your message and press enter to send.

Props API

-- | Props for 'textarea_'
data TextareaProps model action
  = TextareaProps
  { textareaId :: Maybe MisoString
  , textareaPlaceholder :: Maybe MisoString
  , textareaRows :: Maybe MisoString
  , textareaDisabled :: Bool
  , textareaInvalid :: Bool
    -- ^ Renders with @aria-invalid@ (error styling)
  , textareaClasses :: [MisoString]
    -- ^ Extra classes appended to @textarea@
  , textareaAttrs :: [Attribute model action]
  }
-----------------------------------------------------------------------------
-- | Smart constructor: enabled, no placeholder
defaultTextareaProps :: TextareaProps model action
defaultTextareaProps
  = TextareaProps
  { textareaId = Nothing
  , textareaPlaceholder = Nothing
  , textareaRows = Nothing
  , textareaDisabled = False
  , textareaInvalid = False
  , textareaClasses = []
  , textareaAttrs = []
  }


Toast

A succinct message that is displayed temporarily.

Toast


Props API

-- | Props describing a basecoat toast. Dispatched to basecoat's toaster JS
-- (a @basecoat:toast@ custom event) by the application's update function.
data ToastProps
  = ToastProps
  { toastCategory :: MisoString
    -- ^ @success@, @error@, @info@ or @warning@
  , toastTitle :: MisoString
  , toastDescription :: MisoString
  , toastLabel :: MisoString
    -- ^ Label of the dismiss button
  } deriving (Show, Eq)
-----------------------------------------------------------------------------
-- | Smart constructor: informational toast
defaultToastProps :: ToastProps
defaultToastProps
  = ToastProps
  { toastCategory = "info"
  , toastTitle = ""
  , toastDescription = ""
  , toastLabel = "Dismiss"
  }


Tooltip

A popup that displays information related to an element on hover or focus.

Tooltip


Props API

-- | Props for 'tooltip_'
data TooltipProps model action
  = TooltipProps
  { tooltipText :: MisoString
    -- ^ Tooltip content (@data-tooltip@)
  , tooltipSide :: Side
    -- ^ Placement (@data-side@); 'TopSide' by default
  , tooltipButton :: ButtonProps model action
    -- ^ Props for the trigger button rendered by 'tooltip_'
  }
-----------------------------------------------------------------------------
-- | Smart constructor: tooltip on top of an outline button
defaultTooltipProps :: TooltipProps model action
defaultTooltipProps
  = TooltipProps
  { tooltipText = ""
  , tooltipSide = TopSide
  , tooltipButton = defaultButtonProps { buttonVariant = Outline }
  }