DEV Community

Cover image for DEV.to Widget now has a DARK Theme! and a pink theme and an ocean theme. See what's new in dev-widget v1.1.0 ๐ŸŒป๐ŸŒ‘๐ŸŒธ
Saurabh Daware ๐ŸŒป
Saurabh Daware ๐ŸŒป

Posted on โ€ข Edited on

41 16

DEV.to Widget now has a DARK Theme! and a pink theme and an ocean theme. See what's new in dev-widget v1.1.0 ๐ŸŒป๐ŸŒ‘๐ŸŒธ

So, a few months back I made an unofficial DEV.to Widget which lets you show off your articles on your website/blogs using just 2 lines of code! Today I finished writing and deploying a new minor version v1.1.0 which introduces a new attribute, data-theme.

Before we go, Here's how new themes look like:
DEV.to widget themes preview

Usage

To add DEV widget to your website, All you have to do is copy-paste these two lines into your code.

<dev-widget data-username="saurabhdaware" data-theme="pink"></dev-widget>

<!-- Place this before the end of body tag -->
<script src="https://unpkg.com/dev-widget@1.1.0/dist/card.component.min.mjs" type="module"></script>

Enter fullscreen mode Exit fullscreen mode

and that's it! just replace your DEV.to username in data-username!

The new version lets you add data-theme attribute which has possible values of default, pink, ocean, dark.

The DEV Widget is also available as NPM module for frameworks and webpack,
npm install --save dev-widget
&
import 'dev-widget'

Codepen Demo:

Links:

GitHub: https://github.com/saurabhdaware/DEV-widget
NPM Registry: https://npmjs.org/package/dev-widget
Codepen: https://codepen.io/saurabhdaware/pen/NWWbOvv
v1.1.0 Changelogs: https://github.com/saurabhdaware/DEV-widget/releases/tag/v1.1.0

Thank you for reading ๐ŸŒป My favorite is the pink theme ๐ŸŒธ which one did you like? let me know in comments :D

P.S. Now I have 10k Followers on DEV.to yay!!

Top comments (13)

Collapse
 
nickytonline profile image
Nick Taylor โ€ข

Nice work @saurabhdaware !

You da real MVP

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป โ€ข

hehe Thank you so much Nick :D

Collapse
 
binyamin profile image
Binyamin Green โ€ข

This looks awesome! Nice job.

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป โ€ข

Thank youu :D

Collapse
 
deepu105 profile image
Deepu K Sasidharan โ€ข

Really nice widget. It would be nice if the width & height are configurable or if they are responsive.

Collapse
 
deepu105 profile image
Deepu K Sasidharan โ€ข

I see you have an attribute for width

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป โ€ข

yes there is data-width I will soon add data-height as well, Thank You ๐ŸŒป

Collapse
 
rhymes profile image
rhymes โ€ข โ€ข Edited

Great job, Saurabh!

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป โ€ข

Thank you rhymes ๐ŸŒป๐ŸŒป

Collapse
 
peter profile image
Peter Kim Frank โ€ข

This is so awesome. Great job, Saurabh!

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป โ€ข

Thank you so much Peter :D

Collapse
 
raman_andryianau profile image
Raman CreativeIT โ€ข

Great news! Well done!)

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป โ€ข

Thank you :D

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay