# Focus state on an element

**URL:** <https://community.weweb.io/t/focus-state-on-an-element/2324>\
**Category:** How do I?\
**Created:** [April 17, 2023, 9:11am UTC](https://community.weweb.io/t/focus-state-on-an-element/2324 "2023-04-17T09:11:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![amastar](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@amastar](https://community.weweb.io/u/amastar)\
**Post date:** [April 17, 2023, 9:11am UTC](https://community.weweb.io/t/focus-state-on-an-element/2324/1 "2023-04-17T09:11:14Z")

</div>

Will you be launching a new focus state?

I tried to do this with a custom css :focus state on an input border. However the css is applied to an inner element while the original css is applied to an outer ww-object. This makes the 2 styles clash rather than be over written.

If you won’t be launching this soon what is the best alternative option?

Thanks

Amar

---

<div class="post-metadata">

**Author:** ![Quentin](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/quentin/32/6_2.png) [@Quentin](https://community.weweb.io/u/Quentin)\
**Post date:** [April 17, 2023, 2:58pm UTC](https://community.weweb.io/t/focus-state-on-an-element/2324/2 "2023-04-17T14:58:44Z")

</div>

Hey @amastar 👋

I’ll check with the team asap. I think we have this in our roadmap, but I’ll double-check just in case and keep you posted.

---

<div class="post-metadata">

**Author:** ![aurelie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/aurelie/32/13249_2.png) [@aurelie](https://community.weweb.io/u/aurelie)\
**Post date:** [April 18, 2023, 8:16am UTC](https://community.weweb.io/t/focus-state-on-an-element/2324/3 "2023-04-18T08:16:34Z")

</div>

The feature has been implemented, and is currently under QA on our side 🙂

It will be available for input and button, do you have other element in mind?

---

<div class="post-metadata">

**Author:** ![Jean](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jean/32/4106_2.png) [@Jean](https://community.weweb.io/u/Jean)\
**Post date:** [July 2, 2023, 7:19pm UTC](https://community.weweb.io/t/focus-state-on-an-element/2324/4 "2023-07-02T19:19:14Z")

</div>

Hi Aurelie & Team,  
Is there an update on when we’ll be able to use the new onFocus state?  
Thanks,  
Jean

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [July 7, 2023, 11:33am UTC](https://community.weweb.io/t/focus-state-on-an-element/2324/5 "2023-07-07T11:33:38Z")

</div>

Hi @Jean 👋

The button and input elements now recognize the `focus` state if you add it as a custom state on the element.

In the example below, we have a `focus` state on an input that changes the border color when a user navigates to the input:

 ![CleanShot 2023-07-07 at 13.22.36@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/c434c19c863a753a260a335522c46d50b49b53fa.png)

---

<div class="post-metadata">

**Author:** ![Jean](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/jean/32/4106_2.png) [@Jean](https://community.weweb.io/u/Jean)\
**Post date:** [July 7, 2023, 12:40pm UTC](https://community.weweb.io/t/focus-state-on-an-element/2324/6 "2023-07-07T12:40:17Z")

</div>

Thanks Joyce.

---

<div class="post-metadata">

**Author:** ![jaredgibb](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@jaredgibb](https://community.weweb.io/u/jaredgibb)\
**Post date:** [July 19, 2023, 2:13pm UTC](https://community.weweb.io/t/focus-state-on-an-element/2324/7 "2023-07-19T14:13:53Z")

</div>

I would love ths to be available on the checkbox element. i want my users to be able to tab thru a checklist, which they can do but how do i make it so there’s a shadow when a checkbox in a collectino list is focused?

for the checkbox, currently i add a class to the targeted type, then append CSS on page load for it’s :focus-within and add the box shadow

---

<div class="post-metadata">

**Author:** ![marciano\_antonacci](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@marciano\_antonacci](https://community.weweb.io/u/marciano_antonacci)\
**Post date:** [October 18, 2023, 1:18pm UTC](https://community.weweb.io/t/focus-state-on-an-element/2324/8 "2023-10-18T13:18:19Z")

</div>

@aurelie @Joyce Is there any update on this feature being released for the checkbox element? Thank you

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [October 31, 2023, 9:24am UTC](https://community.weweb.io/t/focus-state-on-an-element/2324/9 "2023-10-31T09:24:39Z")

</div>

No update on this. It’s on our radar but not yet prioritized
