# Swap Ticket

> A token swap widget for DEX and crypto wallet apps, with an editable amount, a flip button, a token picker and slippage settings.

A React component for shadcn/ui and Tailwind CSS, from ssych ui (https://ssych.com). Free, MIT licensed, the source lands in your repo.

## Install

```bash
npx shadcn@latest add @ssych/swap-ticket
```

npm dependencies: clsx, lucide-react, motion, tailwind-merge

## Props

`<SwapTicket />`

- `title?`: `string`
- `tokens?`: `SwapToken[]`
- `paySymbol?`: `string`
- `receiveSymbol?`: `string`
- `defaultAmount?`: `string`
- `slippage?`: `string`
- `onSubmit?`: `(ticket: { side: "buy" | "sell"; pay: SwapToken; receive: SwapToken; amount: number }) => `

## Where it belongs

- Trading UI: Dark trading interface components for React and Tailwind: swap tickets, holdings tables, blotters, tapes and candlestick charts. (https://ssych.com/library/s/trading-ui)
- Crypto: Crypto interface components for React and Tailwind: swap tickets, token balances, candlesticks, tapes and market heatmaps. (https://ssych.com/library/s/crypto)
- Crypto dashboard: Crypto dashboard components for React and Tailwind: top coins, market tiles, balances, allocation, swaps, bridges and wallet drawers. (https://ssych.com/library/s/crypto-dashboard)

## Related

- Holdings Table: https://ssych.com/library/holdings-table.md
- Fills Blotter: https://ssych.com/library/fills-blotter.md
- Trade Tape: https://ssych.com/library/trade-tape.md
- Ticker Tape: https://ssych.com/library/ticker-tape.md
- Candlestick Chart: https://ssych.com/library/candlestick.md
- Balance Header: https://ssych.com/library/balance-header.md
- Trade Journal Table: https://ssych.com/library/trade-journal-table.md
- Price Scrubber: https://ssych.com/library/price-scrubber.md

## Links

- Live preview and code: https://ssych.com/library/swap-ticket
- Source: https://github.com/savvasicevs/ssych-ui
- All components: https://ssych.com/llms-full.txt
