shimmer

RSE

React Shimmer Table Component - Light, Dark & Custom Modes

Enhance your web applications with the dynamic Shimmer Table Component, available in light and dark modes with customizable sizes.


Shimmer Table Light Mode

<ShimmerTable mode="light" row={7} col={5} border={1} borderColor={"#cbd5e1"} rounded={0.25} rowGap={16} colPadding={[10, 5, 10, 5]} />

Shimmer Table Dark Mode

<ShimmerTable mode="dark" row={7} col={5} border={1} borderColor={"#374151"} rounded={0.25} rowGap={16} colPadding={[10, 5, 10, 5]} />

Shimmer Table Custom Mode

<ShimmerTable mode="custom" row={7} col={5} border={1} borderColor={"#374151"} rounded={0.25} rowGap={16} colPadding={[10, 5, 10, 5]} />

Shimmer Table Loading Mode

<ShimmerTable
  loading={loading}
  mode="light"
  row={7}
  col={5}
  border={1}
  borderColor={"#cbd5e1"}
  rounded={1}
  rowGap={16}
  colPadding={[10, 5, 10, 5]}
>
  <table style={{ borderCollapse: "collapse", width: "100%" }}>
    <tbody>
      {[...Array(7)].map((_, rowIndex) => (
        <tr key={rowIndex} style={{ height: "40px" }}>
          {[...Array(5)].map((_, colIndex) => (
            <td
              key={colIndex}
              style={{
                border: "1px solid #cbd5e1",
                borderRadius: "0.25em",
                padding: "10px 5px",
                textAlign: "center",
              }}
            >
              Col {colIndex}
            </td>
          ))}
        </tr>
      ))}
    </tbody>
  </table>
</ShimmerTable>

Properties

PropertyTypeRequiredDefault valueDescription
rownumberYes-The number of rows in the table.
colnumberYes-The number of columns in the table.
bordernumberNo1The border width of the table.
borderColorstringNo-The border color of the table.
roundednumberNo0.1emThe border radius of the table.
rowGapnumberNo14pxThe gap between rows in the table.
colPaddingnumber[]No[10px, 5px, 10px, 5px]The padding of each column in the table.
loadingbooleanNotrueWhether the table is in a loading state.
childrenReactElementNo-Element to load after loading false
mode"light" | "dark" | "custom"Yes-The mode of the table (light, dark, or custom).
from, via, tostringYes (for mode "custom")-The colors used in custom mode.

Take it further

Take full advantage of React Shimmer Effect by experimenting with its extensive features and customization options