Skip to content
Cloudflare Docs

Subtract IP calculator

Import

import SubtractIPCalculator from "~/components/SubtractIPCalculator.tsx";

Usage


import SubtractIPCalculator from "~/components/SubtractIPCalculator.tsx";
<SubtractIPCalculator client:load />

<SubtractIPCalculator> Props

defaults

type: object

An optional object containing base (string) and exclude (string[]) properties, to set default inputs.

example:

Results: 10.0.1.0/24, 10.0.2.0/23, 10.0.4.0/22, 10.0.8.0/21, 10.0.16.0/20, 10.0.32.0/19, 10.0.64.0/18, 10.0.128.0/17, 10.1.0.0/16, 10.2.0.0/15, 10.4.0.0/14, 10.8.0.0/13, 10.16.0.0/12, 10.64.0.0/10, 10.128.0.0/9
import SubtractIPCalculator from "~/components/SubtractIPCalculator.tsx";
<SubtractIPCalculator
client:load
defaults={{
base: "10.0.0.0/8",
exclude: ["10.0.0.0/24", "10.32.0.0/11"]
}}
/>