Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions api-reference/components/Battery.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: '<battery />'
---

A Battery component to define battery parameters and customize layout.

## Example Usage

```tsx
export const ExampleBatteryUsage = () => (
<battery name="U1" footprint="axial_p0.3in" pcbX={0} pcbY={0} />

)
```
39 changes: 39 additions & 0 deletions api-reference/components/Board.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: '<board />'
---

A Board component to define a circuit board layout and customize pin configurations.

## Example Usage

```tsx
export const ExampleBoardUsage = () => (
<board
width="20mm"
height="20mm"
outline={[
{ x: -8, y: -6 },
{ x: 0, y: -6 },
{ x: 10, y: 10 },
{ x: 5, y: 10 },
]}
layout={layout().manualEdits({
pcb_placements: [
{
selector: ".R1",
center: { x: 5, y: 5 },
relative_to: "group_center",
},
{
selector: ".C1",
center: { x: -5, y: -5 },
relative_to: "group_center",
},
],
})}
>
<resistor name="R1" resistance="10k" footprint="0402" />
<capacitor name="C1" capacitance="10uF" footprint="0603" />
</board>
)
```
20 changes: 20 additions & 0 deletions api-reference/components/Chip.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: '<chip />'
---

A Chip component to define a semiconductor chip with configuration options.

## Example Usage

```tsx
export const ExampleChipUsage = () => (
<chip
name="U1"
pcbX={4}
footprint="soic8"
cadModel={{
stlUrl: "https://example.com/chip.stl",
}}
/>
)
```
16 changes: 16 additions & 0 deletions api-reference/components/Crystal.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: '<crystal />'
---

A Crystal component to define frequency and package type.

## Example Usage

```tsx
export const ExampleCrystalUsage = () => (
<crystal
frequency="16MHz"
package="HC-49"
/>
)
```
20 changes: 20 additions & 0 deletions api-reference/components/Jumper.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: '<jumper />'
---

A Jumper component to define jumper specifications.

## Example Usage

```tsx
export const ExampleJumperUsage = () => (
<jumper
name="J1"
footprint="pinrow4"
pcbX={0}
pcbY={0}
schX={0}
schY={0}
/>
)
```
18 changes: 18 additions & 0 deletions api-reference/components/Mosfet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: '<mosfet />'
---

A MOSFET component to define voltage, current, and switching characteristics.

## Example Usage

```tsx
export const ExampleMosfetUsage = () => (
<mosfet
name="M1"
channelType="n"
mosfetMode="enhancement"
schRotation={0}
/>
)
```
19 changes: 19 additions & 0 deletions api-reference/components/PinHeader.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: '<pinheader />'
---

A PinHeader component to define pin count and spacing for headers.

## Example Usage

```tsx
export const ExamplePinHeaderUsage = () => (
<pinheader
name="P1"
pinCount={4}
footprint="pinrow4"
schRotation={90}
facingDirection="left"
/>
)
```
19 changes: 19 additions & 0 deletions api-reference/components/Potentiometer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: '<potentiometer />'
---

A Potentiometer component to define resistance and package type.

## Example Usage

```tsx
export const ExamplePotentiometerUsage = () => (
<potentiometer
name="P1"
maxResistance="10k"
schX={0}
schY={0}
schRotation={0}
/>
)
```
14 changes: 14 additions & 0 deletions api-reference/components/PushButton.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: '<pushbutton />'
---

A PushButton component to define button specifications like type and action.

## Example Usage

```tsx
export const ExamplePushButtonUsage = () => (
<pushbutton name="PB1" footprint="pushbutton" pcbX={0} pcbY={0} />

)
```
18 changes: 18 additions & 0 deletions api-reference/components/Resonator.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: '<resonator />'
---

A Resonator component to define frequency and package style.

## Example Usage

```tsx
export const ExampleResonatorUsage = () => (
<resonator
name="K1"
frequency="1MHz"
loadCapacitance="20pF"
pinVariant="no_ground"
/>
)
```
31 changes: 23 additions & 8 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@
"navigation": [
{
"group": "Get Started",
"pages": ["quickstart", "registry"]
"pages": [
"quickstart",
"registry"
]
},
{
"group": "Tutorials",
Expand All @@ -69,18 +72,28 @@
{
"group": "Core Components",
"pages": [
"api-reference/components/battery",
"api-reference/components/board",
"api-reference/components/bug",
"api-reference/components/resistor",
"api-reference/components/capacitor",
"api-reference/components/inductor",
"api-reference/components/transistor",
"api-reference/components/trace",
"api-reference/components/chip",
"api-reference/components/component",
"api-reference/components/crystal",
"api-reference/components/diode",
"api-reference/components/group",
"api-reference/components/inductor",
"api-reference/components/jumper",
"api-reference/components/led",
"api-reference/components/mosfet",
"api-reference/components/netalias",
"api-reference/components/pinheader",
"api-reference/components/potentiometer",
"api-reference/components/powersource",
"api-reference/components/group"
"api-reference/components/pushbutton",
"api-reference/components/resistor",
"api-reference/components/resonator",
"api-reference/components/trace",
"api-reference/components/transistor"
]
},
{
Expand Down Expand Up @@ -108,12 +121,14 @@
},
{
"group": "Advanced",
"pages": ["api-reference/advanced/soup"]
"pages": [
"api-reference/advanced/soup"
]
}
],
"footerSocials": {
"x": "https://x.com/tscircuit",
"github": "https://github.com/tscircuit/tscircuit",
"linkedin": "https://www.linkedin.com/company/tscircuit"
}
}
}