Example applications demonstrating how to use the @cornerkit/react package.
| Example | Description | Tech Stack |
|---|---|---|
| react-basic | Complete demo with Squircle component and useSquircle hook | Vite + React + TypeScript |
- Squircle Component: Basic usage with various configurations
- useSquircle Hook: Imperative usage with ref
- Polymorphic Components: Render as button, link, or input
- Interactive Controls: Real-time radius and smoothing adjustment
- Border Support: Toggle borders with width and color controls
- Live Code Generation: See generated code update as you adjust parameters
Each example is a standalone application. To run an example:
# Navigate to the example directory
cd react-basic
# Install dependencies
npm install
# Start the dev server
npm run devTo add a new example:
- Create a new directory:
examples/your-example/ - Include a
package.jsonwith the required dependencies - Add the example to the table above
The examples use a local path reference to @cornerkit/react for development.
Before running, ensure you've built the main package:
# From packages/react
npm run build
# Then run the example
cd examples/react-basic
npm install
npm run dev- Vanilla JavaScript: See
@cornerkit/coreexamples - Vue: See
@cornerkit/vueexamples - Svelte: See
@cornerkit/svelteexamples