    <SEC-DOCUMENT>0001193125-22-191914-index.html : 20220712
    <SEC-HEADER>0001193125-22-191914.hdr.sgml : 20220712
    <ACCEPTANCE-DATETIME>20220712141011
    ACCESSION NUMBER:		0001193125-22-191914
    CONFORMED SUBMISSION TYPE:	8-K
    PUBLIC DOCUMENT COUNT:		51
    CONFORMED PERIOD OF REPORT:	20220707
    ITEM INFORMATION:		Entry into a Material Definitive Agreement
    ITEM INFORMATION:		Financial Statements and Exhibits
    FILED AS OF DATE:		20220712
    DATE AS OF CHANGE:		20220712

    FILER:

    	COMPANY DATA:
    		COMPANY CONFORMED NAME:			TREX CO INC
    		CENTRAL INDEX KEY:			0001069878
    		STANDARD INDUSTRIAL CLASSIFICATION:	LUMBER & WOOD PRODUCTS (NO FURNITURE) [2400]
    		IRS NUMBER:				541910453
    		STATE OF INCORPORATION:			DE
    		FISCAL YEAR END:			1231

    	FILING VALUES:
    		FORM TYPE:		8-K
    		SEC ACT:		1934 Act
    		SEC FILE NUMBER:	001-14649
    		FILM NUMBER:		221078919

    	BUSINESS ADDRESS:
    		STREET 1:		160 EXETER DRIVE
    		CITY:			WINCHESTER
    		STATE:			VA
    		ZIP:			22603-8605
    		BUSINESS PHONE:		5405426300

    	MAIL ADDRESS:
    		STREET 1:		160 EXETER DRIVE
    		CITY:			WINCHESTER
    		STATE:			VA
    		ZIP:			22603-8605
    </SEC-HEADER>
    <DOCUMENT>
    <TYPE>8-K
    <SEQUENCE>1
    <FILENAME>d372793d8k.htm
    <DESCRIPTION>8-K
    <TEXT>
    Document 1 - file: d372793d8k.htm

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>EX-10.1
    <SEQUENCE>2
    <FILENAME>d372793dex101.htm
    <DESCRIPTION>EX-10.1
    <TEXT>
    Document 2 - file: d372793dex101.htm

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>EX-101.SCH
    <SEQUENCE>3
    <FILENAME>trex-20220707.xsd
    <DESCRIPTION>XBRL TAXONOMY EXTENSION SCHEMA
    <TEXT>
    Document 3 - file: trex-20220707.xsd

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>EX-101.LAB
    <SEQUENCE>4
    <FILENAME>trex-20220707_lab.xml
    <DESCRIPTION>XBRL TAXONOMY EXTENSION LABEL LINKBASE
    <TEXT>
    Document 4 - file: trex-20220707_lab.xml

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>EX-101.PRE
    <SEQUENCE>5
    <FILENAME>trex-20220707_pre.xml
    <DESCRIPTION>XBRL TAXONOMY EXTENSION PRESENTATION LINKBASE
    <TEXT>
    Document 5 - file: trex-20220707_pre.xml

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>6
    <FILENAME>g372793dsp10.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 6 - file: g372793dsp10.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>7
    <FILENAME>g372793dsp11.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 7 - file: g372793dsp11.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>8
    <FILENAME>g372793dsp12.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 8 - file: g372793dsp12.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>9
    <FILENAME>g372793dsp13.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 9 - file: g372793dsp13.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>10
    <FILENAME>g372793dsp14.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 10 - file: g372793dsp14.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>11
    <FILENAME>g372793dsp15.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 11 - file: g372793dsp15.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>12
    <FILENAME>g372793dsp16.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 12 - file: g372793dsp16.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>13
    <FILENAME>g372793dsp17.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 13 - file: g372793dsp17.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>14
    <FILENAME>g372793dsp18.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 14 - file: g372793dsp18.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>15
    <FILENAME>g372793dsp19.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 15 - file: g372793dsp19.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>16
    <FILENAME>g372793dsp20.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 16 - file: g372793dsp20.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>17
    <FILENAME>g372793dsp21.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 17 - file: g372793dsp21.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>18
    <FILENAME>g372793dsp22.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 18 - file: g372793dsp22.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>19
    <FILENAME>g372793dsp23.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 19 - file: g372793dsp23.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>20
    <FILENAME>g372793dsp24.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 20 - file: g372793dsp24.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>21
    <FILENAME>g372793dsp25.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 21 - file: g372793dsp25.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>22
    <FILENAME>g372793dsp26.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 22 - file: g372793dsp26.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>23
    <FILENAME>g372793dsp27.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 23 - file: g372793dsp27.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>24
    <FILENAME>g372793dsp28.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 24 - file: g372793dsp28.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>25
    <FILENAME>g372793dsp29.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 25 - file: g372793dsp29.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>26
    <FILENAME>g372793dsp30.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 26 - file: g372793dsp30.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>27
    <FILENAME>g372793dsp31.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 27 - file: g372793dsp31.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>28
    <FILENAME>g372793dsp32.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 28 - file: g372793dsp32.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>29
    <FILENAME>g372793dsp33.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 29 - file: g372793dsp33.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>30
    <FILENAME>g372793dsp34.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 30 - file: g372793dsp34.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>31
    <FILENAME>g372793dsp35.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 31 - file: g372793dsp35.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>32
    <FILENAME>g372793dsp36.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 32 - file: g372793dsp36.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>33
    <FILENAME>g372793dsp37.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 33 - file: g372793dsp37.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>34
    <FILENAME>g372793dsp38.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 34 - file: g372793dsp38.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>35
    <FILENAME>g372793dsp39.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 35 - file: g372793dsp39.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>36
    <FILENAME>g372793dsp40.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 36 - file: g372793dsp40.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>37
    <FILENAME>g372793dsp41.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 37 - file: g372793dsp41.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>38
    <FILENAME>g372793dsp42.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 38 - file: g372793dsp42.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>39
    <FILENAME>g372793dsp5.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 39 - file: g372793dsp5.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>40
    <FILENAME>g372793dsp6.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 40 - file: g372793dsp6.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>41
    <FILENAME>g372793dsp7.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 41 - file: g372793dsp7.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>42
    <FILENAME>g372793dsp8.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 42 - file: g372793dsp8.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>GRAPHIC
    <SEQUENCE>43
    <FILENAME>g372793dsp9.jpg
    <DESCRIPTION>GRAPHIC
    <TEXT>
    Document 43 - file: g372793dsp9.jpg

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>44
    <FILENAME>R1.htm
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 44 - file: R1.htm

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>45
    <FILENAME>d372793d8k_htm.xml
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 45 - file: d372793d8k_htm.html

    Document 45 - RAW XML: d372793d8k_htm.xml

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>EXCEL
    <SEQUENCE>46
    <FILENAME>Financial_Report.xlsx
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 46 - file: Financial_Report.xlsx

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>47
    <FILENAME>Show.js
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 47 - file: Show.js

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>48
    <FILENAME>report.css
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 48 - file: report.css

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>XML
    <SEQUENCE>49
    <FILENAME>FilingSummary.xml
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 49 - file: FilingSummary.html

    Document 49 - RAW XML: FilingSummary.xml

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>JSON
    <SEQUENCE>52
    <FILENAME>MetaLinks.json
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 52 - file: MetaLinks.json

    </DOCUMENT>
    <DOCUMENT>
    <TYPE>ZIP
    <SEQUENCE>53
    <FILENAME>0001193125-22-191914-xbrl.zip
    <DESCRIPTION>IDEA: XBRL DOCUMENT
    <TEXT>
    Document 53 - file: 0001193125-22-191914-xbrl.zip

    </DOCUMENT>
    </SEC-DOCUMENT>