Revel
GitHub
GitHub
  • Overview

    • Getting started
    • FAQ
    • Release notes
  • Foundations

    • Meet the standard
    • Accessibility
    • Internationalization
    • Information hierarchy
    • Speed
  • Design

    • Visual principles
    • Colors
    • Space
    • Icons
    • Typography
  • Design tokens
  • Style helpers
  • Content

    • Express your ideas
    • Actionable language
    • Inclusive and accessible language
    • Alternative text
    • Grammar and mechanics
      • Basics
      • Capitalization
      • Dates and units of measurement
      • Punctuation
  • Components

    • Alert
    • Avatar
    • Badge
    • Button
    • Button group
    • Checkbox
    • Date Input
      • dates
      • datetimes
      • ranges
      • date range
    • Field group
    • File upload
    • Flex
    • Grid
    • Icon
    • Image
    • Input
    • Input errors
    • Loader
    • Modal
    • Month picker
    • Multistep
      • multistep
      • step
    • Pagination
    • Popper
    • Radio
    • Repeater
    • Select
    • Tabs
    • Tile
    • Toast
    • Toggle
  • Directives

    • Click outside
    • Tooltip

Tab

Usage

r-tabs required slot must be filled by multiple r-tab components.

Examples

Define a preselected tab by passing its index to preselectedTab prop.

tabs-preselected.vue

Add custom styles with props like divided, menuClass or contentClass.

tabs-styled.vue

Use to prop to navigate to routes from tabs.

tabs-router.vue

Show validation state on the tab group with the validate prop and display messages when needed.

tabs-validation.vue

r-tabs API

Props

NameTypeDefaultDescription
dividedbooleanfalse

Define style of the tabs, are them divided or not

menuClassstring''

Specify classes of the tabs

contentClassstring''

Specify classes of the content

preselectedTabnumber0

Define preselected tab

showValidateMessagesbooleanfalse

Show validation messages on hover over invalid tab

lazybooleantrue

Defines panel rendering strategy for nested tabs. true - lazy mount with v-if false - eager mount with v-show

Slots

NameDescription
default

Tab content

Events

NameDescription
tab-selectedWhen the tab is selected

r-tab API

Props

NameTypeDefaultDescription
namestring

panelIdstring''

valuestring''

activebooleanfalse

toOptional<Ref<RouteLocation>>undefined

hiddenbooleanfalse

lazybooleanundefined

validateArray<BaseValidation>() => []

Array of Vuelidate validation objects to aggregate their states for this tab.

Slots

NameDescription
default

Required slot with the content of the tab (can be any html markup or vue components).

Edit this page
Prev
Select
Next
Tile