Everything you need to build a Svelte project, powered by create-svelte
.
If you're seeing this, you've probably already done this step. Congrats!
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.
Svelte Image Component with Storybook
This open-source repository is a Svelte project that provides a versatile and interactive Image component. With the power of Svelte, it offers seamless reactivity, making it an excellent choice for modern web development. The repository also includes Storybook integration for visually testing and documenting the Image component.
Key Features:
Image Component: The core of this repository is a customizable Image component. It allows you to easily display images and dynamically change properties such as the image URL, title, and aspect ratio.
Dynamic Properties: The Image component is designed to be highly flexible. You can change the image source URL, set a custom title, and choose between square and rectangle layouts, all with simple property adjustments.
Storybook Integration: Storybook is integrated into the project, offering a visual playground for developers. You can explore different variations of the Image component, test various configurations, and document use cases effectively.
Svelte Simplicity: Leveraging Svelte's reactive nature, this component keeps the codebase clean and efficient. It updates the DOM only when necessary, resulting in optimal performance.