<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:ffd="http://xbrl.sec.gov/ffd/2026"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <link:schemaRef
      xlink:href="https://xbrl.sec.gov/ffd/2026/ffd-2026.xsd"
      xlink:type="simple"/>
    <context id="rc">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0002139097</identifier>
        </entity>
        <period>
            <startDate>2026-10-08</startDate>
            <endDate>2026-10-08</endDate>
        </period>
    </context>
    <context id="offrl_1">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0002139097</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>1</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-10-08</startDate>
            <endDate>2026-10-08</endDate>
        </period>
    </context>
    <context id="offrl_2">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0002139097</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>2</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-10-08</startDate>
            <endDate>2026-10-08</endDate>
        </period>
    </context>
    <context id="offrl_3">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0002139097</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>3</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2026-10-08</startDate>
            <endDate>2026-10-08</endDate>
        </period>
    </context>
    <unit id="USD">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="pure">
        <measure>pure</measure>
    </unit>
    <unit id="Shares">
        <measure>shares</measure>
    </unit>
    <ffd:FormTp contextRef="rc" id="ixv-210">S-8</ffd:FormTp>
    <ffd:SubmissnTp contextRef="rc" id="ixv-211">S-8</ffd:SubmissnTp>
    <ffd:FeeExhibitTp contextRef="rc" id="ixv-212">EX-FILING FEES</ffd:FeeExhibitTp>
    <dei:EntityCentralIndexKey contextRef="rc" id="ixv-213">0002139097</dei:EntityCentralIndexKey>
    <dei:EntityRegistrantName contextRef="rc" id="ixv-214">TRex Bio, Inc.</dei:EntityRegistrantName>
    <ffd:OfferingTableNa contextRef="rc" id="hiddenrcOfferingTableNa" xsi:nil="true"/>
    <ffd:OffsetTableNa contextRef="rc" id="hiddenrcOffsetTableNa">N/A</ffd:OffsetTableNa>
    <ffd:PrevslyPdFlg contextRef="offrl_1" id="ixv-217">false</ffd:PrevslyPdFlg>
    <ffd:PrevslyPdFlg contextRef="offrl_2" id="ixv-218">false</ffd:PrevslyPdFlg>
    <ffd:PrevslyPdFlg contextRef="offrl_3" id="ixv-219">false</ffd:PrevslyPdFlg>
    <ffd:FormTp contextRef="rc" id="ixv-262">S-8</ffd:FormTp>
    <dei:EntityRegistrantName contextRef="rc" id="ixv-263">TRex Bio, Inc.</dei:EntityRegistrantName>
    <ffd:OfferingSctyTp contextRef="offrl_1" id="ixv-264">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl contextRef="offrl_1" id="ixv-265">TRex Bio, Inc. 2024 Equity Incentive Plan - Common Stock, $0.0001 par value per share</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg contextRef="offrl_1" id="ixv-266">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="offrl_1"
      decimals="0"
      id="ixv-267"
      unitRef="Shares">2848269</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="offrl_1"
      decimals="2"
      id="ixv-268"
      unitRef="USD">1.23</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric
      contextRef="offrl_1"
      decimals="2"
      id="ixv-269"
      unitRef="USD">3503370.87</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate
      contextRef="offrl_1"
      decimals="6"
      id="ixv-270"
      unitRef="pure">0.000087</ffd:FeeRate>
    <ffd:FeeAmt
      contextRef="offrl_1"
      decimals="2"
      id="ixv-271"
      unitRef="USD">304.79</ffd:FeeAmt>
    <ffd:OfferingSctyTp contextRef="offrl_2" id="ixv-272">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl contextRef="offrl_2" id="ixv-273">TRex Bio, Inc. 2026 Equity Incentive Plan - Common Stock, $0.0001 par value per share</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg contextRef="offrl_2" id="ixv-274">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="offrl_2"
      decimals="0"
      id="ixv-275"
      unitRef="Shares">2757753</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="offrl_2"
      decimals="2"
      id="ixv-276"
      unitRef="USD">15.00</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric
      contextRef="offrl_2"
      decimals="2"
      id="ixv-277"
      unitRef="USD">41366295.00</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate
      contextRef="offrl_2"
      decimals="6"
      id="ixv-278"
      unitRef="pure">0.000087</ffd:FeeRate>
    <ffd:FeeAmt
      contextRef="offrl_2"
      decimals="2"
      id="ixv-279"
      unitRef="USD">3598.87</ffd:FeeAmt>
    <ffd:OfferingSctyTp contextRef="offrl_3" id="ixv-280">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl contextRef="offrl_3" id="ixv-281">TRex Bio, Inc. 2026 Employee Stock Purchase Plan - Common Stock, $0.0001 par value per share</ffd:OfferingSctyTitl>
    <ffd:FeesOthrRuleFlg contextRef="offrl_3" id="ixv-282">true</ffd:FeesOthrRuleFlg>
    <ffd:AmtSctiesRegd
      contextRef="offrl_3"
      decimals="0"
      id="ixv-283"
      unitRef="Shares">275775</ffd:AmtSctiesRegd>
    <ffd:MaxOfferingPricPerScty
      contextRef="offrl_3"
      decimals="2"
      id="ixv-284"
      unitRef="USD">15.00</ffd:MaxOfferingPricPerScty>
    <ffd:MaxAggtOfferingPric
      contextRef="offrl_3"
      decimals="2"
      id="ixv-285"
      unitRef="USD">4136625.00</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate
      contextRef="offrl_3"
      decimals="6"
      id="ixv-286"
      unitRef="pure">0.000087</ffd:FeeRate>
    <ffd:FeeAmt
      contextRef="offrl_3"
      decimals="2"
      id="ixv-287"
      unitRef="USD">359.89</ffd:FeeAmt>
    <ffd:TtlOfferingAmt contextRef="rc" decimals="2" id="ixv-288" unitRef="USD">49006290.87</ffd:TtlOfferingAmt>
    <ffd:TtlFeeAmt contextRef="rc" decimals="2" id="ixv-289" unitRef="USD">4263.55</ffd:TtlFeeAmt>
    <ffd:TtlOffsetAmt contextRef="rc" decimals="2" id="ixv-290" unitRef="USD">0.00</ffd:TtlOffsetAmt>
    <ffd:NetFeeAmt contextRef="rc" decimals="2" id="ixv-291" unitRef="USD">4263.55</ffd:NetFeeAmt>
    <ffd:OfferingNote contextRef="offrl_1" id="ixv-292">(1)	Pursuant to Rule 416 under the Securities Act of 1933, as amended (the "Act") this Registration Statement also covers such additional shares of common stock, par value $0.0001 per share ("Common Stock") as may be issued to prevent dilution from stock splits, stock dividends and similar transactions.

(2)	Represents shares of Common Stock issuable upon exercise or settlement of awards previously granted under the TRex Bio, Inc. 2024 Equity Incentive Plan (the "2024 Plan") that are outstanding as of the date of this Registration Statement.

(3)	Estimated solely for the purpose of calculating the registration fee pursuant to Rule 457(h) under the Act. For the shares of Common Stock reserved for issuance upon the exercise of outstanding awards under the 2024 Plan, the Proposed Maximum Offering Price Per Share is $1.22 per share, which is the weighted average exercise price (rounded to the nearest cent) of the outstanding awards under the 2024 Plan.
</ffd:OfferingNote>
    <ffd:OfferingNote contextRef="offrl_2" id="ixv-293">(1)	Pursuant to Rule 416 under the Securities Act of 1933, as amended (the "Act") this Registration Statement also covers such additional shares of common stock, par value $0.0001 per share ("Common Stock") as may be issued to prevent dilution from stock splits, stock dividends and similar transactions.

(4)	Represents shares of Common Stock reserved for issuance under the 2026 Plan (inclusive of shares subject to awards granted under the 2026 Plan prior to the date hereof). The 2026 Plan includes an "evergreen" provision, which provides that on January 1st of each year beginning in 2027 and continuing through and including 2036, the number of shares of Common Stock available for issuance under the 2026 Plan will automatically increase in an amount equal to the lesser of (A) five percent of the number of shares of Common Stock outstanding as of such date and (B) the number of shares of Common Stock determined by the board of directors of the Registrant on or prior to such date for such year.

(5)	Estimated solely for the purpose of calculating the registration fee in accordance with Rule 457(h) under the Securities Act. The proposed maximum offering price per share and the proposed maximum aggregate offering price are based on the initial public offering price of the Common Stock of $15.00 per share, as set forth in the Registrant's Registration Statement on Form S-1 (File No. 333-299018), as amended (the "S-1 Registration Statement"), that was declared effective on October 8, 2026.
</ffd:OfferingNote>
    <ffd:OfferingNote contextRef="offrl_3" id="ixv-294">(1)	Pursuant to Rule 416 under the Securities Act of 1933, as amended (the "Act") this Registration Statement also covers such additional shares of common stock, par value $0.0001 per share ("Common Stock") as may be issued to prevent dilution from stock splits, stock dividends and similar transactions.

(5)	Estimated solely for the purpose of calculating the registration fee in accordance with Rule 457(h) under the Securities Act. The proposed maximum offering price per share and the proposed maximum aggregate offering price are based on the initial public offering price of the Common Stock of $15.00 per share, as set forth in the Registrant's Registration Statement on Form S-1 (File No. 333-299018), as amended (the "S-1 Registration Statement"), that was declared effective on October 8, 2026.

(6)	Represents shares of Common Stock reserved for issuance under the TRex Bio, Inc. 2026 Employee Stock Purchase Plan (the "ESPP"). The ESPP includes an "evergreen" provision, which provides that on January 1st of each year beginning in 2027 and continuing through and including 2036, the number of shares of Common Stock available for issuance under the ESPP will automatically increase in an amount equal to the lesser or (A) one percent of the number of shares of Common Stock outstanding as of such date and (B) the number of shares of Common Stock determined by the board of directors of the Registrant on or prior to such date for such year, up to a maximum of 3,033,529 shares in the aggregate per year.
</ffd:OfferingNote>
</xbrl>
