A reusable React component library using Tailwind CSS and TypeScript.
npm install stockfish-components
# or
yarn add stockfish-components
# or
pnpm add stockfish-componentsimport React from 'react';
import { TextEditor } from 'stockfish-components';
// CSS is automatically imported when you import the components
function App() {
const [content, setContent] = useState('');
return (
<div>
<TextEditor
value={content}
onChange={setContent}
placeholder="Start typing..."
/>
</div>
);
}If you're using a bundler that doesn't support CSS imports, make sure to include the CSS file in your build process or import it in your main CSS file:
/* In your main CSS file */
@import 'stockfish-components/style.css';
# or
@import 'stockfish-components/dist/index.css';A rich text editor component with formatting options.
value(string): The current content of the editoronChange(function): Callback function called when content changesplaceholder(string): Placeholder text when editor is empty
pnpm run buildpnpm run dev- This library includes Tailwind CSS styles. Make sure your application doesn't have conflicting CSS reset styles.
- The library uses React 18+ and requires
reactandreact-domas peer dependencies. - All Tailwind CSS classes used by the components are included in the distributed CSS file.
MIT