Convert table to card when on phone

Overview
  • Convert table to card

  • see index.html for example

  • converts table to card when viewport is <= 425px

HTML Syntax

<table>

  <!-- table headings -->
  <thead>

    <!-- use th tags for headings -->
    <th></th>

  </thead>

  <!-- table body -->
  <tbody>

    <!-- use tr tags for rows -->
    <tr>
      <!-- use td tags for columns -->
      <td></td>
    </tr>

    <tr>
      <td></td>
    </tr>

  </tbody>

</table>

Load from CDN

<script src="https://cdn.jsdelivr.net/gh/kushalcodes/konvert-table-to-card@main/konvert-table-to-card.min.js" type="text/javascript">
</script>

Usage

load this library then initialize using elements id or class

  • id
TABLE_KONVERTER.init("#tableId"); 
  • class
TABLE_KONVERTER.init(".tableClassName") 

Note: Do not add id on table with initialized class name

css initializtion works by converting tables to have generated ids and use that id to TABLE_CONVERTER.init("#generatedId"), so do not add id to table which you want to convert, else it will throw error if so

Options

// options can be passed on second parameter as obj
const options = {
  style: 'styleName', // described on Style Option below
  type: 'typeName', // described on Type Option below
  stickyHeader: { // make card title sticky
    tableHeadingName: 'Action' // title or heading of table's name
  }
};
TABLE_KONVERTER.init('#tableId', options);

Style Option

style the converted cards using prebuilt stylings

// styling names
> simple
> buddha
> casual
TABLE_KONVERTER.init("#tableId",{
  style: 'buddha' // image below is how the buddha styling look like
});

Style: 'buddha'

Type Option

// type names
> autoAlign
// can also add type
TABLE_KONVERTER.init("#tableId",{
  style: 'casual',
  type: 'autoAlign'
});
// above init will look something like this

Style: 'buddha'

Dependencies

  • Bootstrap
You might also like...

A phone input component that uses intl-tel-input for Laravel Filament

A phone input component that uses intl-tel-input for Laravel Filament

Filament Phone Input This package provides a phone input component for Laravel Filament. It uses International Telephone Input to provide a dropdown o

Nov 29, 2022

Cardmatchinggamebyercan - A card-matching game made with Flutter.

card_matching_game_by_ercan A card-matching game. Working Demo: https://confident-austin-19dbd2.netlify.app Getting Started This project is a starting

Dec 14, 2022

Venni backend - The backend of the Venni client apps implementing the credit card payments, matching algorithms, bank transfers, trip rating system, and more.

Cloud Functions Description This repository contains the cloud functions used in the Firebase backend of the Venni apps. Local Development Setup For t

Jan 3, 2022

Create a card layout that let your user flip through it like you see on Google Tips

#Tip Cards by Pete R. Create an animated card layout that let your viewer flip through it like you see on Google Tips Page. Created by Pete R., Founde

Nov 5, 2022

A card for Home Assistant Lovelace for exploring the history of your entities interactively and in real time.

A card for Home Assistant Lovelace for exploring the history of your entities interactively and in real time.

History explorer card This is a custom history card for Home Assistant. This card offers a highly interactive and configurable way to view the history

Dec 31, 2022

Different Types of Monsters Card of Popular anime. Build in React tech.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: ya

Mar 19, 2022

A website for detecting name of bank from card number, supported all Iranian banks

A website for detecting name of bank from card number, supported all Iranian banks

Detect Iranian Bank Web A website for detecting name of bank from card number, supported all Iranian banks. This package contains SVG logo and brand c

Oct 2, 2022

A Tailwind plugin that allows to create multiple groups utilities such as group-card or group-1 and works with Tailwind 3 features and all variations.

Tailwind Labeled Groups A plugin that allows to create multiple groups utilities such as group-card or group-1 and works with Tailwind 3 features and

Nov 21, 2022

Yu-Gi-Oh! Card Search Engine

Yu-Gi-Oh! Card Search Engine

Yu-Gi-Oh! Card Search Engine Buscador de cartas de Yu-Gi-Oh, os resultados são apresentados em PT-BR. Algumas cartas podem não ser encontradas devido

Apr 14, 2022
Owner
Kushal Neupane
We rise we fall
Kushal Neupane
jquery-input-mask-phone-number.js - A simple, easy jquery format phone number mask library

jquery-input-mask-phone-number A jQuery Plugin to make masks on input field to US phone format. Quick start 1. Add latest jQuery and jquery-input-mask

Raja Rama Mohan Thavalam 12 Aug 25, 2022
Simple modern JavaScript ES6 library that fetches JSON data into an HTML table which displays nicely within a Bootstrap 4 Card.

Simple modern JavaScript ES6 library that fetches JSON data into an HTML table which displays nicely within a Bootstrap 4 Card. Uses simplenotsimpler/modern-table library.

SimpleNotSimpler 6 Feb 17, 2022
Yunisdev-table2csv - Lightweight library to convert HTML table to CSV file

Installation Add following HTML before body end: <script src="https://yunisdev.github.io/table2csv/table2csv.min.js"></script> <!-- or --> <script src

Yunis Huseynzade 2 Oct 19, 2020
✏️ A small jQuery extension to turn a static HTML table into an editable one. For quickly populating a small table with JSON data, letting the user modify it with validation, and then getting JSON data back out.

jquery-editable-table A small jQuery extension to turn an HTML table editable for fast data entry and validation Demo ?? https://jsfiddle.net/torrobin

Tor 7 Jul 31, 2022
Another table select prompt plugin of inquirer.js, with powerful table render and filters.

inquirer-table-select-prompt Table row selection prompt for Inquirer.js 动机 现有的 inquirer.js 没有支持表格行选中的命令行交互的插件. 社区内能查找到的,只有一个二维数组的 checkbox,eduardobouc

锂电 3 Jan 7, 2023
A very simple tool that generates multiple spellings of a phone number (to effectively search for it using the OR operator and quotes)

phonenumberqueryconstructor A very simple tool that generates multiple writings of a phone number (to effectively search for it using the OR operator

Cyb_detective 10 Dec 7, 2022
🌐 Text Input Component for validating and formatting international phone numbers.

React Native Intl Phone Field Try the Expo Snack ?? ??️ Demo It's a javascript-only (no native code) component that can run in iOS, Android, Expo & Re

Ivanka Todorova 24 Jul 8, 2022
Verify your E-Mail and Phone Number using link sent over mail and sms.

Phone-and-Mail-Verification-With-Link Verify your E-Mail and Phone Number using link sent over mail and sms. Endpoints POST /user/create Body { "n

Prasoon Soni 5 Sep 14, 2022
Verify your E-Mail and Phone Number using link sent over mail and sms.

Send Verification Link ✅ Explore the docs » • Report Bug • Request Feature • About The Project Verify your E-Mail and Phone Number using link sent ove

Prasoon Soni 4 Jun 28, 2022
A Tempermonky / Greasemonkey plugin which can help you export your class schedule to the calendar on your phone / pad / PC / Mac.

WHU Class Schedule Export as iCS Languages: English | 簡體中文 | 繁體中文 Changelog v0.90.1 - Sep 18, 2022 Fix bugs: Fix an error when a class have multiple s

Ostrich_B 6 Sep 7, 2022