* refactor: eslint config adjusted for better diff's * refactor: stricter linting + dependencies updated * refactoring: paragraph component - component - docs * refactoring: heading component - component - docs * Update docs/components/heading.md Co-authored-by: Ilya Artamonov <ilya.sosidka@gmail.com> * refactoring: link component - component - docs * refactoring: image component - component - docs * refactoring: alert component - component - docs * refactoring: avatar component - component - docs * refactoring: removed unnecessary code - component names come from the file name * refactoring: breadcrumb component - component - docs * refactoring: accordion component - component - docs * refactoring: buttom component - component - docs * refactoring: badge component - component - docs * refactoring: card component - component - docs * refactoring: order of components in docs updated * refactoring: unnecessary semicolons removed * refactoring: button group component - component - docs * refactoring: carousel component - component - docs * refactoring: dropdown component - component - docs * refactoring: footer component - component - docs * refactoring:list-group component - component - docs * refactoring: modal component - component - docs * refactoring: navbar component - component - docs * refactoring: pagination component - component - docs * refactoring: progress component - component - docs * refactoring: rating component - component - docs * refactoring: spinner component - component - docs * refactoring: table component - component - docs * refactoring: tabs component - component - docs * feat: Updated pagination examples * lint: Lister fixes * feat: Sidebar component and some fixes * feat: Input component * feat: Some fixes * feat: Some fixes * chore: update deps * refactor: removed old Modal component * refactor: radio component and some fixes * fix: fixed path error * refactor: Range component * refactoring: timeline component - component - docs * refactor: Select component * refactoring: toast component - component - docs * refactoring: tooltip component - component - docs * refactoring: sidebar component - component - docs * refactoring: input component - component - docs * refactoring: fileInput component - component - docs * refactoring: select component - component - docs * refactoring: textarea component - component - docs * refactoring: checkbox component - component - docs * refactoring: radio component - component - docs * refactoring: toggle component - component - docs * refactoring: range component - component - docs * local configs linted * documentation quick start updated * flowbite-themable refactored to fit new linters and style guide * random linter fixes * refactoring: toast-provider component - component - docs * final linter fixes * lint: Linter fixes * fix: Fixed types * fix: Fixed card component * docs: Updated card examples * fix: Fixed tabs * refactor: Heading component refactoring * Fwb rename - few fixes after component review (#237) * fix: button documentation * fix: model type in range examples * chore: Toast marked as WIP --------- Co-authored-by: Sqrcz <naorniakowski@slashlab.pl> Co-authored-by: Sqrcz <naorniakowski@gmail.com>
279 lines
7.6 KiB
Markdown
279 lines
7.6 KiB
Markdown
<script setup>
|
|
import FwbTableExample from './table/examples/FwbTableExample.vue'
|
|
import FwbTableExampleHoverable from './table/examples/FwbTableExampleHoverable.vue'
|
|
import FwbTableExampleStriped from './table/examples/FwbTableExampleStriped.vue'
|
|
import FwbTableExampleStripedColumns from './table/examples/FwbTableExampleStripedColumns.vue'
|
|
</script>
|
|
# Vue Table - Flowbite
|
|
|
|
#### Button groups are a Tailwind CSS powered set of buttons sticked together in a horizontal line
|
|
|
|
---
|
|
|
|
:::tip
|
|
Original reference: [https://flowbite.com/docs/components/tables/](https://flowbite.com/docs/components/tables/)
|
|
:::
|
|
|
|
## Basic example
|
|
|
|
<fwb-table-example />
|
|
```vue
|
|
<template>
|
|
<fwb-table>
|
|
<fwb-table-head>
|
|
<fwb-table-head-cell>Product name</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Color</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Category</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Price</fwb-table-head-cell>
|
|
<fwb-table-head-cell>
|
|
<span class="sr-only">Edit</span>
|
|
</fwb-table-head-cell>
|
|
</fwb-table-head>
|
|
<fwb-table-body>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Apple MacBook Pro 17"</fwb-table-cell>
|
|
<fwb-table-cell>Sliver</fwb-table-cell>
|
|
<fwb-table-cell>Laptop</fwb-table-cell>
|
|
<fwb-table-cell>$2999</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Microsoft Surface Pro</fwb-table-cell>
|
|
<fwb-table-cell>White</fwb-table-cell>
|
|
<fwb-table-cell>Laptop PC</fwb-table-cell>
|
|
<fwb-table-cell>$1999</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Magic Mouse 2</fwb-table-cell>
|
|
<fwb-table-cell>Black</fwb-table-cell>
|
|
<fwb-table-cell>Accessories</fwb-table-cell>
|
|
<fwb-table-cell>$99</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
</fwb-table-body>
|
|
</fwb-table>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {
|
|
FwbA,
|
|
FwbTable,
|
|
FwbTableBody,
|
|
FwbTableCell,
|
|
FwbTableHead,
|
|
FwbTableHeadCell,
|
|
FwbTableRow,
|
|
} from 'flowbite-vue'
|
|
</script>
|
|
```
|
|
|
|
## Striped example
|
|
|
|
<fwb-table-example-striped />
|
|
```vue
|
|
<template>
|
|
<fwb-table striped>
|
|
<fwb-table-head>
|
|
<fwb-table-head-cell>Product name</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Color</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Category</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Price</fwb-table-head-cell>
|
|
<fwb-table-head-cell>
|
|
<span class="sr-only">Edit</span>
|
|
</fwb-table-head-cell>
|
|
</fwb-table-head>
|
|
<fwb-table-body>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Apple MacBook Pro 17"</fwb-table-cell>
|
|
<fwb-table-cell>Sliver</fwb-table-cell>
|
|
<fwb-table-cell>Laptop</fwb-table-cell>
|
|
<fwb-table-cell>$2999</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Microsoft Surface Pro</fwb-table-cell>
|
|
<fwb-table-cell>White</fwb-table-cell>
|
|
<fwb-table-cell>Laptop PC</fwb-table-cell>
|
|
<fwb-table-cell>$1999</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Magic Mouse 2</fwb-table-cell>
|
|
<fwb-table-cell>Black</fwb-table-cell>
|
|
<fwb-table-cell>Accessories</fwb-table-cell>
|
|
<fwb-table-cell>$99</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
</fwb-table-body>
|
|
</fwb-table>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {
|
|
FwbA,
|
|
FwbTable,
|
|
FwbTableBody,
|
|
FwbTableCell,
|
|
FwbTableHead,
|
|
FwbTableHeadCell,
|
|
FwbTableRow,
|
|
} from 'flowbite-vue'
|
|
</script>
|
|
|
|
```
|
|
|
|
## Striped columns example
|
|
|
|
<fwb-table-example-striped-columns />
|
|
```vue
|
|
<template>
|
|
<fwb-table striped-columns>
|
|
<fwb-table-head>
|
|
<fwb-table-head-cell>Product name</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Color</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Category</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Price</fwb-table-head-cell>
|
|
<fwb-table-head-cell><span class="sr-only">Edit</span></fwb-table-head-cell>
|
|
</fwb-table-head>
|
|
<fwb-table-body>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Apple MacBook Pro 17"</fwb-table-cell>
|
|
<fwb-table-cell>Sliver</fwb-table-cell>
|
|
<fwb-table-cell>Laptop</fwb-table-cell>
|
|
<fwb-table-cell>$2999</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Microsoft Surface Pro</fwb-table-cell>
|
|
<fwb-table-cell>White</fwb-table-cell>
|
|
<fwb-table-cell>Laptop PC</fwb-table-cell>
|
|
<fwb-table-cell>$1999</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Magic Mouse 2</fwb-table-cell>
|
|
<fwb-table-cell>Black</fwb-table-cell>
|
|
<fwb-table-cell>Accessories</fwb-table-cell>
|
|
<fwb-table-cell>$99</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
</fwb-table-body>
|
|
</fwb-table>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {
|
|
FwbA,
|
|
FwbTable,
|
|
FwbTableBody,
|
|
FwbTableCell,
|
|
FwbTableHead,
|
|
FwbTableHeadCell,
|
|
FwbTableRow,
|
|
} from 'flowbite-vue'
|
|
</script>
|
|
```
|
|
|
|
## Hoverable example
|
|
|
|
<fwb-table-example-hoverable />
|
|
```vue
|
|
<template>
|
|
<fwb-table hoverable>
|
|
<fwb-table-head>
|
|
<fwb-table-head-cell>Product name</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Color</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Category</fwb-table-head-cell>
|
|
<fwb-table-head-cell>Price</fwb-table-head-cell>
|
|
<fwb-table-head-cell>
|
|
<span class="sr-only">Edit</span>
|
|
</fwb-table-head-cell>
|
|
</fwb-table-head>
|
|
<fwb-table-body>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Apple MacBook Pro 17"</fwb-table-cell>
|
|
<fwb-table-cell>Sliver</fwb-table-cell>
|
|
<fwb-table-cell>Laptop</fwb-table-cell>
|
|
<fwb-table-cell>$2999</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Microsoft Surface Pro</fwb-table-cell>
|
|
<fwb-table-cell>White</fwb-table-cell>
|
|
<fwb-table-cell>Laptop PC</fwb-table-cell>
|
|
<fwb-table-cell>$1999</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
<fwb-table-row>
|
|
<fwb-table-cell>Magic Mouse 2</fwb-table-cell>
|
|
<fwb-table-cell>Black</fwb-table-cell>
|
|
<fwb-table-cell>Accessories</fwb-table-cell>
|
|
<fwb-table-cell>$99</fwb-table-cell>
|
|
<fwb-table-cell>
|
|
<fwb-a href="#">
|
|
Edit
|
|
</fwb-a>
|
|
</fwb-table-cell>
|
|
</fwb-table-row>
|
|
</fwb-table-body>
|
|
</fwb-table>
|
|
</template>
|
|
|
|
<script setup>
|
|
import {
|
|
FwbA,
|
|
FwbTable,
|
|
FwbTableBody,
|
|
FwbTableCell,
|
|
FwbTableHead,
|
|
FwbTableHeadCell,
|
|
FwbTableRow,
|
|
} from 'flowbite-vue'
|
|
</script>
|
|
```
|