<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.26.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>49</ContextCount>
  <ElementCount>142</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>21</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>4</UnitCount>
  <MyReports>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>00090 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>00100 - Statement - CONDENSED CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/StatementCondensedConsolidatedBalanceSheets</Role>
      <ShortName>CONDENSED CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>00200 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/StatementCondensedConsolidatedStatementsOfIncome</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>00300 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/StatementCondensedConsolidatedStatementsOfStockholdersEquity</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>00305 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/StatementCondensedConsolidatedStatementsOfStockholdersEquityParenthetical</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>00400 - Statement - CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/StatementCondensedConsolidatedStatementsOfCashFlows</Role>
      <ShortName>CONDENSED CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>10101 - Disclosure - Organization and basis of presentation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureOrganizationAndBasisOfPresentation</Role>
      <ShortName>Organization and basis of presentation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>10201 - Disclosure - Business segment information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureBusinessSegmentInformation</Role>
      <ShortName>Business segment information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>10301 - Disclosure - Accounts receivable, net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureAccountsReceivableNet</Role>
      <ShortName>Accounts receivable, net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>10401 - Disclosure - Inventories, net</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureInventoriesNet</Role>
      <ShortName>Inventories, net</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>10501 - Disclosure - Accounts payable and accrued liabilities</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureAccountsPayableAndAccruedLiabilities</Role>
      <ShortName>Accounts payable and accrued liabilities</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>10601 - Disclosure - Income taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureIncomeTaxes</Role>
      <ShortName>Income taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>10701 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/role/DisclosureLeases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>10801 - Disclosure - Commitments and contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/role/DisclosureCommitmentsAndContingencies</Role>
      <ShortName>Commitments and contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>10901 - Disclosure - Financial instruments</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureFinancialInstruments</Role>
      <ShortName>Financial instruments</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>11001 - Disclosure - Related party transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureRelatedPartyTransactions</Role>
      <ShortName>Related party transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>11101 - Disclosure - Recent Accounting Pronouncements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/role/DisclosureRecentAccountingPronouncements</Role>
      <ShortName>Recent Accounting Pronouncements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>20102 - Disclosure - Organization and basis of presentation (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureOrganizationAndBasisOfPresentationPolicies</Role>
      <ShortName>Organization and basis of presentation (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.compx.com/role/DisclosureRecentAccountingPronouncements</ParentRole>
      <Position>18</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>30203 - Disclosure - Business segment information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureBusinessSegmentInformationTables</Role>
      <ShortName>Business segment information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.compx.com/20210930/taxonomy/role/DisclosureBusinessSegmentInformation</ParentRole>
      <Position>19</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>30303 - Disclosure - Accounts receivable, net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureAccountsReceivableNetTables</Role>
      <ShortName>Accounts receivable, net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.compx.com/20210930/taxonomy/role/DisclosureAccountsReceivableNet</ParentRole>
      <Position>20</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>30403 - Disclosure - Inventories, net (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureInventoriesNetTables</Role>
      <ShortName>Inventories, net (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.compx.com/20210930/taxonomy/role/DisclosureInventoriesNet</ParentRole>
      <Position>21</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>30503 - Disclosure - Accounts payable and accrued liabilities (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureAccountsPayableAndAccruedLiabilitiesTables</Role>
      <ShortName>Accounts payable and accrued liabilities (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.compx.com/20210930/taxonomy/role/DisclosureAccountsPayableAndAccruedLiabilities</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>30603 - Disclosure - Income taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureIncomeTaxesTables</Role>
      <ShortName>Income taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.compx.com/20210930/taxonomy/role/DisclosureIncomeTaxes</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>30903 - Disclosure - Financial instruments (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureFinancialInstrumentsTables</Role>
      <ShortName>Financial instruments (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.compx.com/20210930/taxonomy/role/DisclosureFinancialInstruments</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>40101 - Disclosure - Organization and basis of presentation - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureOrganizationAndBasisOfPresentationAdditionalInformationDetail</Role>
      <ShortName>Organization and basis of presentation - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>25</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>40201 - Disclosure - Business segment information - Schedule of Business segment information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureBusinessSegmentInformationScheduleOfBusinessSegmentInformationDetail</Role>
      <ShortName>Business segment information - Schedule of Business segment information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>26</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>40301 - Disclosure - Accounts receivable, net - Schedule of Accounts receivable, net (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureAccountsReceivableNetScheduleOfAccountsReceivableNetDetail</Role>
      <ShortName>Accounts receivable, net - Schedule of Accounts receivable, net (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>27</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>40401 - Disclosure - Inventories, net (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureInventoriesNetDetail</Role>
      <ShortName>Inventories, net (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.compx.com/20210930/taxonomy/role/DisclosureInventoriesNetTables</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>40501 - Disclosure - Accounts payable and accrued liabilities - Accounts payable and accrued liabilities (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureAccountsPayableAndAccruedLiabilitiesAccountsPayableAndAccruedLiabilitiesDetail</Role>
      <ShortName>Accounts payable and accrued liabilities - Accounts payable and accrued liabilities (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>29</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>40601 - Disclosure - Income taxes (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/role/DisclosureIncomeTaxesDetail</Role>
      <ShortName>Income taxes (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.compx.com/20210930/taxonomy/role/DisclosureIncomeTaxesTables</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>40701 - Disclosure - Leases - (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/role/DisclosureLeasesDetail</Role>
      <ShortName>Leases - (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>40901 - Disclosure - Financial instruments - Carrying Value and Estimated Fair Value of Financial Instruments (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureFinancialInstrumentsCarryingValueAndEstimatedFairValueOfFinancialInstrumentsDetail</Role>
      <ShortName>Financial instruments - Carrying Value and Estimated Fair Value of Financial Instruments (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="cix-20260331x10q.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>41001 - Disclosure - Related party transactions - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.compx.com/20210930/taxonomy/role/DisclosureRelatedPartyTransactionsAdditionalInformationDetail</Role>
      <ShortName>Related party transactions - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>cix-20260331.xsd</File>
    <File>cix-20260331_cal.xml</File>
    <File>cix-20260331_def.xml</File>
    <File>cix-20260331_lab.xml</File>
    <File>cix-20260331_pre.xml</File>
    <File doctype="10-Q" isDefinitelyFs="true" isUsgaap="true" original="cix-20260331x10q.htm">cix-20260331x10q.htm</File>
  </InputFiles>
  <SupplementalFiles/>
  <BaseTaxonomies>
    <BaseTaxonomy items="284">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="30">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
