Skip to content

Nutrition table with adjustable portion

The regulatory nutrition table per 100 g and per portion, with the reference intake percentage, an adjustable portion and allergens in bold in the ingredients.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

For a delicatessen, bakery, caterer or producer selling online, this component sets out the mandatory nutrition declaration (EU FIC regulation) in a real table: energy in kJ and kcal, fat of which saturates, carbohydrate of which sugars, fibre, protein and salt, per 100 g and per portion, with the share of an adult's reference intakes. A number field sets the portion (10 to 200 g): the column, its header and the table caption are recalculated at once, with a French decimal comma. The ingredient list puts allergens in bold, as the regulation requires, and says so in words. Without JavaScript the table shows the suggested portion. Row and column headers, an explained abbreviation, indented sub-rows, a 44 px field with a visible focus, AA contrast in light and dark mode, no horizontal scrolling from 360 px. Example: an artisan granola.

Code

Loading the code…

The code of this component in

Archive contents

tableau-nutritionnel-html-tailwind.zip3 files · 5 Ko

  • index.html12 Ko
  • README.md4 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 2, 2026.

Reviews

No reviews yet.

In the same spirit

  • A documentation table showing where a kit or component has been tested (static HTML, WordPress, Elementor, Webflow, v0…), with status, last test date and a remark, filterable by status.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A table of the towns and postcodes a tradesperson covers, with response time and travel fee, filtered by search and by zone.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A timetable table sorted by column and filtered with level and free-place chips, whose rows each become a card on phones.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A filterable table whose visible rows export in one click to a CSV file that opens cleanly in Excel or LibreOffice.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component