© 2019, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. We formulate an optimal control problem for hybrid systems with inputs and propose conditions for the design of state-feedback laws solving the optimal control problem. The optimal control problem has the flavor of an infinite horizon problem, but it also allows solutions to have a bounded domain of definition, which is possible in hybrid systems with deadlocks. Design conditions for optimal feedback laws are obtained by relating a quite general hybrid cost functional to a Lyapunov like function. These conditions guarantee closed-loop optimality and are given by constrained steady-state-like Hamilton-Jacobi-Bellman-type equations. Applications and examples of the proposed results are presented.