Design

Drawers consist of a background overlay (scrim), a surface, a header, an optional close icon and main content, which can consist of a variety of controls and text styles. Examples include text blocks, Menus, Checkboxes and Radio buttons.

Examples

Usage

Drawers are used to provide a user with additional information or allow the user to perform simple tasks while never fully leaving the page. Drawer size can vary depending on the content needed but generally cover 40-60% of the page. A Drawer is placed on top of the existing page usually on the right, but they can exist on top or below. Drawers can be used for smaller forms or tasks with fewer than 5 form fields.

Drawer

Getting Started

You must configure the labels property to have a relevant title. See Labels.

Props

NameDescriptionTypeRequiredDefault
modelValueuse v-model to set modelValue property. This controls whether the Drawer is visible or notBoolean-false
widthcan have value "auto" or must end with a px,%,em,vw. Controls the width of the DrawerString-"auto"
labelsObject containing labels to be used by this component. Mainly used for i18n or customization of labels. See Labels exampleObjectfalseSee Labels example
leftWhen true Drawer will appear to the left of the windowBoolean-false
hideCloseWhen true the close button will be hidden. You must provide an alternative close methodBoolean-false

Labels

Text labels for Drawer can be customized via the labels property. The default labels values are:

{
  title: "REQUIRED",
  close: "Close Drawer"
}

title MUST be set to an appropriate value.

Events

  • update:modelValue - uses this to trigger update to v-model
  • shown - triggered after Drawer has finished showing itself
  • hidden - triggered after Drawer has finished hiding itself

Slots

  • default - content that is displayed inside the Drawer

data-ref-ids

  • feather-drawer - main Drawer div

DrawerTabContainer

A wrapper component for encapsulating the content of Drawers in tabs. This expects DrawerTab and DrawerTabContent components in the tabs and default slots respectively.

Props

NameDescriptionTypeRequiredDefault
modelValueindex of selected tabNumberfalse-

Events

  • update:modelValue - emitted when a tab is selected. Is given the index of the newly selected tab

Slots

  • default - tab content should be placed here. i.e. tab-content elements. ORDER IS IMPORTANT it should match the tab order in tabs slot
  • tabs - tabs should be placed here. i.e. TabMixin elements. ORDER IS IMPORTANT it should match the tab order in default slot

DrawerTab

A tab component, designed to be used in the tabs slot of a DrawerTabContainer. Takes a label prop which defines the slideout text.

Props

NameDescriptionTypeRequiredDefault
contentIdID of the content that the tab controlsStringfalse-
tabIdID of the tabStringfalse-
disabledtrue when the tab is disabledBooleanfalsefalse
labellabel for icon and slide out textStringrequiredundefined

Slots

  • default - content to be placed inside the tab, typically an Icon

DrawerContent

A wrapper for Tab Content, designed to be used in the default slot of a DrawerTabContainer. Takes a header title either through the label prop or through the header slot.

Props

NameDescriptionTypeRequiredDefault
headertext that will be displayed as the header of the content aea unless the header slot is usedStringfalse-
contentIdid of the content that the tab controlsStringfalse-
tabIdid tabStringfalse-
disabledtrue when the tab is disabledBooleanfalsefalse

Slots

  • default - slot gets loaded as the content of the tab. Underneath the header
  • header - slot gets loaded in the header area regardless of header prop

DrawerTabSeparator

A simple presentational separator, designed to be used in the tabs slot of a DrawerTabContainer.