Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-table-layout

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-table-layout

A dynamic table layout for Svelte, a drop-in replacement for HTML tables that use CSS grid under the hood. It lets you easily style columns and rows even if there are cells with nontrivial colspan & rowspan.

  • 2.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Svelte Table Layout

A dynamic table layout for Svelte, a drop-in replacement for HTML tables that use CSS grid under the hood. It lets you easily style columns and rows even if there are cells with nontrivial colspan & rowspan.

<Table class="my-table">
	<tr style="background: gray">
		<td>grey</td>
		<td>row</td>
		<td>with no decoration</td>
	</tr>
	<tr style="background: pink; border: 1px solid red;">
		<td colspan={2}>pink row</td>
		<td>with red border</td>
	</tr>
</Table>

<style>
	/* make all cells that intersect the third column bold */
	:global(.my-table [data-column~='3']) {
		font-weight: bold;
	}
</style>

It also supports colspan=row to make cells span the entire row, and lets you align the columns of two different tables.

<Table bind:computedColumnWidths={columns}>
	<tr>
		<td>a-really-long-cell</td>
		<td>normal-cell</td>
		<td>xd</td>
	</tr>
	<tr>
		<td colspan="row">lorem</td>
	</tr>
</Table>

<Table {columns}>
	<tr>
		<td>a</td>
		<td>b</td>
		<td>c</td>
	</tr>
	<tr>
		<td>d</td>
		<td>e</td>
		<td>f</td>
	</tr>
</Table>

FAQs

Package last updated on 08 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc