LogoLogo
GithubTwitterDiscordPlayground
English
English
  • ๐Ÿ‘‹Atomico
  • ๐Ÿš€Getting started with Atomico
  • โš›๏ธGetting started with Atomico for React users
  • ๐Ÿ’กWhat can you do with Atomico?
    • You can create amazing webcomponents
    • You can create design systems
    • You can create websites
    • You can create mobile applications
    • You can create web applications
  • API
    • ๐ŸงฌProps(Properties)
      • Value cycle as prop
      • Is it advisable to declare events using the props API?
    • ๐ŸงฉVirtualDOM
      • Advanced
    • ๐ŸŽฃHooks
      • useProp
      • useEvent
      • useRef
      • useHost
      • useState
      • useReducer
      • useEffect, useLayoutEffect and useInsertionEffect
      • useMemo and useCallback
      • useUpdate
      • useId
      • useContext
        • useProvider
      • usePromise
      • useAsync and useSuspense
      • useAbortController
    • ๐Ÿ”ฌTesting
      • Render cycle
      • atomico/test-hooks
      • atomico/test-dom
  • Guides
    • ๐Ÿค”Frequent questions
      • Is it advisable to declare events using the props API?
      • How to declare events for your component at the type level for TSX?
      • When and why to use shadowDom?
      • Can I use Atomico in browsers without ESM support?
    • ๐ŸคฉComponent
      • Naming
      • CSS Styles with Shadow DOM
    • ๐Ÿ›ก๏ธAtomico with Typescript
      • Props
      • Component
      • Meta-types
        • Type
        • Event declaration
        • Method declaration
      • Check the correct use of hooks
    • ๐ŸคAtomico and React
      • Integrating Atomico in React
      • From React to Atomico
        • Rendering Differences
        • VirtualDOM api differences
    • โณAtomico and Asynchrony
    • ๐Ÿง Atomico design patterns
      • โ™ป๏ธWebcomponents with hybrid rendering
      • ๐Ÿ”—Slot as templates
      • ๐Ÿ”€Slot
    • ๐Ÿ“–Atomico and Storybook
      • Frequent questions
    • ๐Ÿ’งSSR / SSG
    • ๐Ÿ—ƒ๏ธArchives
      • Class inheritance
      • Forms and shadowDOM
      • Tips
      • Design systems
      • Atomico style guide
        • File structure
          • Monorepo
          • Design systems
  • packages
    • @atomico/hooks
      • useCurrentValue
      • use-intersection-observer
      • use-ref-values
      • use-script
      • use-attributes
      • use-prop-proxy
      • use-click-press
      • use-dollars
      • use-reflect-event
      • use-keyboar
      • use-click-coordinates
      • use-copy
      • use-debounce-state
      • use-form
      • use-listener
      • use-disabled
      • use-css
      • use-channel
      • use-promise
      • use-responsive-state
      • use-parent
      • use-resize-observer
      • use-slot
        • useSlot
        • useProxySlot
      • use-render
      • use-mutation-observer
      • use-css-light-dom
      • use-controller
      • use-router
      • use-async-effect
      • use-child-nodes
      • use-force-render
    • @atomico/store
      • Store
    • @atomico/storybook
    • @atomico/router
    • @atomico/vite
      • โš™๏ธProcess CSS tag template blocks with PostCSS.
      • ๐Ÿ—๏ธCompile your code to be distributed optimally as a package.
      • ๐Ÿ“•Use the JSX/TSX syntax of Atomico when using Storybook.
      • ๐Ÿค–Automatically create customElements.define
      • โ˜‘๏ธSupport for Vitest for Atomico.
      • ๐Ÿง™โ€โ™‚๏ธServer actions
    • @atomico/exports
      • ๐ŸšฉCLI and Flags
      • ๐Ÿค–Wrapper for React
    • @atomico/components
      • @atomico/keen-slider
      • @atomico/modal
      • @atomico/lottie
      • @atomico/table
    • @atomico/react
    • @atomico/postcss-tokens
      • Example with @atomico/vite
    • @atomico/wrapper
    • ๐ŸšซDeprecated
      • @atomico/magic-form
        • MagicFormProvider | <magic-form-provider>
        • MagicForm | <magic-form>
        • MagicForm Hooks
        • MagicForm in React and Preact
        • MagicForm in Microfrontend
        • MagicForm Patterns
      • @atomico/design-tokens
        • @atomico/design-tokens api
  • Support
    • Discord
    • Github
    • Twitter
Powered by GitBook
On this page
  • Modules
  • Custom properties
  • Properties Table
  • Properties Tr
  • Properties Td
  • Examples

Was this helpful?

Edit on GitHub
Export as PDF
  1. packages
  2. @atomico/components

@atomico/table

Previous@atomico/lottieNext@atomico/react

Last updated 2 years ago

Was this helpful?

Webcomponent built with , Simple to use and customize table. Includes additional support for React and Preact.

Modules

import { Table, Tr, Td } from "@atomico/table";
// Import that does not associate the tagName by default
import { Table, Tr, Td } from "@atomico/table/elements";
import { Table, Tr, Td } from "@atomico/table/react";
import { Table, Tr, Td } from "@atomico/table/preact";
<script 
    type="module" 
    src="http://esm.sh/@atomico/table"></script>
    
<atomico-table></atomico-table>

Custom properties

Global
Description

--table--radius

table borde-radius

--table--background

table background

--table--border

table borde

--table--border-split

border dividing cells

--table--row-gap

row spacing

--table--row-radius

row border-radius

--table--row-shadow

row box-shadow

--table--row-background

row background

--table--row-header-radius

border-radius of the row declared as slot="header"

--table--row-header-shadow

box-shadow of the row declared as slot="header"

--table--row-header-background

background of the row declared as slot="header"

--table--row-last-radius

borde-radius de la ultima fila

--table--cell-align

cell alignment, default middle

--table--cell-padding

cell padding

--table--cell-header-padding

padding of the cell inside the Tr declared as slot="header"

Properties Table

collapse: boolean, collapses the rows of the table, if breakpoint is defined the component will automatically define this props when detecting the match with breakpoint.

breakpoint: string, media query to observe to copal the table.

Properties Tr

sticky: boolan,The table row will set its position according to the scroll position

The following properties are automatically defined by the component to declare state.

td: array ,list of Td nodes associated with the TR component

collapse: boolean, property defined according to the state of the parent.

last: last row of the table

Properties Td

width: string, cell width.

Examples

React

Atomico JS
Logocomponents/src/components/table at master ยท atomicojs/componentsGitHub
Logo@atomico/table (React) - StackBlitzStackBlitz